topic badge

3.09 The cosine rule

Lesson

In sections 3.07 and 3.08 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 angles of a triangle when you know all three sides

We will explore each of these uses separately.

Finding a side length

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

In the triangle on the right, we want to 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 and angles 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+b22abcosC
$x^2$x2 $=$= $10^2+4^2-2\times10\times4\cos32^\circ$102+422×10×4cos32°
  $=$= $100+16-80\cos32^\circ$100+1680cos32°
  $=$= $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. We also need to use $\cos^{-1}$cos1 to find the angle after rearranging.

In this example, we want to solve for the unknown angle $x$x in the triangle, correct to the nearest minute.


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+b2c22ab
$\cos x$cosx $=$= $\frac{6^2+7^2-9^2}{2\times6\times7}$62+72922×6×7
  $=$= $\frac{4}{84}$484
$x$x $=$= $\cos^{-1}\left(\frac{4}{84}\right)$cos1(484)
  $=$= $87^\circ16'$87°16 (to the nearest minute)

Exploring the rule

The following interactive demonstrates that the cosine rule holds regardless of the angles or size and shape of the triangle.

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+b22abcosC
  $=$= $a^2+b^2-2ab\cos90^\circ$a2+b22abcos90°
  $=$= $a^2+b^2-2ab\times0$a2+b22ab×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.

Example 1

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

Give your answer correct to $2$2 decimal places.

Example 2

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

Write your answer correct to two decimal places.

Example 3

Find the length of $c$c using the cosine rule.

Write your answer correct to two decimal places.

Outcomes

MS2-12-3

interprets the results of measurements and calculations and makes judgements about their reasonableness, including the degree of accuracy and the conversion of units where appropriate

MS2-12-4

analyses two-dimensional and three-dimensional models to solve practical problems

What is Mathspace

About Mathspace