The cosine rule
The cosine rule for a side (two sides and the included angle) and for an angle (three sides), how a negative cosine signals an obtuse angle, and choosing between the sine rule and the cosine rule.
The sine rule needs a matching side and angle pair. Sometimes you don't have one: you know three sides, or two sides and the angle squeezed between them. That is the cosine rule's job. It is Pythagoras' theorem with a correction for angles that aren't $90^\circ$.
Finding a side
Look at what happens when $C = 90^\circ$: $\cos 90^\circ = 0$, so the last term vanishes and you get $c^2 = a^2 + b^2$, which is Pythagoras. If $C$ is less than $90^\circ$, the cosine is positive, so you subtract and $c$ comes out shorter than the Pythagoras value. If $C$ is obtuse, the cosine is negative, so you end up adding and $c$ comes out longer. That matches what you see: opening the angle wider pushes the ends further apart.
The angle in the formula must be the one between the two known sides, and the side you find is the one opposite it.
Two straight fences meet at a corner post at an angle of $70^\circ$. One is $9$ m long and the other is $6$ m. How far apart are their far ends?
Finding an angle
Rearrange the same formula to make $\cos C$ the subject:
The side on its own with the minus sign, $c$, is the one opposite the angle you want. Unlike the sine rule, there is no obtuse-angle trap here: $\cos^{-1}$ gives answers all the way from $0^\circ$ to $180^\circ$, and a negative cosine automatically gives an obtuse angle.
A triangle has sides $7$ cm, $8$ cm and $5$ cm. Find the angle opposite the $7$ cm side.
Find the largest angle of a triangle with sides $5$ m, $6$ m and $9$ m.
Sine rule or cosine rule?
Ask one question: do I know a side and the angle opposite it?
| You know | Matching pair? | Use |
|---|---|---|
| two angles and a side (AAS) | yes, after finding the third angle | sine rule |
| two sides and a non-included angle (SSA) | yes | sine rule (watch for obtuse) |
| two sides and the included angle (SAS) | no | cosine rule for the side |
| three sides (SSS) | no | cosine rule for an angle |
Choose what you know, type the values and the solver tells you which rule it used and why. Check Examples 1 to 3 here.
In Three sides, try $3$, $4$ and $9$. Why is there no triangle? Then try SSA with $a = 7$, $b = 10$, $A = 40^\circ$ and read the warning about a second, obtuse answer.
Your turn
Find the largest angle in a triangle with sides $6$ cm, $7$ cm and $10$ cm, to one decimal place.
Show the working
The largest angle is opposite $10$. $\cos\theta = \dfrac{6^2 + 7^2 - 10^2}{2 \times 6 \times 7} = \dfrac{-15}{84} \approx -0.1786$, so $\theta \approx 100.3^\circ$.
In triangle $ABC$, which formula finds side $c$ from $a$, $b$ and angle $C$?
The cosine rule is $c^2 = a^2 + b^2 - 2ab\cos C$. Remember it gives $c^2$, so take the square root at the end.
In triangle $ABC$, $a = 12$, $b = 15$ and $C = 40^\circ$. Find $c$ to two decimal places.
$c^2 = 12^2 + 15^2 - 2 \times 12 \times 15 \times \cos 40^\circ \approx 93.22$, so $c \approx 9.66$.
A triangle has sides $10$ cm, $13$ cm and $17$ cm. Find its largest angle to one decimal place.
The largest angle is opposite $17$. $\cos\theta = \dfrac{10^2 + 13^2 - 17^2}{2 \times 10 \times 13} = \dfrac{-20}{260} \approx -0.0769$, so $\theta \approx 94.4^\circ$.
Using the cosine rule, you get $\cos C = -0.25$. What does this tell you?
Cosine is negative for angles between $90^\circ$ and $180^\circ$. Here $C = \cos^{-1}(-0.25) \approx 104.5^\circ$.
You know all three sides of a triangle and want an angle. Which rule do you use?
With no angles known there is no matching pair, so the sine rule can't start. Use $\cos C = \dfrac{a^2 + b^2 - c^2}{2ab}$.
You know angles $A$ and $B$ and side $a$. Which rule finds side $b$ most directly?
$(a, A)$ is a matching pair and $B$ is known, so $\dfrac{b}{\sin B} = \dfrac{a}{\sin A}$.
Two straight roads leave a roundabout at an angle of $125^\circ$. One car is $4$ km along the first road and another is $6$ km along the second. How far apart are the cars in a straight line, to two decimal places?
$d^2 = 4^2 + 6^2 - 2 \times 4 \times 6 \times \cos 125^\circ \approx 52 + 27.53 = 79.53$, so $d \approx 8.92$ km. The obtuse angle makes the cosine negative, so the last term adds.
Exam style: Two hikers leave the same campsite at the same time. One walks at $4$ km/h and the other at $5$ km/h, along straight paths that make an angle of $72^\circ$. How far apart are they after $2$ hours, to two decimal places?
After $2$ hours they have walked $8$ km and $10$ km. $d^2 = 8^2 + 10^2 - 2 \times 8 \times 10 \times \cos 72^\circ \approx 164 - 49.44 = 114.56$, so $d \approx 10.70$ km.
Exam style: A triangular park has sides $80$ m, $95$ m and $120$ m. Find the largest angle, then use it to find the area of the park to the nearest square metre.
Largest angle, opposite $120$: $\cos\theta = \dfrac{80^2 + 95^2 - 120^2}{2 \times 80 \times 95} = \dfrac{1025}{15\,200} \approx 0.0674$, so $\theta \approx 86.13^\circ$. Area $= \tfrac{1}{2} \times 80 \times 95 \times \sin 86.13^\circ \approx 3791$ m².
Coaching Centre