To prove the cosine law using vectors, I’m going to interpret the left side,
\(|u-v|^2\text{,}\) as
\((u-v) \cdot (u-v)\text{,}\) using the second identity in
Proposition 2.1.5. Then I can go through some algebraic manipulation with the dot product. First, I’ll distribute the dot product.
\begin{equation*}
|u-v|^2 = (u-v) \cdot (u-v) = u \cdot u - v \cdot u - u \cdot
v + v \cdot v
\end{equation*}
Then I can interchange the order of the second term, since the dot product is commutative.
\begin{equation*}
|u-v|^2 = u \cdot u - u \cdot v - u \cdot v + v \cdot v
\end{equation*}
Then I can group the middle terms.
\begin{equation*}
|u-v|^2 = u \cdot u - 2u \cdot v + v \cdot v
\end{equation*}
Then I can interpret the first and last terms as length squared.
\begin{equation*}
|u-v|^2 = |u|^2 - 2u \cdot v + |v|^2
\end{equation*}
Then I can reorder the terms.
\begin{equation*}
|u-v|^2 = |u|^2 + |v|^2 - 2u \cdot v
\end{equation*}
Finally, using the definition of angle, I can replace the dot product with \(|u||v| \cos \theta\text{,}\) where \(\theta\) is the angle between the two vectors.
\begin{equation*}
|u-v|^2 = |u|^2 + |v|^2 - 2|u||v| \cos \theta
\end{equation*}
This is the cosine law.