Cosine Rule (AA HL)
The cosine rule links all three sides of a triangle to one of its angles, so it's the tool to reach for whenever the sine rule can't be set up directly - when you know two sides and the angle between them, or all three sides and want an angle. This page covers both directions of the rule, with worked examples and the mistake that costs the most marks. It's part of the broader Triangles & Circular Functions topic.
11 questions on this sub-topic.
The cosine rule
Covered under IB syllabus reference SL3.2, alongside the sine rule \(\dfrac{a}{\sin A}=\dfrac{b}{\sin B}=\dfrac{c}{\sin C}\) and the area formula \(\tfrac12ab\sin C\). Both forms below are in the formula booklet.
Cosine rule
\[c^2=a^2+b^2-2ab\cos C\]
Label the angle you know (or want) as \(C\), with \(a,b\) the two sides enclosing it.
✓ In the formula bookletRearranged - finds an angle
\[\cos C=\dfrac{a^2+b^2-c^2}{2ab}\]
Use this form when all three sides are known and you need one of the angles.
Need the sine rule and triangle area formula too? See Triangles & Circular Functions.
Worked examples
In triangle \(ABC\), \(b=6,\ c=6,\ A=120^\circ.\) Find the exact length of \(a.\)
Worked solution
\(a^2 = 36 + 36 - 2(36)\cos120^\circ.\) M1
Use \(\cos120^\circ = -\tfrac12\): \(= 72 + 36.\) A1
\(= 108.\) A1
\(a = \sqrt{108}\) M1
\(= 6\sqrt3.\) A1
A triangle has sides \(a=7,\ b=9,\ c=12.\) Find the largest angle.
Worked solution
(opposite \(c\)): \(\cos C = \dfrac{49 + 81 - 144}{2(7)(9)}.\) M1
\(= \dfrac{-14}{126} = -0.1111.\) A1
Inverse cosine: M1
\(C \approx 96.4^\circ.\) A1
A triangle \(PQR\) has side lengths \(PQ=x,\ QR=x+2\) and \(PR=x+4,\) where \(x>0.\) It is known that \(\cos R=\dfrac45.\)
Show that \(x=6.\)
Worked solution
Side \(PQ=x\) is opposite angle \(R\), with adjacent sides \(QR=x+2\) and \(PR=x+4\): \(\cos R=\dfrac{QR^2+PR^2-PQ^2}{2\cdot QR\cdot PR}=\dfrac{(x+2)^2+(x+4)^2-x^2}{2(x+2)(x+4)}.\) M1
\((x+2)^2+(x+4)^2-x^2=x^2+12x+20.\) A1
\(2(x+2)(x+4)=2x^2+12x+16.\) A1
\(\dfrac{x^2+12x+20}{2x^2+12x+16}=\dfrac45\Rightarrow5(x^2+12x+20)=4(2x^2+12x+16).\) M1
\(5x^2+60x+100=8x^2+48x+64\Rightarrow3x^2-12x-36=0\Rightarrow x^2-4x-12=0.\) A1
\((x-6)(x+2)=0\Rightarrow x=6\) or \(x=-2.\) M1
Since \(x>0\) (a length), reject \(x=-2\): \(x=6.\) R1AG
Common mistakes
- Using 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 directly - reach for the cosine rule instead.
- Rounding too early. Carry full calculator accuracy through the cosine rule calculation, and only round the final answer - early rounding (especially before a square root) can shift the last significant figure.
- Labelling the wrong angle as \(C\). The angle in \(c^2=a^2+b^2-2ab\cos C\) must be the one enclosed by the sides you call \(a\) and \(b\) - relabel the triangle consistently before substituting.
Ready to practise properly?
11 cosine-rule questions, marked instantly like the real exam.
Quick answers
What is the cosine rule?
\(c^2 = a^2 + b^2 - 2ab\cos C\), used to find a side of a triangle when the other two sides and the angle between them are known.
How do you use the cosine rule to find an angle?
Rearrange to \(\cos C = \dfrac{a^2+b^2-c^2}{2ab}\), then take the inverse cosine. This works when all three sides are known.