The Law of Cosines can be applied to find the angle between two vectors and
. To begin, we draw the vectors
and
, as well as the vector
(to be determined momentarily) that connects the tips of the vectors
and
.
Using the usual rules for adding vectors, we see that
, so that
We now apply the Law of Cosines to find :
We now apply the rule , convert the square of the norms into dot products. We then use the distributive and commutative properties of dot products to simplify.
We can now cancel from the left and right sides and solve for :
Finally, we are guaranteed that the angle between two vectors must lie between and
(or, in degrees, between
and
). Since this is the range of arccosine, we are permitted to use this inverse function to solve for
:
The good news is that there’s nothing special about two dimensions in the above proof, and so this formula may used for vectors in for any dimension
.
In the next post, we’ll consider how this same problem can be solved — but only in two dimensions — using arctangent.