Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Methods (Unit 3 & 4) Trigonometry using the sine and cosine rules

The cosine rule

20 practice questions 0 video lessons Theory + worked examples

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.

Key idea. Two sides + the included angle \(\Rightarrow\) cosine rule for the third side. Three sides \(\Rightarrow\) rearrange for an angle. A side with its opposite angle \(\Rightarrow\) sine rule.
Triangle labelled for the cosine rule (SAS)A triangle with apex C where sides a and b meet at angle C, and base c opposite C, illustrating c squared equals a squared plus b squared minus 2ab cos C. c a b C B A
Included angle \(C\) between \(a\) and \(b\); side \(c\) opposite: \(c^{2}=a^{2}+b^{2}-2ab\cos C\)
Finding the largest angle from three sides (SSS)A triangle with sides 3, 5 and 7. The unknown angle theta is opposite the longest side 7, and equals 120 degrees. 7 5 3 θ
Three sides \(\Rightarrow\) angle: \(\cos\theta=\dfrac{5^{2}+3^{2}-7^{2}}{2(5)(3)}=-\tfrac12\), so \(\theta=120^\circ\)

The cosine rule for a side (SAS):

\[c^{2}=a^{2}+b^{2}-2ab\cos C\]
c2=a2+b22abcosC

Rearranged to find an angle (SSS):

\[\cos C=\dfrac{a^{2}+b^{2}-c^{2}}{2ab}\qquad C=\cos^{-1}\!\left(\dfrac{a^{2}+b^{2}-c^{2}}{2ab}\right)\]
cosC=a2+b2c22ab
Which rule? The cosine rule needs SAS (two sides and the included angle) or SSS (three sides). If instead you have a side paired with its opposite angle, use the sine rule \(\dfrac{a}{\sin A}=\dfrac{b}{\sin B}=\dfrac{c}{\sin C}\).

How to use the cosine rule

  1. 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.
  2. 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.
  3. 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.
  4. Check reasonableness. A longer side faces a bigger angle; the three angles add to \(180^\circ\); an obtuse angle appears as a negative cosine.
Modelling. In bearings and navigation, two legs of a journey and the angle turned between them give a triangle: the cosine rule finds the direct distance, then the rearranged rule (or the sine rule) finds a bearing.
Example 1 — Third side (SAS)
In \(\triangle ABC\), \(AB=8\), \(BC=5\) and \(\angle B=60^\circ\). Find \(AC\).
Solution

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\)
AC=7
Example 2 — An angle (SSS)
A triangle has sides \(3\), \(5\) and \(7\). Find the largest angle.
Solution

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\)
C=120
Example 3 — Obtuse angle
Two sides are \(8\) and \(4\) with a \(120^\circ\) angle between them. Find the third side.
Solution

\(\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}\)
c=47
Example 4 — Navigation
A ship sails \(40\text{ km}\), turns, and sails \(30\text{ km}\); the interior angle is \(\angle OAB=100^\circ\). Find the distance \(OB\).
Solution

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}\)
Navigation triangleBase O to A is 40 km, A to B is 30 km at an interior angle of 100 degrees at A, and the direct distance O to B is about 54 km. 40 30 OB 100° O A B
OB54.0

Common pitfalls

Keep the sign of \(-2ab\cos C\). The term is subtracted. For an obtuse angle \(\cos C\) is already negative, so it turns into an addition — do not flip the sign yourself.
Use the included angle. The angle in \(c^{2}=a^{2}+b^{2}-2ab\cos C\) must be the one between \(a\) and \(b\); the side \(c\) is opposite it. Pairing the wrong angle gives a wrong answer.
Cosine or sine rule? If a side and its opposite angle are known, the sine rule is quicker. Reach for the cosine rule only for SAS (find a side) or SSS (find an angle).

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.

Create a free accountTrack your progress and save your work as you go.
Create free account