Sitelet https://mathworld.wolfram.com/VectorAngle.html
TOPICS
Search

Vector Angle


The vector angle between two nonzero real vectors u and v is the angle theta in [0,pi] defined by

 theta=cos^(-1)((u·v)/(||u||||v||)),

where the numerator is the dot product and the denominators are Euclidean vector norms. Schwarz's inequality ensures that the argument of the inverse cosine lies in [-1,1]. In two or three dimensions, this is the smaller angle between arrows with coincident tails.

The vector angle is 0 for vectors pointing in the same direction, pi/2 for orthogonal vectors, and pi for opposite directions. It is undefined if either argument is the zero vector. For example, (1,0) and (1,1) have vector angle pi/4.

Unlike the smaller line-line angle between unoriented lines, the vector angle retains the directions of its arguments. Reversing one direction replaces theta by pi-theta. A dihedral angle can be related to the vector angle between normal vectors to the two planes, with the choice of normals determining which supplementary angle is obtained.

The Wolfram Language computes the vector angle using VectorAngle[u, v]. The related function AngleVector[theta] instead constructs the planar unit vector (costheta,sintheta) at a counterclockwise angle theta from the positive x-axis. Its orientation is specified modulo 2pi, whereas the real vector angle is restricted to [0,pi].


See also

Angle, Dihedral Angle, Dot Product, Line-Line Angle, Vector, Vector Norm

Explore with Wolfram|Alpha

WolframAlpha

More things to try:

References

Strang, G. and Herman, E. "The Dot Product." §2.3 in Calculus Volume 3. Houston, TX: OpenStax, 2016. https://openstax.org/books/calculus-volume-3/pages/2-3-the-dot-product.

Cite this as:

Weisstein, Eric W. "Vector Angle." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/VectorAngle.html

Subject classifications