Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Matrices and Linear Algebra > Operations on Vectors >

VectorAngle

VectorAngle[u, v]
gives the angle between the vectors u and v.
  • For nonzero real vectors the vector angle theta satisfies .
  • For complex vectors the numerator is u.v^.
The angle between two vectors in 2D:
The angle between two vectors in 3D:
The angle between orthogonal vectors:
Use exact arithmetic to compute the vector angle:
Use machine arithmetic:
Use 47-digit precision arithmetic:
Use symbolic vectors:
For complex vectors the angle returned may be complex:
Find when two vectors have the same direction:
Find the area of the triangle with u and v as two sides:
Plot the area in the triangle formed by the x axis and a unit vector in the first quadrant:
Distribution of angles between random vectors with positive entries in 2, 3, 5 and 10 dimensions:
The vector angle Theta satisfies :
The generalization to complex vectors satisfies :
If you rotate a vector u in a plane that includes u, then the vector angle is the rotation angle:
If you rotate it in a plane that does not include u, then the angles differ:
The vector angle Theta is related to the cross product through ||uxv||=|sin(theta)| ||u|| ||v||:
ArcTan of two arguments gives the signed vector angle between the x axis and the vector:
Eigenvectors are the vectors for which the angle between m.x and x is 0:
The angle between the zero vector and any other vector is indeterminate:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team