Lesson 3 of 8 · 16 min

The cosine rule

Use the cosine rule to find the third side from two sides and the included angle, and to find any angle from three sides.

What you will be able to do

  • Recognise when the sine rule cannot start: two sides and the included angle (SAS), or three sides (SSS).
  • Use c2=a2+b2−2abcos⁡(C)c^2 = a^2 + b^2 - 2ab\cos(C) to find the third side.
  • Rearrange it to cos⁡(C)=a2+b2−c22ab\cos(C) = \frac{a^2 + b^2 - c^2}{2ab} and find any angle, including an obtuse one.
  • Explain the cosine rule as Pythagoras' theorem with a correction term.

Two roads leave a roundabout at an angle of 50∘50^\circ. One town is 5 km along the first road and another is 7 km along the second. How far apart are the towns, as the crow flies?

Try the sine rule: you know b=5b = 5, c=7c = 7 and the angle A=50∘A = 50^\circ between them, but not aa, the side opposite AA. No complete pair, so the sine rule is stuck. The cosine rule is built for exactly this.

Two sides and the angle between them (SAS). The cosine rule finds the side opposite that angle.

Key idea

The cosine rule

In any triangle ABCABC,

a2=b2+c2−2bccos⁡(A)a^2 = b^2 + c^2 - 2bc\cos(A)

The angle in the cosine term is the one between the two sides on the right, and opposite the side on the left. The formula book writes the same rule with other letters: c2=a2+b2−2abcos⁡(C)c^2 = a^2 + b^2 - 2ab\cos(C).

If A=90∘A = 90^\circ, then cos⁡(A)=0\cos(A) = 0 and the rule becomes a2=b2+c2a^2 = b^2 + c^2: Pythagoras' theorem. The term −2bccos⁡(A)-2bc\cos(A) is a correction. When AA is acute, cos⁡(A)>0\cos(A) > 0, so aa is shorter than the hypotenuse would be; when AA is obtuse, cos⁡(A)<0\cos(A) < 0, so aa is longer.

Put AA at the origin. Then CC is at (bcos⁡(A),bsin⁡(A))(b\cos(A), b\sin(A)) and aa is the distance from BB to CC.

Proof of the cosine rule

With AA at the origin and ABAB along the xx-axis, B=(c,0)B = (c, 0) and C=(bcos⁡(A),bsin⁡(A))C = (b\cos(A), b\sin(A)), by the unit circle definitions scaled by bb. By the distance formula,

a2=(bcos⁡(A)−c)2+(bsin⁡(A))2a^2 = (b\cos(A) - c)^2 + (b\sin(A))^2 =b2cos⁡2(A)−2bccos⁡(A)+c2+b2sin⁡2(A)= b^2\cos^2(A) - 2bc\cos(A) + c^2 + b^2\sin^2(A) =b2(cos⁡2(A)+sin⁡2(A))+c2−2bccos⁡(A)= b^2\left(\cos^2(A) + \sin^2(A)\right) + c^2 - 2bc\cos(A)

The Pythagorean identity makes the bracket 1, so a2=b2+c2−2bccos⁡(A)a^2 = b^2 + c^2 - 2bc\cos(A). The coordinates work for an obtuse AA too, so the rule holds in every triangle.

Worked example

Find the third side with the cosine rule

  • Simple familiar
  • Technology active

In triangle ABCABC, b=7.5b = 7.5 m, c=11.2c = 11.2 m and A=38∘A = 38^\circ. Find aa, correct to two decimal places.

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Check the angle is between the two known sides.

  2. Substitute into a2=b2+c2−2bccos⁡(A)a^2 = b^2 + c^2 - 2bc\cos(A).

  3. Evaluate in one line, then take the square root.

Watch out for

  • Forgetting the square root and giving 49.3049.30.

  • Adding 2bccos⁡(A)2bc\cos(A) instead of subtracting it.

In triangle ABCABC, b=3b = 3, c=5c = 5 and A=60∘A = 60^\circ. Find the exact length of aa, without a calculator.

a =
Reads asYour answer shows here as maths.

If all three sides are known, rearrange the rule to make the cosine the subject. The angle you want goes in the cosine; its opposite side is the one being subtracted.

The cosine rule for an angle
cos⁡(A)=b2+c2−a22bc\cos(A) = \frac{b^2 + c^2 - a^2}{2bc}

Tip

The cosine rule never lies about obtuse angles

cos⁡−1\cos^{-1} gives angles from 0∘0^\circ to 180∘180^\circ, and every cosine value in that range belongs to exactly one angle. A negative cosine means an obtuse angle. That is why the cosine rule has no ambiguous case.

Worked example

Find an obtuse angle from three sides

  • Simple familiar
  • Technology active

A triangle has sides 5 cm, 7 cm and 10 cm. Find its largest angle, correct to one decimal place.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Pick the angle; its opposite side is subtracted.

  2. Evaluate cos⁡(θ)=b2+c2−a22bc\cos(\theta) = \frac{b^2 + c^2 - a^2}{2bc}.

  3. Use cos⁡−1\cos^{-1}; a negative cosine means an obtuse angle.

Watch out for

  • Subtracting the wrong side, which finds a different angle.

  • Dropping the minus sign and getting 68.2∘68.2^\circ.

A triangle has sides 3 cm, 5 cm and 7 cm. Find its largest angle, without a calculator.

in circ

Common mistake

Evaluating the cosine rule in the wrong order

a2=b2+c2−2bccos⁡(A)a^2 = b^2 + c^2 - 2bc\cos(A) means "subtract 2bccos⁡(A)2bc\cos(A)". Working left to right on a calculator as (b2+c2−2bc)×cos⁡(A)(b^2 + c^2 - 2bc) \times \cos(A) gives nonsense. Type the whole right-hand side in one line, then take the square root.

Interactive

Try the cosine rule

This is the roundabout problem: a≈5.4a \approx 5.4 km. Push AA past 90∘90^\circ and watch aa become longer than b2+c2\sqrt{b^2 + c^2}. Choose "All three sides" to find an angle instead.

Summary

  • Use the cosine rule for SAS (two sides and the included angle) or SSS (three sides).

  • Side: a2=b2+c2−2bccos⁡(A)a^2 = b^2 + c^2 - 2bc\cos(A), then take the square root.

  • Angle: cos⁡(A)=b2+c2−a22bc\cos(A) = \frac{b^2 + c^2 - a^2}{2bc}, with the side opposite the angle subtracted.

  • A negative cosine means an obtuse angle; the cosine rule is never ambiguous.

  • With A=90∘A = 90^\circ it is Pythagoras' theorem; the −2bccos⁡(A)-2bc\cos(A) term corrects for the angle.

Finished the lesson?

Try the 2 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 3 of 80% read

Save your progress with a free account