The cosine rule
For any triangle, with the side opposite the angle :
It looks like Pythagoras' theorem with a correction on the end, and that is exactly what it is.
Before you start
You need Pythagoras' theorem and the cosine ratio, in a right-angled triangle.
Predict first
Before reading on, predict: if , what does equal, and what does the rule become? Work that out first — the answer says why this is Pythagoras with something added rather than a separate rule to memorise.
The proof
Take a triangle with corners , and , and sides , , opposite them. Suppose is acute for now; the last section deals with an obtuse .
Drop a perpendicular from to the side , meeting it at . Call the height , and call the length the distance .
That splits the triangle into two right-angled triangles, and the proof is Pythagoras applied to each of them.
In the left triangle, :
- the hypotenuse is ;
- the adjacent side to angle is .
So the cosine ratio gives
and Pythagoras gives
In the right triangle, :
- the hypotenuse is ;
- the vertical side is ;
- the horizontal side is , which is the whole of minus , so .
Pythagoras gives
Substitute. Replace with and expand the bracket:
The terms cancel:
And , so
which is the cosine rule.
Why it becomes Pythagoras when the angle is right
When , the cosine of a right angle is . The correction term is therefore zero, and what is left is
So Pythagoras' theorem is the case of the cosine rule where the angle happens to be a right angle. Nothing new was needed for it; it falls out.
The obtuse case, and why it works
If is obtuse the perpendicular from lands outside the side , so the picture is different: the foot sits beyond rather than between and .
The algebra still works, with two changes. The length becomes rather than , and the angle you measure inside the right-angled triangle at is , whose cosine is . Both changes flip a sign, and they flip it in the same place, so the final statement is unchanged.
That is worth checking rather than assuming. A proof that quietly only covered acute angles would not be a proof of the cosine rule, and the sign that looks like a detail is the whole reason the rule is stated with a minus.
Check your understanding
- Use the rule with to show it becomes Pythagoras' theorem.
- In a triangle, , and . Find .
- The rule is often rearranged to . What is that version for?
Answers
- , so and .
- , so .
- Finding an angle when all three sides are known. The original form gives a side from two sides and the angle between them; this form solves for the angle instead.
A common error
Watch the angle you use. The rule needs the angle between the two sides you know — the one opposite the side you are finding. Reaching for an angle that is not between them is the most common way to get a wrong answer, and the rule gives no warning: it will happily compute a number for the wrong triangle.