4E

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

Cosine rule (side)
$$c^2 = a^2 + b^2 - 2ab\cos C$$

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.

Example 1●

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?

$c^2 = 9^2 + 6^2 - 2 \times 9 \times 6 \times \cos 70^\circ$
Two sides and the included angle: there is no matching pair, so the sine rule can't start. Use the cosine rule.
$c^2 \approx 80.06$
Work it out in one line on the calculator, keeping the brackets right.
$c \approx 8.95$ m
Don't forget the square root: c² is not the answer.

Finding an angle

Rearrange the same formula to make $\cos C$ the subject:

Cosine rule (angle)
$$\cos C = \frac{a^2 + b^2 - c^2}{2ab}$$

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.

Example 2●

A triangle has sides $7$ cm, $8$ cm and $5$ cm. Find the angle opposite the $7$ cm side.

$\cos A = \dfrac{8^2 + 5^2 - 7^2}{2 \times 8 \times 5} = \dfrac{40}{80} = 0.5$
The angle we want is opposite 7, so 7 is the side that gets subtracted.
$A = 60^\circ$
Inverse cosine.
Example 3●●

Find the largest angle of a triangle with sides $5$ m, $6$ m and $9$ m.

$\cos C = \dfrac{5^2 + 6^2 - 9^2}{2 \times 5 \times 6} = \dfrac{-20}{60} \approx -0.3333$
The largest angle is opposite the longest side, 9.
$C = \cos^{-1}(-0.3333) \approx 109.5^\circ$
A negative cosine means the angle is obtuse; the calculator handles it.

Sine rule or cosine rule?

Ask one question: do I know a side and the angle opposite it?

You knowMatching pair?Use
two angles and a side (AAS)yes, after finding the third anglesine rule
two sides and a non-included angle (SSA)yessine rule (watch for obtuse)
two sides and the included angle (SAS)nocosine rule for the side
three sides (SSS)nocosine rule for an angle
InteractiveTriangle solver: which rule?
Try this

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$.

Flashcards
Cosine rule for a side
$c^2 = a^2 + b^2 - 2ab\cos C$, with $C$ between $a$ and $b$
Cosine rule for an angle
$\cos C = \dfrac{a^2 + b^2 - c^2}{2ab}$, with $c$ opposite $C$
Sine or cosine rule?
Matching side and angle pair: sine rule. No pair (SAS or SSS): cosine rule.
Practice
  1. In triangle $ABC$, which formula finds side $c$ from $a$, $b$ and angle $C$?

  2. In triangle $ABC$, $a = 12$, $b = 15$ and $C = 40^\circ$. Find $c$ to two decimal places.

  3. A triangle has sides $10$ cm, $13$ cm and $17$ cm. Find its largest angle to one decimal place.

  4. Using the cosine rule, you get $\cos C = -0.25$. What does this tell you?

  5. You know all three sides of a triangle and want an angle. Which rule do you use?

  6. You know angles $A$ and $B$ and side $a$. Which rule finds side $b$ most directly?

  7. 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?

  8. 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?

  9. 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.

Formula sheet