 7.03 The cosine rule

Lesson

In section 4.03 we used the sine rule to help us find information in non-right-angled triangles. By relating sides and their opposite angles, we were able to find an unknown side or angle.

But there are situations where the sine rule is not useful:  Two side lengths and one angle are known, but we can't match the known sides with a known angle to use the sine rule. Three side lengths are known, but there is no known angle to match with these sides.

In these situations, we will instead use the cosine rule.

The cosine rule

If the three side lengths in a triangle are $a$a, $b$b and $c$c, with an angle $C$C opposite the side with length $c$c, then:

$c^2=a^2+b^2-2ab\cos C$c2=a2+b22abcosC.

When looking to solve for an unknown angle, the equation can also be rearranged and written as:

$\cos C=\frac{a^2+b^2-c^2}{2ab}$cosC=a2+b2c22ab.

The cosine rule relates the lengths of all three sides in a triangle and the cosine of one of its angles. Therefore, the cosine rule is will help us to find:

• the third side of a triangle when you know two sides and the included angle (the angle between the two known sides)
• the angles of a triangle when you know all three sides

This rule can be proven using Pythagoras' theorem and right-angled trigonometry. There is an opportunity to work through a proof in the exercise.

Note: The formula can be written in terms of any of the sides or angles, familiarise yourself with the forms below and note the pattern. If a triangle is labelled differently we can adapt the rule using the pattern.

Cosine rule forms

$a^2=b^2+c^2-2bc\cos A$a2=b2+c22bccosA

$b^2=a^2+c^2-2ac\cos B$b2=a2+c22accosB

$c^2=a^2+b^2-2ab\cos C$c2=a2+b22abcosC

Finding a side length

To find a missing side using the cosine rule, we need to know two side lengths and their included angle. Worked example

Example 1

In the triangle on the right, find the length marked $x$x, correct to the nearest whole number.

The first thing to do is identify which side is opposite the given angle. This side is the subject of the formula. To find out which other values we are given we label the sides using $a$a,$b$b and $c$c.

Add the following labels to the triangle: So, $x$x corresponds to $c$c in the cosine rule formula. We substitute the values into the right places in the formula and solve for $x$x. The side of length $c$c must always be the side opposite the angle $C$C, but $a$a and $b$b can represent either of the other two side lengths.

 $c^2$c2 $=$= $a^2+b^2-2ab\cos C$a2+b2−2abcosC $x^2$x2 $=$= $10^2+4^2-2\times10\times4\cos32^\circ$102+42−2×10×4cos32° $=$= $100+16-80\cos32^\circ$100+16−80cos32° $=$= $48.15615$48.15615$\ldots$… $x$x $=$= $\sqrt{48.15615\ldots}$√48.15615… $=$= $7$7 (to the nearest whole number)

Finding an angle

To find a missing angle using the cosine rule, we need to know all three side lengths Worked example

Example 2

Solve for the unknown angle $x$x in the triangle on the right, correct to $1$1 decimal place.

All three side lengths are known, so we can apply the cosine rule. The unknown angle $x$x appears opposite the side with length $9$9, so we should label this side with a $c$c. Since we are finding an angle, we should use the second, rearranged version of the cosine rule given above.

Add the following labels to the triangle: Substitute these values, including $C=x$C=x, into the rearranged version of the cosine rule. Remember that $c$c must be the side opposite angle $C$C, and $a$a and $b$b can represent either of the other two side lengths.

 $\cos C$cosC $=$= $\frac{a^2+b^2-c^2}{2ab}$a2+b2−c22ab​ $\cos x$cosx $=$= $\frac{7^2+6^2-9^2}{2\times7\times6}$72+62−922×7×6​ $=$= $\frac{4}{84}$484​ $x$x $=$= $\cos^{-1}\left(\frac{4}{84}\right)$cos−1(484​) $=$= $87.3^\circ$87.3° (to $1$1 decimal place)
Pythagoras again?

What happens when the angle $C$C is $90^\circ$90°? This means the triangle is right-angled, and the side $c$c is the hypotenuse. Putting this into the cosine rule, we get:

 $c^2$c2 $=$= $a^2+b^2-2ab\cos C$a2+b2−2abcosC $=$= $a^2+b^2-2ab\cos\left(90^\circ\right)$a2+b2−2abcos(90°) $=$= $a^2+b^2-2ab\times0$a2+b2−2ab×0 $=$= $a^2+b^2$a2+b2

which is Pythagoras' theorem! This is why we say that the cosine rule is a generalisation of Pythagoras' theorem.

Practice questions

Question 1

Find the length of $a$a using the cosine rule. Question 2

Find the length of the diagonal, $x$x, in parallelogram $ABCD$ABCD. Question 3

Find the value of angle $B$B using the cosine rule. Question 4

Goal posts are 2 m apart. Buzz shoots for goal when he is $2.6$2.6 m from one post and $3.1$3.1 m from the other post. Find the size of the angle, $x$x, in which he can score a goal. Outcomes

4.2.1.3

establish and use the sine (ambiguous case is required) and cosine rules and the formula 𝐴rea=1/2 bc sin𝐴 for the area of a triangle

4.2.1.4

construct mathematical models using the sine and cosine rules in two- and three-dimensional contexts (including bearings in two-dimensional context) and use the model to solve problems; verify and evaluate the usefulness of the model using qualitative statements and quantitative analysis