Lesson 6 of 8 · 17 min
The cosine rule
Use the cosine rule to find the third side of a triangle from two sides and the included angle, and to find any angle from three sides.
What you will be able to do
- Use to find a side from two sides and the included angle.
- Rearrange to to find an angle from three sides.
- Explain how the cosine rule extends Pythagoras' theorem.
- Decide between the sine rule and the cosine rule.
Two straight roads leave a country town at an angle of . One farm gate is 5.2 km along the first road, another is 7.9 km along the second. How far apart are the gates, as the crow flies?
You know two sides and the angle between them. No side comes with its opposite angle, so the sine rule can't start. This is the job of the cosine rule.
Key idea
The cosine rule
In any triangle ,
The angle is the angle between sides and , and is the side opposite it. The same pattern works for any side:
The QCAA formula book gives the first form.
Set . Then , the last term vanishes and the rule becomes Pythagoras: . Make smaller than and shrinks; make it obtuse and turns negative, so grows.
So the cosine rule is Pythagoras' theorem with a correction term, , for angles that aren't . A sharper angle between the two sides pulls their ends closer together; a wider angle pushes them apart.
Worked example
The distance between two farm gates
Two straight roads leave a town at an angle of . One farm gate is 5.2 km along the first road and another is 7.9 km along the second. Calculate the straight-line distance between the two gates, correct to two decimal places.
Step 1: Choose the rule
You know two sides and the angle between them, with no complete pair: use the cosine rule.
Step 2: Substitute
Step 3: Evaluate
is worked out as one term and subtracted.
Step 4: Take the square root
Try it yourself first, then check the working one step at a time.
Answer
The gates are about 7.66 km apart.
Method
Two sides and the included angle → cosine rule.
Substitute into .
Evaluate in one go on the calculator, then take the square root.
Watch out for
Giving as the answer.
Calculating .
In triangle , cm, cm and . Calculate the length of , correct to two decimal places.
Common mistake
Calculator order
Type the whole right-hand side in one go, , and let the calculator do the order of operations. Working out first and then multiplying by is the most common cosine rule error.
If you know all three sides, rearrange the rule to make the subject:
The side subtracted on top, , is the side opposite the angle you want. The other two sides are the ones that meet at that angle.
Worked example
The largest angle of a triangular frame
A triangular steel frame has sides of 7 m, 9 m and 13 m. Calculate the size of its largest angle, correct to one decimal place.
Step 1: Find the angle you want
The largest angle, , is opposite the longest side, m. Let and .
Step 2: Use the rearranged cosine rule
The side opposite the angle you want is the one subtracted on top.
Step 3: Apply the inverse
Step 4: Interpret
is negative, so is obtuse. That fits: , so the triangle is "wider" than right-angled.
Try it yourself first, then check the working one step at a time.
Answer
The largest angle is about .
Method
The largest angle is opposite the longest side.
with opposite the angle.
Take ; a negative value gives an obtuse angle.
Watch out for
Subtracting the wrong side on top, which finds a different angle.
Thinking a negative cosine is an error.
Tip
No ambiguity with cosine
Unlike sine, cosine is negative for obtuse angles. If comes out negative, gives an obtuse angle automatically. So the cosine rule is the safe choice for the largest angle of a triangle.
A triangle has sides of 5 m, 6 m and 8 m. Calculate the size of its largest angle, correct to one decimal place.
Use the sine rule when you know…
- two angles and any side, or
- two sides and an angle opposite one of them.
You have a complete pair: a side and its opposite angle.
Use the cosine rule when you know…
- two sides and the angle between them (find the third side), or
- all three sides (find an angle).
There is no complete pair.
A triangular garden bed has sides of 2.4 m and 3.1 m, and the angle opposite the 3.1 m side is . You want the angle opposite the 2.4 m side. Which rule should you use first?
Where the cosine rule comes from
Put at the origin with side along the -axis, so . Then is a distance from at angle , so .
Pythagoras on the horizontal and vertical gaps between and :
Since (Pythagoras in the unit circle), .
Exam tip
In the exam
Write the rule, substitute, write the value of , then the square root. For an angle, show the fraction for with numbers in it before you take . A negative cosine is not an error: it means the angle is obtuse.
Summary
: two sides and the included angle give the third side.
: three sides give any angle; the subtracted side is opposite the angle.
When the cosine rule is Pythagoras' theorem.
A negative means is obtuse; handles it.
Complete pair → sine rule. No pair → cosine rule.
Finished the lesson?
Try the 3 quick checks above and the lesson completes itself, or mark it complete now.