topic badge
AustraliaVIC
VCE 11 General 2023

11.07 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

The cosine rule (or the law of cosines) relates the lengths of the sides and the cosine of one of its angles. The cosine rule is useful for finding:

  • the third side of a triangle given two known side lengths and the angle between them, or

  • the angles of a triangle given all three sides lengths are known.

A triangle with vertices A, B, and C with their opposite sides lengths lower case a, b, and c, respectively.

Consider the triangle \triangle ABC, the cosine rule can be written as any one of the following equations: a^2 = b^2 + c^2 - 2bc\cos A \\ b^2 = a^2 + c^2 - 2ac\cos B \\ c^2 = a^2 + b^2 - 2ab\cos C

Notice that  Pythagoras' theorem  c^2= a^2 + b^2 makes an appearance in the cosine rule c^2 = a^2 + b^2 - 2ab\cos C when C has a measure of 90\degree which makes the term 2ab\cos C equal to zero.

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

We can see this relationship between the angle C and the opposite side length c by moving the slider on the interactive tool below.

Loading interactive...

As the size of angle C increases, the length of side c also increases.

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.

Examples

Example 1

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

Triangle A B C with angle of 33 degrees at A, side A C has length 13, A B has length 30 and C B is labelled  with an A.
Worked Solution
Create a strategy

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

Apply the idea

Since we know two sides and one angle, we can use the cosine rule to find a.

\displaystyle a^2\displaystyle =\displaystyle b^2+c^2-2bc\cos AUse the cosine rule
\displaystyle a^2\displaystyle =\displaystyle 13^2+30^2-2\times 13\times 30\cos 33\degree Substitute b=13, \, c=30, \, A=33\degree
\displaystyle a\displaystyle =\displaystyle \sqrt{13^2+30^2-2\times 13\times 30\cos 33\degree}Take the square root of both sides
\displaystyle \approx\displaystyle 20.37Evaluate and round

Example 2

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

Triangle A B C with angle of 25 degrees 35 minutes at C, side A C has length 15, C B has length 30 and A B is labelled as c.
Worked Solution
Create a strategy

Use the cosine rule c^2=a^2+b^2-2ab\cos C.

Apply the idea

Since we know two sides and one angle, we can use the cosine rule to find c.

\displaystyle c^2\displaystyle =\displaystyle a^2+b^2-2ab\cos CUse the cosine rule
\displaystyle c^2\displaystyle =\displaystyle 25^2+15^2-2\times 25\times 15\cos 25\degree 35' Substitute a=25, \, b=15, \, C=25\degree 35'\degree
\displaystyle c\displaystyle =\displaystyle \sqrt{25^2+15^2-2\times 25\times 15\cos 25\degree 35'}Take the square root of both sides
\displaystyle \approx\displaystyle 13.17Evaluate and round
Idea summary

The cosine rule to find a side:

\displaystyle c^2=a^2+b^2-2ab\cos C
\bm{c}
is the side length opposite angle C
\bm{a, \, b}
are the other two side lengths

Cosine rule to find an angle

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}

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

Examples

Example 3

Find the value of angle W using the cosine rule. Round your answer to two decimal places.

A triangle with angle of W, opposite side of length 25 and other side lengths of 19 and 32.
Worked Solution
Create a strategy

Use the cosine rule for angles: \cos C = \dfrac{a^2 +b^2 - c^2}{2ab}.

Apply the idea

Since we know all three side lengths, we can use the cosine rule to find the angle.

\displaystyle \cos C\displaystyle =\displaystyle \dfrac{a^2+b^2-c^2}{2ab}Use the cosine rule
\displaystyle \cos w\displaystyle =\displaystyle \frac{32^2+19^2-25^2}{2\times 32\times 19}Susbtitute a=32, \, b=19, \, c=25,\,C=w
\displaystyle \cos w\displaystyle =\displaystyle \dfrac{5}{8}Evaluate the right side
\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

The cosine rule to find an angle:

\displaystyle \cos C=\dfrac{a^2+b^2-c^2}{2ab}
\bm{c}
is the side length opposite angle C
\bm{a, \,b}
are the other two sides lengths

Applications of the cosine rule

Mathematics is often thought of as being confined to the classroom and being separate from the real world. Students may ask themselves "What's the point of learning the cosine rule?" The truth is, part of the beauty in mathematics is that it can explain and measure so much of what is happening in the real and natural world.

Examples

Example 4

Find the length of the diagonal, x, in parallelogram ABCD. Round your answer to two decimal places.

Parallelogram A B C D with 130 degrees angle at D, sides A D of 35 and C D of 18. Ask your teacher for more information.
Worked Solution
Create a strategy

Use the cosine rule c^2=a^2+b^2-2ab\cos C.

Apply the idea
\displaystyle c^2\displaystyle =\displaystyle a^2+b^2-2ab\cos CUse the cosine rule
\displaystyle x^2\displaystyle =\displaystyle 18^2+35^2-2\times 18\times 35\cos 130\degree Substitute c=x, \, a=18, \, c=35,\,C=130\degree
\displaystyle x\displaystyle =\displaystyle \sqrt{18^2+35^2-2\times 18\times 35\cos 130\degree}Take the square root of both sides
\displaystyle \approx\displaystyle 48.57Evaluate and round

Example 5

Dave leaves town along a road on a bearing of 169\degree and travels 26 \text{ km}. Maria leaves the same town on another road with a bearing of 289\degree and travels 9\text{ km}. Find the distance between them, x. Round your answer to the nearest \text{km}.

Worked Solution
Create a strategy

Sketch the situation to identify the sides and angle.

Apply the idea

Here's the diagram showing the situation:

We have the side lengths, a=x,\,b=26,\,c=9, and one angle, A=289\degree - 169\degree = 120\degree.

\displaystyle a^2\displaystyle =\displaystyle b^2+c^2-2ab\cos AUse the cosine rule
\displaystyle x^2\displaystyle =\displaystyle 26^2+9^2-2\times 26\times 9\cos 120\degree Substitute the values
\displaystyle x\displaystyle =\displaystyle \sqrt{26^2+9^2-2\times 26\times 9\cos 120\degree}Take the square root of both sides
\displaystyle \approx\displaystyle 31 \text{ km}Evaluate and round
Idea summary

Use the cosine rule:

  • When two sides and the included angle are known and we need to find the third side.
  • When all three sides are known and we need to find an angle.

Outcomes

U2.AoS4.4

the sine rule (including the ambiguous case) and the cosine rule

U2.AoS4.10

solve practical problems requiring the calculation of side lengths or angles in non-right-angled triangles using the sine rule or the cosine rule as appropriate

What is Mathspace

About Mathspace