6I

The cosine rule

Use the cosine rule to find a side from two sides and the included angle, or an angle from three sides, and see how it extends Pythagoras' theorem.

The sine rule needs a side and its opposite angle. When you know two sides and the angle between them, or all three sides, there is no such pair, and the sine rule can't start. The cosine rule handles exactly these two cases.

The cosine rule

Cosine rule
$$c^2 = a^2 + b^2 - 2ab\cos C \qquad\text{or}\qquad \cos C = \frac{a^2 + b^2 - c^2}{2ab}$$

The same pattern works for any side: the side on the left is opposite the angle on the right, and the other two sides appear in the rest. For example $a^2 = b^2 + c^2 - 2bc\cos A$.

When $C = 90^\circ$, $\cos C = 0$ and the rule is Pythagoras' theorem. The term $-2ab\cos C$ is the correction: if $C$ is acute, $\cos C \gt 0$ and $c$ is shorter than Pythagoras would give; if $C$ is obtuse, $\cos C \lt 0$ and $c$ is longer.

Pythagoras with a correction

C is at the origin and B is at (6, 0). Drag A. The true length AB is compared with what Pythagoras would give.

Try this

Try this: drag $A$ until angle $C$ is $90^\circ$ and check that the two lengths agree. Then make angle $C$ obtuse: which is bigger now, the true $AB$ or the Pythagoras value? Finally place $A$ so that $CA = 5$ and $AB = 7$, predict angle $C$ from $\cos C = \dfrac{36 + 25 - 49}{60}$, and compare with the readout.

Finding a side

Example 1●

In $\triangle ABC$, $b = 7$, $c = 11$ and $A = 38^\circ$. Find $a$, to 1 decimal place.

$a^2 = 7^2 + 11^2 - 2 \times 7 \times 11 \times \cos 38^\circ$
Two sides and the angle between them: the cosine rule, with a on the left because A is the known angle.
$a^2 \approx 48.65$
49 + 121 = 170 and 154 cos 38° ≈ 121.35.
$a \approx 7.0$
A length is positive, so take the positive root.

Finding an angle

Rearranging gives the angle directly. There is no ambiguous case here: $\cos\theta$ is positive for acute angles and negative for obtuse ones, so the sign of the fraction tells you which, and $\cos^{-1}$ on the calculator gives the right answer either way.

Example 2●●

A triangle has sides $5$, $8$ and $11$. Find its largest angle, to the nearest degree.

$\cos\theta = \dfrac{5^2 + 8^2 - 11^2}{2 \times 5 \times 8}$
The largest angle is opposite the longest side, 11.
$\cos\theta = \dfrac{-32}{80} = -0.4$
25 + 64 − 121 = −32, and 2 × 5 × 8 = 80.
$\theta = \cos^{-1}(-0.4) \approx 114^\circ$
Negative cosine: the angle is obtuse.
Example 3: exact values●●

In $\triangle PQR$, $q = 5$, $r = 8$ and $P = 60^\circ$. Find the exact length of $p$.

$p^2 = 25 + 64 - 2 \times 5 \times 8 \times \tfrac12 = 89 - 40 = 49$
Cosine rule with p on the left, and cos 60° = ½ exactly.
$p = 7$

Your turn

A triangle has sides $7$, $8$ and $13$. Find the exact size of its largest angle.

Show the working

The largest angle is opposite $13$: $\cos\theta = \dfrac{49 + 64 - 169}{2 \times 7 \times 8} = \dfrac{-56}{112} = -\dfrac12$. Cos is negative, so the angle is obtuse, with related angle $60^\circ$: $\theta = 120^\circ$.

Flashcards
Cosine rule for a side
$c^2 = a^2 + b^2 - 2ab\cos C$
Cosine rule for an angle
$\cos C = \dfrac{a^2 + b^2 - c^2}{2ab}$
When to use the cosine rule
Two sides and the included angle (SAS), or three sides (SSS).
Practice
  1. Which information calls for the cosine rule?

  2. In $\triangle ABC$, $a = 3$, $b = 8$ and $C = 60^\circ$. Find $c$.

  3. The cosine rule with $C = 90^\circ$ becomes:

  4. In $\triangle ABC$, $b = 6$, $c = 9$ and $A = 47^\circ$. Find $a$, to 2 decimal places.

  5. A triangle has sides $4$, $6$ and $8$. The angle opposite $8$ is:

  6. Find the largest angle of a triangle with sides $3$, $5$ and $7$, in degrees.

  7. Find the smallest angle of a triangle with sides $5$, $8$ and $9$, to the nearest degree.

  8. In $\triangle XYZ$, $x = 7$, $y = 8$ and $Z = 120^\circ$. Find $z$.

  9. Exam style: two ships leave port at the same time. One sails $12$ km on a bearing of $040^\circ\text{T}$, the other $15$ km on a bearing of $120^\circ\text{T}$. How far apart are they, to 1 decimal place?

  10. Exam style: in $\triangle ABC$, $b = 5$, $c = 3$ and $\cos A = \dfrac{3}{5}$. Find $a$.

Formula sheet