index

Angle Between Two Vectors

How do we find the angle between two vectors?

Recall the dot product of vectors and in the real number space, is in the form of:

There are two dependencies which lie within the vector dot product:

  1. The angle between the two vectors.
  2. The length of the input vectors.

Suppose we just want to find the angle of the two vectors using just the dot product. We'll need to find a way to remove the dependency of length within the dot product.

The easiest way to do this is to unitize the vectors, or normalize them. Or, simply, just convert them into unit vectors.

We can find the unit vector from by

Where in this case .

We can then unitize two vectors , , to , and . Then find use the alternate form of the dot product:

Since we know that , and are unit vectors, then both lengths of these vectors are . Which then the expression can be simplified to:

Using this expression, the angle between , and is now the of the dot product.

Notes