Lesson 6 of 8 · 17 min

The cosine rule

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

What you will be able to do

  • Use c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C to find a side from two sides and the included angle.
  • Rearrange to cos⁡C=a2+b2−c22ab\cos C = \frac{a^2 + b^2 - c^2}{2ab} to find an angle from three sides.
  • Explain how the cosine rule extends Pythagoras' theorem.
  • Decide between the sine rule and the cosine rule.

Two straight roads leave a country town at an angle of 68∘68^\circ. One farm gate is 5.2 km along the first road, another is 7.9 km along the second. How far apart are the gates, as the crow flies?

You know two sides and the angle between them. No side comes with its opposite angle, so the sine rule can't start. This is the job of the cosine rule.

Key idea

The cosine rule

In any triangle ABCABC,

c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C

The angle CC is the angle between sides aa and bb, and cc is the side opposite it. The same pattern works for any side:

a2=b2+c2−2bccos⁡Ab2=a2+c2−2accos⁡Ba^2 = b^2 + c^2 - 2bc\cos A \qquad b^2 = a^2 + c^2 - 2ac\cos B

The QCAA formula book gives the first form.

Interactive

Pythagoras with a correction

Set C=90∘C = 90^\circ. Then cos⁡C=0\cos C = 0, the last term vanishes and the rule becomes Pythagoras: c2=a2+b2c^2 = a^2 + b^2. Make CC smaller than 90∘90^\circ and cc shrinks; make it obtuse and cos⁡C\cos C turns negative, so cc grows.

So the cosine rule is Pythagoras' theorem with a correction term, −2abcos⁡C-2ab\cos C, for angles that aren't 90∘90^\circ. A sharper angle between the two sides pulls their ends closer together; a wider angle pushes them apart.

Worked example

The distance between two farm gates

  • Simple familiar
  • Technology active

Two straight roads leave a town at an angle of 68∘68^\circ. One farm gate is 5.2 km along the first road and another is 7.9 km along the second. Calculate the straight-line distance between the two gates, correct to two decimal places.

4 steps

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

Method

  1. Two sides and the included angle → cosine rule.

  2. Substitute into c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C.

  3. Evaluate in one go on the calculator, then take the square root.

Watch out for

  • Giving d2=58.67d^2 = 58.67 as the answer.

  • Calculating (27.04+62.41−82.16)cos⁡68∘(27.04 + 62.41 - 82.16)\cos 68^\circ.

In triangle ABCABC, a=8a = 8 cm, b=11b = 11 cm and C=40∘C = 40^\circ. Calculate the length of cc, correct to two decimal places.

in cm

Round to 2 decimal places.

Common mistake

Calculator order

Type the whole right-hand side in one go, 82+112−2×8×11×cos⁡(40)8^2 + 11^2 - 2 \times 8 \times 11 \times \cos(40), and let the calculator do the order of operations. Working out 64+121−2×8×11=964 + 121 - 2 \times 8 \times 11 = 9 first and then multiplying by cos⁡40∘\cos 40^\circ is the most common cosine rule error.

If you know all three sides, rearrange the rule to make cos⁡C\cos C the subject:

cos⁡C=a2+b2−c22ab\cos C = \frac{a^2 + b^2 - c^2}{2ab}

The side subtracted on top, cc, is the side opposite the angle you want. The other two sides are the ones that meet at that angle.

Worked example

The largest angle of a triangular frame

  • Simple familiar
  • Technology active

A triangular steel frame has sides of 7 m, 9 m and 13 m. Calculate the size of 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. The largest angle is opposite the longest side.

  2. cos⁡C=a2+b2−c22ab\cos C = \frac{a^2 + b^2 - c^2}{2ab} with cc opposite the angle.

  3. Take cos⁡−1\cos^{-1}; a negative value gives an obtuse angle.

Watch out for

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

  • Thinking a negative cosine is an error.

Tip

No ambiguity with cosine

Unlike sine, cosine is negative for obtuse angles. If cos⁡C\cos C comes out negative, cos⁡−1\cos^{-1} gives an obtuse angle automatically. So the cosine rule is the safe choice for the largest angle of a triangle.

A triangle has sides of 5 m, 6 m and 8 m. Calculate the size of its largest angle, correct to one decimal place.

in circ

Round to 1 decimal place.

Use the sine rule when you know…

  • two angles and any side, or
  • two sides and an angle opposite one of them.

You have a complete pair: a side and its opposite angle.

Use the cosine rule when you know…

  • two sides and the angle between them (find the third side), or
  • all three sides (find an angle).

There is no complete pair.

A triangular garden bed has sides of 2.4 m and 3.1 m, and the angle opposite the 3.1 m side is 75∘75^\circ. You want the angle opposite the 2.4 m side. Which rule should you use first?

Choose one answer
Where the cosine rule comes from

Put CC at the origin with side bb along the xx-axis, so A=(b,0)A = (b, 0). Then BB is a distance aa from CC at angle CC, so B=(acos⁡C,asin⁡C)B = (a\cos C, a\sin C).

Pythagoras on the horizontal and vertical gaps between AA and BB:

c2=(b−acos⁡C)2+(asin⁡C)2=b2−2abcos⁡C+a2(cos⁡2C+sin⁡2C)c^2 = (b - a\cos C)^2 + (a\sin C)^2 = b^2 - 2ab\cos C + a^2(\cos^2 C + \sin^2 C)

Since cos⁡2C+sin⁡2C=1\cos^2 C + \sin^2 C = 1 (Pythagoras in the unit circle), c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C.

Exam tip

In the exam

Write the rule, substitute, write the value of c2c^2, then the square root. For an angle, show the fraction for cos⁡C\cos C with numbers in it before you take cos⁡−1\cos^{-1}. A negative cosine is not an error: it means the angle is obtuse.

Summary

  • c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C: two sides and the included angle give the third side.

  • cos⁡C=a2+b2−c22ab\cos C = \dfrac{a^2 + b^2 - c^2}{2ab}: three sides give any angle; the subtracted side is opposite the angle.

  • When C=90∘C = 90^\circ the cosine rule is Pythagoras' theorem.

  • A negative cos⁡C\cos C means CC is obtuse; cos⁡−1\cos^{-1} handles it.

  • Complete pair → sine rule. No pair → cosine rule.

Finished the lesson?

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

Lesson 6 of 80% read

Save your progress with a free account