next up previous contents
Next: The Vector, or Cross Up: The Scalar, or Dot Previous: The Scalar, or Dot   Contents

The Law of Cosines

The law of cosines is easily derived (one of several ways) by finding the scalar length of the difference vector $ \vA - \vB$ .


$\displaystyle \vert\vA - \vB\vert^2 = (\vA - \vB) \cdot (\vA - \vB) = \vA\cdot\vA - \vA
\cdot \vB - \vB \cdot \vA + \vB \cdot \vB $

or (collecting terms and using rules from above):

$\displaystyle \vert\vA - \vB\vert = \sqrt{ A^2 + B^2 - 2AB\cos\theta } $

Note that the Pythagorean Theorem is a special case of this rule with $ \theta = \pi/2$ .

Robert G. Brown 2017-07-11