Math 2.0

Geometry Proof

Proof of the law of cosines with the dot product

Builds on TriangleAngle at a pointEuclidean distanceLength of a vectorDot product

Proof

We expand the square of the length of a difference of two vectors.

  1. Let u=A−Cu = A - C and v=B−Cv = B - C. With the Euclidean distance and the length, ∥u∥=b\norm{u} = b and ∥v∥=a\norm{v} = a.
  2. We have u−v=A−Bu - v = A - B, so c2=∥u−v∥2=(u−v)⋅(u−v)c^2 = \norm{u - v}^2 = (u - v) \cdot (u - v), with the dot product.
  3. The dot product is bilinear and symmetric. So (u−v)⋅(u−v)=u⋅u−2 u⋅v+v⋅v=b2+a2−2 u⋅v(u - v) \cdot (u - v) = u \cdot u - 2 \, u \cdot v + v \cdot v = b^2 + a^2 - 2 \, u \cdot v.
  4. The vertices of the triangle are not collinear, so they are distinct. Thus u≠0u \neq 0 and v≠0v \neq 0, and the angle γ\gamma at CC is defined.
  5. By the definition of the angle at CC, cos⁡γ=u⋅v∥u∥ ∥v∥=u⋅vab\cos \gamma = \dfrac{u \cdot v}{\norm{u} \, \norm{v}} = \dfrac{u \cdot v}{ab}. So u⋅v=abcos⁡γu \cdot v = ab \cos \gamma.
  6. Steps 2, 3 and 5 give c2=a2+b2−2abcos⁡γc^2 = a^2 + b^2 - 2ab \cos \gamma.

Idea

Put the vertex CC at the origin. The side ABAB is the difference of the two vectors from CC. Squaring its length produces the two squared sides and a cross term, and the cross term is the dot product, which is abcos⁡γab \cos \gamma.

Reading path

To understand this page from the ground up, read these 6 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Angle at a point concept
  2. Dot product concept
  3. Euclidean distance concept
  4. Length of a vector concept
  5. Triangle concept
  6. Proof of the law of cosines with the dot product proof

Where this leads

9 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Law_of_cosines, Using vectors
About this page
TagT5X9ZN2E4M
URIm2://T5X9ZN2E4M
Kindproof
WritingW0 stub
MSC51M04
ProvesLaw of cosines
UsesTriangle, Angle at a point, Euclidean distance, Length of a vector, Dot product
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.