topic badge
AustraliaVIC
VCE 11 General 2023

11.07 Cosine rule

Lesson

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.

 

Law of cosines

Consider the triangle $\triangle ABC$ABC with side lengths $a$a, $b$b and $c$c opposite the angles $A$A$B$B and $C$C respectively.

Then the cosine rule can be written as any one of the following equations:

$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

Notice that Pythagoras' theorem $c^2=a^2+b^2$c2=a2+b2 makes an appearance in the cosine rule $c^2=a^2+b^2-2ab\cos C$c2=a2+b22abcosC when $C$C has a measure of $90^\circ$90° which makes the term $2ab\cos C$2abcosC equal to zero.

 

Finding an angle

The worked example below demonstrates how the cosine rule can be applied to a triangle to find an unknown angle, given that all three side lengths are known.

 

Worked example

Example 1

Find angle $B$B in the triangle in degrees.

Think: All three side lengths are known, so we want to apply the cosine rule, to find the angle $B$B. The unknown angle $B$B appears opposite side $b$b.

Do:

$b^2$b2 $=$= $a^2+c^2-2ac\cos B$a2+c22accosB (Using the cosine rule)
$3^2$32 $=$= $5^2+6^2-2\times5\times6\cos B$52+622×5×6cosB (Substituting)
$9$9  $=$= $25+36-60\cos B$25+3660cosB (Simplifying the squares and multiplication)
$9-61$961 $=$= $-60\cos B$60cosB (Making the term with $B$B the subject)
$\frac{-52}{-60}$5260 $=$= $\cos B$cosB (Solving for $\cos B$cosB)
$\cos B$cosB $=$= $\frac{-52}{-60}$5260 (Flipping the equation)
$B$B $=$= $29.9^\circ$29.9°  ($1$1 d.p.) (Solving for $B$B)

Finding a side length

The worked example below demonstrates how the cosine rule can be applied to a triangle to find an unknown side length, given that it's opposite angle and two adjacent side lengths are known.

 

Worked example

example 2

Find the value of $x$x in the diagram.

Think: Label the triangle and identify the angle opposite the unknown. Choose the formula containing the labeled angle.

Do: Add the following labels to the triangle:

 $C$C is the known angle, $c$c is the unknown side. 

$c^2$c2 $=$= $a^2+b^2-2ab\cos C$a2+b22abcosC  
$c^2$c2 $=$= $8^2+11^2-2\times8\times11\cos39^\circ$82+1122×8×11cos39°  
$c^2$c2 $=$= $64+121-176\cos39^\circ$64+121176cos39°  
$c^2$c2 $=$= $48.22$48.22  
$c$c $=$= $6.94$6.94  

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

 

Practice questions

Question 1

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

Round your answer to two decimal places.

A triangle with its vertices labeled as A, B, and C. The angle at vertex A measures $33^\circ$33°. The side opposite to the $33^\circ$33° angle, side $BC$BC, is labeled $a$a units, indicating its unknown length. Side $AB$AB measures $30$30 units, as shown by the scale line beneath it. Side $AC$AC measures $13$13 units. Side $AB$AB and Side $AC$AC are adjacent to the $33^\circ$33° angle at vertex A.

Question 2

Question 3

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

Round your answer to two decimal places.

 

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.

 

Worked example

Example 3

Scientists can use a set of footprints to calculate an animal's step angle, which is a measure of walking efficiency. The angle marked here highlights the step angle. The closer the step angle is to $180^\circ$180°, the more efficiently the animal walked.  

Consider a set of footprints with length $AC=304$AC=304 cm, $BC=150$BC=150 cm and $AB=182$AB=182 cm. Find the step angle.

Think: We have three side lengths and need an angle so we can use the cosine rule, to find the angle $B$B.

In this case, we can use the equation $b^2=a^2+c^2-2ac\cos B$b2=a2+c22accosB OR use the rearranged form of the equation:

$\cos B=\frac{b^2-a^2-c^2}{-2ac}$cosB=b2a2c22ac

Do: Substitute known values and solve:

$\cos B$cosB $=$= $\frac{b^2-a^2-c^2}{-2ac}$b2a2c22ac (Using the rearranged cosine rule)
$\cos B$cosB $=$= $\frac{304^2-150^2-182^2}{-2\times150\times182}$3042150218222×150×182 (Substituting)
$B$B $=$= $\frac{36792}{-54600}$3679254600 (Simplifying the top and bottom)
$B$B $=$= $\cos^{-1}\left(\frac{-36792}{54600}\right)$cos1(3679254600) (Making $B$B the subject)
$B$B $=$= $132.36^\circ$132.36° ($2$2 d.p.) (Solving for $B$B)

Reflect: Notice that the cosine ratio of the angle is negative. This indicates that the angle will be greater than $90^\circ$90°.

 

Practice questions

Question 4

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

Round your answer to two decimal places.

Question 5

Dave leaves town along a road on a bearing of $169^\circ$169° and travels $26$26 km. Maria leaves the same town on another road with a bearing of $289^\circ$289° and travels $9$9 km.

Find the distance between them, $x$x.

Round your answer to the nearest km.

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