Cosine Rule (AI SL)
The cosine rule extends Pythagoras' theorem to triangles without a right angle. It's the tool for two situations: you know two sides and the angle between them and want the third side, or you know all three sides and want an angle. This page is part of the broader Triangle Trigonometry topic.
23 questions on this sub-topic.
The two formulas
Covered under IB syllabus reference SL3.2: the cosine rule \(c^2=a^2+b^2-2ab\cos C\). Both directions below are in the formula booklet - you just need to spot which one the given information points to.
Cosine rule for a side
\[c^2=a^2+b^2-2ab\cos C\]
Needs two sides and the angle trapped between them.
✓ In the formula bookletCosine rule for an angle
\[\cos C=\dfrac{a^2+b^2-c^2}{2ab}\]
Use when all three sides are known and an angle is missing.
✓ In the formula bookletNeed the wider syllabus context and GDC settings for trig? See Triangle Trigonometry's GDC guidance.
Worked examples
In triangle \(ABC\), \(a=8\) cm, \(b=11\) cm, and \(C=63^\circ.\) Find side \(c\) (3 significant figures).
Worked solution
Two sides and the included angle \((a, b, C)\) point to the cosine rule:
\(c^2 = a^2 + b^2 - 2ab\cos C.\) M1
\(a=8,\ b=11,\ C=63^\circ\):
\(c^2 = 64 + 121 - 2(8)(11)\cos 63^\circ = 185 - 176(0.4540\ldots) = 105.1\ldots\) A1
\(c = \sqrt{105.1\ldots} = 10.25\ldots\) M1 \(\approx 10.3\) (3 significant figures). A1
A triangle has sides 7 cm, 9 cm and 12 cm.
Find the largest angle (3 significant figures).
Worked solution
The largest angle faces the longest side, here \(12\). Call it \(\theta\), with the other sides \(7\) and \(9\). R1
\(\cos\theta = \frac{7^2 + 9^2 - 12^2}{2(7)(9)} = \frac{49 + 81 - 144}{126} = \frac{-14}{126}\) M1 \(= -0.1111\ldots\) A1
A negative cosine gives an obtuse angle: \(\theta = \cos^{-1}(-0.1111\ldots) = 96.37\ldots^\circ\) \(\approx 96.4^\circ\) (3 significant figures). A1
Common mistakes
- Reaching for the sine rule when the cosine rule is needed. If you know two sides and the angle between them (or all three sides), the sine rule can't be set up - you need the cosine rule instead.
- Getting scared of a negative cosine. \(\cos^{-1}\) of a negative number is a perfectly valid obtuse angle between \(90^\circ\) and \(180^\circ\) - don't discard it or assume you've made an error.
- Square-rooting too early. When finding a side, evaluate the whole right-hand side of \(c^2=a^2+b^2-2ab\cos C\) first, then take the square root - not partway through the arithmetic.
Ready to practise properly?
23 cosine-rule questions, marked instantly like the real exam.
Quick answers
When should I use the cosine rule instead of the sine rule?
Use the cosine rule when you know two sides and the angle between them (to find the third side), or when you know all three sides (to find any angle). If instead you have a side-angle opposite pair, use the sine rule.
What does a negative value inside \(\cos^{-1}\) mean?
A negative cosine gives an obtuse angle (between \(90^\circ\) and \(180^\circ\)) - it's a valid, expected result for the largest angle in an obtuse triangle, not a sign of an error.