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:
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+c2−2bccosA
$b^2=a^2+c^2-2ac\cos B$b2=a2+c2−2accosB
$c^2=a^2+b^2-2ab\cos C$c2=a2+b2−2abcosC
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+b2−2abcosC when $C$C has a measure of $90^\circ$90° which makes the term $2ab\cos C$2abcosC equal to zero.
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.
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+c2−2accosB | (Using the cosine rule) |
$3^2$32 | $=$= | $5^2+6^2-2\times5\times6\cos B$52+62−2×5×6cosB | (Substituting) |
$9$9 | $=$= | $25+36-60\cos B$25+36−60cosB | (Simplifying the squares and multiplication) |
$9-61$9−61 | $=$= | $-60\cos B$−60cosB | (Making the term with $B$B the subject) |
$\frac{-52}{-60}$−52−60 | $=$= | $\cos B$cosB | (Solving for $\cos B$cosB) |
$\cos B$cosB | $=$= | $\frac{-52}{-60}$−52−60 | (Flipping the equation) |
$B$B | $=$= | $29.9^\circ$29.9° ($1$1 d.p.) | (Solving for $B$B) |
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.
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+b2−2abcosC | |
$c^2$c2 | $=$= | $8^2+11^2-2\times8\times11\cos39^\circ$82+112−2×8×11cos39° | |
$c^2$c2 | $=$= | $64+121-176\cos39^\circ$64+121−176cos39° | |
$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.
Find the length of $a$a using the cosine rule.
Round your answer to two decimal places.
Find the length of $c$c using the cosine rule.
Round your answer to two decimal places.
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.
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+c2−2accosB OR use the rearranged form of the equation:
$\cos B=\frac{b^2-a^2-c^2}{-2ac}$cosB=b2−a2−c2−2ac
Do: Substitute known values and solve:
$\cos B$cosB | $=$= | $\frac{b^2-a^2-c^2}{-2ac}$b2−a2−c2−2ac | (Using the rearranged cosine rule) |
$\cos B$cosB | $=$= | $\frac{304^2-150^2-182^2}{-2\times150\times182}$3042−1502−1822−2×150×182 | (Substituting) |
$B$B | $=$= | $\frac{36792}{-54600}$36792−54600 | (Simplifying the top and bottom) |
$B$B | $=$= | $\cos^{-1}\left(\frac{-36792}{54600}\right)$cos−1(−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°.
Find the length of the diagonal, $x$x, in parallelogram $ABCD$ABCD.
Round your answer to two decimal places.
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.