MathLabs
TheoremProved

Law of cosines

Statement

In any triangle with side lengths aa, bb, cc and interior angle γ\gamma opposite the side of length cc, c2=a2+b2−2abcos⁡γc^2 = a^2 + b^2 - 2ab\cos\gamma.

Why is it true?

The law of cosines is the Pythagorean theorem with a correction term −2abcos⁡γ-2ab\cos\gamma that accounts for how far the angle γ\gamma departs from a right angle. When γ=90∘\gamma = 90^\circ, cos⁡γ=0\cos\gamma = 0 and the formula reduces to c2=a2+b2c^2 = a^2 + b^2; opening γ\gamma into an obtuse angle makes cos⁡γ<0\cos\gamma < 0 so c2c^2 exceeds a2+b2a^2 + b^2, while closing γ\gamma into an acute angle makes cos⁡γ>0\cos\gamma > 0 and pulls the opposite side cc shorter.

Proof sketch

Drop the altitude hh from the vertex opposite side bb onto the line containing side bb. In terms of the angle γ\gamma, this altitude has length h=asin⁡γh = a\sin\gamma and meets the line of side bb at signed distance acos⁡γa\cos\gamma from the vertex of γ\gamma, leaving a segment of length ∣b−acos⁡γ∣|b - a\cos\gamma| to the other endpoint. Applying the Pythagorean theorem to the right triangle with legs hh and ∣b−acos⁡γ∣|b - a\cos\gamma| and hypotenuse cc gives c2=(asin⁡γ)2+(b−acos⁡γ)2=a2(sin⁡2γ+cos⁡2γ)+b2−2abcos⁡γ=a2+b2−2abcos⁡γc^2 = (a\sin\gamma)^2 + (b - a\cos\gamma)^2 = a^2(\sin^2\gamma + \cos^2\gamma) + b^2 - 2ab\cos\gamma = a^2 + b^2 - 2ab\cos\gamma.

Proved by

Topics that use this theorem

Related theorems

Step-by-step proofs

No step-by-step proof yet for this theorem.

References

  1. Euclid (translated by Thomas L. Heath) (1956). The Thirteen Books of Euclid's Elements, Vol. 1 (Book II, Propositions 12–13)
  2. Glen Van Brummelen (2009). The Mathematics of the Heavens and the Earth: The Early History of Trigonometry