Cosine Rule
Every question with a fully worked solution.
- Cosine Rule - Video - The cosine rule Watch
Theory
The cosine rule \(a^2=b^2+c^2-2bc\cos A\) works in any triangle, not just a right-angled one. This Year 11 Mathematics Advanced page shows how to find a side from two sides and the included angle, find an angle from three sides, recognise an obtuse angle from a negative cosine, give exact answers, and apply the rule to parallelograms, quadrilaterals and bearings.
In \(\triangle ABC\) the side opposite each angle has the matching small letter: \(a=BC\) is opposite \(A\), \(b=CA\) is opposite \(B\), and \(c=AB\) is opposite \(C\). The included angle between two sides is the angle where they meet; for sides \(b\) and \(c\) it is \(A\).
The cosine rule \(a^2=b^2+c^2-2bc\cos A\) links the three sides with one angle. The side on the left is always the side opposite the angle in the cosine. When \(A=90^\circ\), \(\cos A=0\) and the rule becomes Pythagoras' theorem, so the cosine rule is Pythagoras' theorem with a correction term for a non-right angle.
Use it in two situations. Given two sides and the included angle, it gives the third side. Given all three sides, the rearranged form \(\cos A=\dfrac{b^2+c^2-a^2}{2bc}\) gives any angle. The largest angle is opposite the longest side and the smallest angle is opposite the shortest side.
The cosine of an obtuse angle is negative (\(\cos(180^\circ-\theta)=-\cos\theta\)). So if \(\cos A\lt 0\) the angle is obtuse, and \(\cos^{-1}\) on the calculator gives it directly, for example \(\cos 120^\circ=-\cos 60^\circ=-\dfrac{1}{2}\). If \(\cos A=0\) the angle is a right angle.
If the known angle is not between the two known sides, the cosine rule still works but gives a quadratic in the unknown side. Solve it and reject any negative (or impossible) length. In parallelograms and quadrilaterals, find the angle you need first (co-interior angles add to \(180^\circ\), opposite sides are equal), then use the rule in a triangle formed by a diagonal.
The cosine rule for a side (the angle is between the other two sides):
Rearranged for an angle when all three sides are known:
Exact cosines of obtuse angles that appear in exact questions:
| Sign of \(\cos\theta\) | Angle \(\theta\) |
|---|---|
| positive | acute (\(0^\circ\lt \theta\lt 90^\circ\)) |
| zero | right angle (\(\theta=90^\circ\)) |
| negative | obtuse (\(90^\circ\lt \theta\lt 180^\circ\)) |
Finding a side (two sides and the included angle)
- Sketch the triangle and check the angle is between the two known sides.
- Substitute into \(a^2=b^2+c^2-2bc\cos A\), with \(a\) the side opposite the known angle, and evaluate.
- Square root and round at the end; for an exact answer use exact values and simplify the surd.
Finding an angle (three sides)
- Identify the angle: the largest angle is opposite the longest side, the smallest opposite the shortest.
- Substitute into \(\cos A=\dfrac{b^2+c^2-a^2}{2bc}\), subtracting the square of the side opposite the angle.
- Use \(\cos^{-1}\) and round as asked. A negative cosine means an obtuse angle.
Harder problems
- Find the angle you need from the given facts: back bearings (add or subtract \(180^\circ\)), co-interior angles, or opposite sides of a parallelogram.
- Apply the cosine rule; if the unknown side is next to the known angle, solve the quadratic and keep the positive root.
- Continue with the unrounded value if another step is needed, such as a second angle or a bearing.
The \(47^\circ\) angle is between the two known sides, so use the cosine rule for \(a=BC\).
| \(a^2\) | \(=\) | \(b^2+c^2-2bc\cos A\) |
| \(\) | \(=\) | \(9.3^2+6.8^2-2\times9.3\times6.8\times\cos 47^\circ\) |
| \(\) | \(=\) | \(132.73-126.48\cos 47^\circ\) |
| \(\) | \(=\) | \(46.470\ldots\) |
| \(a\) | \(=\) | \(6.816\ldots\) |
\(\therefore BC=6.8\text{ cm}\) (1 d.p.)
The largest angle \(\theta\) is opposite the longest side, \(13\text{ cm}\), so \(13^2\) is subtracted.
| \(\cos\theta\) | \(=\) | \(\dfrac{7^2+9^2-13^2}{2\times7\times9}\) |
| \(\) | \(=\) | \(\dfrac{49+81-169}{126}\) |
| \(\) | \(=\) | \(-\dfrac{39}{126}=-\dfrac{13}{42}\) |
| \(\theta\) | \(=\) | \(108.030\ldots^\circ\) |
| \(\) | \(\approx\) | \(108^\circ 2'\) |
The cosine is negative, so the angle is obtuse. \(\therefore\) the largest angle is \(108^\circ 2'\) (nearest minute).
The \(120^\circ\) angle is opposite \(AC=13\), so write the rule for \(AC^2\). The unknown \(x\) is next to the angle, so a quadratic results. Use \(\cos 120^\circ=-\cos 60^\circ=-\dfrac{1}{2}\).
| \(AC^2\) | \(=\) | \(AB^2+BC^2-2(AB)(BC)\cos B\) |
| \(169\) | \(=\) | \(49+x^2-2\times7\times x\times\left(-\dfrac{1}{2}\right)\) |
| \(169\) | \(=\) | \(49+x^2+7x\) |
| \(0\) | \(=\) | \(x^2+7x-120\) |
| \(0\) | \(=\) | \((x+15)(x-8)\) |
\(x=-15\) or \(x=8\). \(x\) is a length, so \(x\gt 0\) and \(x=-15\) is rejected.
\(\therefore x=8\)
(i) Find the distance \(PB\), correct to 1 decimal place.
(ii) Find the bearing of \(B\) from \(P\), correct to the nearest degree.
(i) Find the angle at \(A\) first. The bearing of \(P\) from \(A\) is \(035^\circ+180^\circ=215^\circ\), so \(\angle PAB=215^\circ-150^\circ=65^\circ\).
| \(PB^2\) | \(=\) | \(12^2+20^2-2\times12\times20\times\cos 65^\circ\) |
| \(\) | \(=\) | \(544-480\cos 65^\circ\) |
| \(\) | \(=\) | \(341.143\ldots\) |
| \(PB\) | \(=\) | \(18.470\ldots\) |
\(\therefore PB=18.5\text{ km}\) (1 d.p.)
(ii) Find \(\angle APB\) with the three sides, using the unrounded \(PB\):
| \(\cos\angle APB\) | \(=\) | \(\dfrac{12^2+18.470\ldots^2-20^2}{2\times12\times18.470\ldots}\) |
| \(\) | \(=\) | \(0.192\ldots\) |
| \(\angle APB\) | \(=\) | \(78.926\ldots^\circ\) |
At \(A\) the path turns clockwise from \(035^\circ\) to \(150^\circ\), so from \(P\), \(B\) is clockwise of \(A\):
| \(\text{Bearing of }B\) | \(=\) | \(035^\circ+78.926\ldots^\circ\) |
| \(\) | \(=\) | \(113.926\ldots^\circ\) |
\(\therefore\) the bearing of \(B\) from \(P\) is \(114^\circ\) (nearest degree).
Common pitfalls
Frequently asked questions
What is the cosine rule?
In any triangle ABC, a squared equals b squared plus c squared minus 2bc cos A, where a is the side opposite angle A. Rearranged, cos A equals b squared plus c squared minus a squared, all over 2bc.
When do you use the cosine rule instead of the sine rule?
Use the cosine rule when you know two sides and the included angle (to find the third side), or all three sides (to find an angle). Use the sine rule when you know a side and its opposite angle.
How do you find an angle using the cosine rule?
Put the three sides into cos A equals b squared plus c squared minus a squared over 2bc, where a is the side opposite the angle you want. Then take inverse cos. A negative answer for cos A means the angle is obtuse.
Which angle is the largest in a triangle?
The largest angle is opposite the longest side, and the smallest angle is opposite the shortest side. So to find the largest angle, subtract the square of the longest side.
Why is the cosine rule like Pythagoras' theorem?
If angle A is 90 degrees then cos A is 0, the term 2bc cos A disappears, and the rule becomes a squared equals b squared plus c squared, which is Pythagoras' theorem.
What if the given angle is not between the two given sides?
Write the cosine rule for the side opposite the given angle. The unknown side then appears squared and to the first power, so you get a quadratic equation. Solve it and reject any negative length.