topic badge

7.06 The cosine rule

Lesson

Introduction

We previously 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:

A triangle with two side lengths and one angle known. Ask your teacher for more information.

Two side lengths and one angle are known, but we can't match the known sides with a known angle.

A triangle with 3 side lengths known. Ask your teacher for more information.

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.

Cosine rule to find a side

If the three side lengths in a triangle are a, b and c, with an angle C opposite the side with length c, then c^2=a^2+b^2-2ab\cos C.

Exploration

The cosine rule is demonstrated in the following applet.

Loading interactive...

We can use the cosine rule to find an unknown side of any triangle in which we know the lengths of the two other sides and the size of the opposite angle.

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 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.

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

\displaystyle c^2\displaystyle =\displaystyle a^2+b^2-2ab\cos C
\displaystyle =\displaystyle a^2+b^2-2ab\cos \left(90^\circ \right)
\displaystyle =\displaystyle a^2+b^2-2ab\times 0
\displaystyle =\displaystyle a^2+b^2

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

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.

The actual letters used in the formula do not have to be the same as the triangle. The convention is that the lengths of sides are given in lowercase letters a,b,c,q,u,v,s,t and the size of the angles given in capital letters A,B,C,Q,U,V,S,T. \begin{aligned} c^2&=a^2+b^2-2ab\cos C\\ v^2&=s^2+t^2-2st\cos V\\ w^2&=u^2+v^2-2uv\cos W \end{aligned}

Examples

Example 1

A triangle with 2 sides of 30 and 13 and included angle of 33 degrees. The third side is labelled A.

Find the length of a using the cosine rule. Round your answer to two decimal places.

Worked Solution
Create a strategy

Use the cosine rule a^2=b^2+c^2-2bc\cos A.

Apply the idea
\displaystyle a^2\displaystyle =\displaystyle b^2+c^2-2bc\cos AWrite the formula
\displaystyle a^2\displaystyle =\displaystyle 13^2+30^2-2\times 13\times 30\cos 33\degree Substitute \, b=13, \, c=30, \, A=33
\displaystyle \approx\displaystyle 414.83696 Evaluate
\displaystyle a\displaystyle \approx\displaystyle \sqrt{414.83696} Take the square root of both sides
\displaystyle a\displaystyle \approx\displaystyle 20.37Evaluate and round
Idea summary

If we have a problem involving 3 side lengths and one angle of a non-right angled triangle, we can use the cosine rule to find the unknown side length:

\displaystyle c^2=a^2+b^2-2ab\cos C
\bm{c}
is the side opposite angle C
\bm{a}
is another side length
\bm{b}
is another side length

Find an angle

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

When looking to solve for an unknown angle, the equation can also be rearranged and written as \cos C=\dfrac{a^2+b^2-c^2}{2ab}.

Examples

Example 2

Find the value of angle w using the cosine rule. Write your answer correct to two decimal places.

A triangle where x degrees is the angle opposite a side of 9, and the remaining side lengths are 6 and 7.
Worked Solution
Create a strategy

Use the rearranged formula of the cosine rule given by \cos C=\dfrac{a^2+b^2-c^2}{2ab}, where w corresponds to C.

Apply the idea
\displaystyle \cos C\displaystyle =\displaystyle \dfrac{a^2+b^2-c^2}{2ab}Write the formula
\displaystyle \cos w\displaystyle =\displaystyle \frac{32^2+19^2-25^2}{2\times 32\times 19}Susbtitute the values
\displaystyle \cos w\displaystyle =\displaystyle \dfrac{5}{8}Evaluate
\displaystyle w\displaystyle =\displaystyle \cos ^{-1}\left(\frac{5}{8}\right)Take the inverse cosine of both sides
\displaystyle \approx\displaystyle 51.32\degreeEvaluate and round
Idea summary

If we have a problem involving 3 side lengths and one angle of a non-right angled triangle, we can use the cosine rule to find the unknown angle:

\displaystyle \cos C=\dfrac{a^2+b^2-c^2}{2ab}
\bm{c}
is the side opposite angle C
\bm{a}
is another side length
\bm{b}
is another side length

Outcomes

VCMMG367 (10a)

Establish the sine, cosine and area rules for any triangle and solve related problems.

What is Mathspace

About Mathspace