Prerequisites
The Law of Cosines
Figure 2: The Law of Cosines is just the definition of the dot product.
The definition of the dot product can be used to prove several familiar formulas. For example, consider Figure 2, in which $\CC=\BB-\AA$. Then \begin{eqnarray} \CC\cdot\CC &=& (\BB -\AA) \cdot (\BB -\AA) \nonumber\\ &=& \AA\cdot\AA + \BB\cdot\BB - 2 \,\AA\cdot\BB \end{eqnarray} or equivalently \begin{equation} \,|\CC|^2 = |\AA|^2 + |\BB|^2 - 2|\AA||\BB|\cos\theta \end{equation} which is just the Law of Cosines.