The cosine rule
In Year 12 Mathematical Methods (Queensland, QCAA), the cosine rule relates the three sides of any triangle to one of its angles: \(c^{2}=a^{2}+b^{2}-2ab\cos C\). Use it to find the third side from two sides and the included angle (SAS), and its rearrangement to find an angle from three sides (SSS) — and learn when to choose it over the sine rule, ready for bearings and navigation problems.
The cosine rule is a relationship that holds in every triangle, not just right-angled ones. For a triangle with sides \(a\), \(b\), \(c\) and the angle \(C\) opposite side \(c\),
\(c^{2}=a^{2}+b^{2}-2ab\cos C.\)
The angle \(C\) is the one between (included by) the sides \(a\) and \(b\); the side \(c\) is the one opposite it. This lets you solve two kinds of problem: given two sides and the included angle (SAS), find the third side; and given all three sides (SSS), find any angle by rearranging to \(\cos C=\dfrac{a^{2}+b^{2}-c^{2}}{2ab}\).
Choosing the right rule matters. The cosine rule handles SAS and SSS; the sine rule is used when a side is paired with its opposite angle (as in AAS, ASA, or the ambiguous SSA case). If the cosine rule gives \(\cos C<0\), the angle \(C\) is obtuse.
The cosine rule for a side (SAS):
Rearranged to find an angle (SSS):
How to use the cosine rule
- Decide which rule. Two sides and the angle between them, or all three sides \(\Rightarrow\) cosine rule. A side with its opposite angle \(\Rightarrow\) sine rule.
- To find a side (SAS): label the known sides \(a\), \(b\) and the included angle \(C\), then \(c^{2}=a^{2}+b^{2}-2ab\cos C\). Keep the term \(-2ab\cos C\) negative, evaluate, then take the square root.
- To find an angle (SSS): put the side opposite the wanted angle as \(c\), then \(\cos C=\dfrac{a^{2}+b^{2}-c^{2}}{2ab}\) and \(C=\cos^{-1}(\ldots)\). The largest angle is opposite the longest side.
- Check reasonableness. A longer side faces a bigger angle; the three angles add to \(180^\circ\); an obtuse angle appears as a negative cosine.
Two sides and the included angle, so use the cosine rule.
| \(AC^{2}\) | \(=\) | \(8^{2}+5^{2}-2(8)(5)\cos 60^\circ\) |
| \(\) | \(=\) | \(89-40=49\) |
| \(AC\) | \(=\) | \(7\) |
The largest angle is opposite the longest side \(7\), so \(c=7\).
| \(\cos C\) | \(=\) | \(\dfrac{3^{2}+5^{2}-7^{2}}{2(3)(5)}=-\dfrac{1}{2}\) |
| \(C\) | \(=\) | \(120^\circ\) |
\(\cos 120^\circ=-\dfrac{1}{2}\), so the term becomes a plus.
| \(c^{2}\) | \(=\) | \(8^{2}+4^{2}-2(8)(4)\cos 120^\circ\) |
| \(\) | \(=\) | \(80+32=112\) |
| \(c\) | \(=\) | \(\sqrt{112}=4\sqrt{7}\) |
Two sides and the included angle (SAS), so use the cosine rule.
| \(OB^{2}\) | \(=\) | \(40^{2}+30^{2}-2(40)(30)\cos 100^\circ\) |
| \(\) | \(=\) | \(2916.76\) |
| \(OB\) | \(\approx\) | \(54.0\text{ km}\) |
Common pitfalls
Frequently asked questions
What is the cosine rule?
For any triangle, \(c^{2}=a^{2}+b^{2}-2ab\cos C\), where \(C\) is the angle between sides \(a\) and \(b\), and \(c\) is the side opposite \(C\).
When do you use the cosine rule instead of the sine rule?
Use the cosine rule for two sides and the included angle (find a side), or three sides (find an angle). Use the sine rule when a side is paired with its opposite angle.
How do you find an angle using the cosine rule?
Rearrange to \(\cos C=\dfrac{a^{2}+b^{2}-c^{2}}{2ab}\), then take \(\cos^{-1}\). For sides \(3,5,7\), the angle opposite \(7\) is \(120^\circ\).
How do you find the third side?
Substitute into \(c^{2}=a^{2}+b^{2}-2ab\cos C\) and take the square root. Sides \(8\) and \(5\) with a \(60^\circ\) angle give \(c=7\).
What if the included angle is obtuse?
Then \(\cos C<0\), so \(-2ab\cos C\) becomes positive and the opposite side is longer. Sides \(8,4\) with \(120^\circ\) give \(c^{2}=112\).
Which angle goes into the formula?
The included angle — the one between the two sides used — and the side on the left is the side opposite that angle.