Worked examples
The question
Question: find side c of the triangle with a = 5, b = 7 and C = 60°.
1 Write the law of cosines
We know two sides, a and b, and the angle C between them.
The law of cosines: c² = a² + b² − 2ab cos C.
Side c is across from angle C.
c2 = a2 + b2 − 2ab cos C
It is Pythagoras with a correction.
When C is 90°, cos 90° is 0, and it is just Pythagoras.
C = 90°: cos 90° = 0 → c² = a² + b²
2 Put the numbers in
Now put the numbers in: a = 5, b = 7 and C = 60°.
c2 = 52 + 72 − 2 × 5 × 7 × cos 60°
3 Work it out
Squares first: 5² is 25, 7² is 49.
And 2 × 5 × 7 is 70.
c2 = 25 + 49 − 70 × cos 60°
Careful!
Times comes before take away.
Work out 70 × cos 60° first, then take it away.
Careful: not (74 − 70) × cos 60° ✗
The calculator gives cos 60°: exactly 0.5.
70 times that is 35.
cos 60° = 0.5
70 × 0.5 = 35
25 + 49 is 74.
c2 = 74 − 35
So c² = 39.
c2 = 39
4 Take the square root
c squared is 39.
So c is the square root of 39.
A side is never negative, so only the plus root.
c = √39
The calculator gives about 6.245.
To the nearest tenth, c ≈ 6.2.
c ≈ 6.2
5 Check
Let's check: the law turned around gives cos C back.
74 take away 39, over 70: 0.5.
cos C = a² + b² − c²2ab = 74 − 3970 = 0.5
And cos 60° is 0.5.
The same!
So c is right.
cos 60° = 0.5
Let's look back.
First: write the law of cosines.
Then: put the numbers in.
Then: work it out.
Then: take the square root.
Last: check.
▶ Watch it solved
The question
Question: find side a of the triangle with b = 6, c = 9 and A = 120°.
1 Write the law of cosines
We know two sides, b and c, and the angle A between them.
The law of cosines: a² = b² + c² − 2bc cos A.
Side a is across from angle A.
a2 = b2 + c2 − 2bc cos A
It is Pythagoras with a correction.
When A is 90°, cos 90° is 0, and it is just Pythagoras.
A = 90°: cos 90° = 0 → a² = b² + c²
2 Put the numbers in
Now put the numbers in: b = 6, c = 9 and A = 120°.
a2 = 62 + 92 − 2 × 6 × 9 × cos 120°
3 Work it out
Squares first: 6² is 36, 9² is 81.
And 2 × 6 × 9 is 108.
a2 = 36 + 81 − 108 × cos 120°
Careful!
Times comes before take away.
Work out 108 × cos 120° first, then take it away.
Careful: times before take away
The calculator gives cos 120°: exactly −0.5.
108 times that is −54.
cos 120° = −0.5
108 × −0.5 = −54
36 + 81 is 117.
Then we take away −54.
a2 = 117 − (−54)
Taking away a negative is adding: − (−54) = + 54.
The angle is more than 90°, so a is longer than Pythagoras gives.
a2 = 117 + 54
So a² = 171.
a2 = 171
4 Take the square root
a squared is 171.
So a is the square root of 171.
A side is never negative, so only the plus root.
a = √171
The calculator gives about 13.077.
To the nearest tenth, a ≈ 13.1.
a ≈ 13.1
5 Check
Let's check: the law turned around gives cos A back.
117 take away 171, over 108: −0.5.
cos A = b² + c² − a²2bc = 117 − 171108 = −0.5
And cos 120° is −0.5.
The same!
So a is right.
cos 120° = −0.5
Let's look back.
First: write the law of cosines.
Then: put the numbers in.
Then: work it out.
Then: take the square root.
Last: check.
▶ Watch it solved
The question
Question: find angle C of the triangle with sides a = 5, b = 7 and c = 8.
1 Write the law of cosines
We know all three sides.
We want angle C, across from side c.
The law of cosines: c² = a² + b² − 2ab cos C.
Side c is across from angle C.
c2 = a2 + b2 − 2ab cos C
It is Pythagoras with a correction.
When C is 90°, cos 90° is 0, and it is just Pythagoras.
C = 90°: cos 90° = 0 → c² = a² + b²
2 Put the numbers in
Now put the numbers in: c = 8, a = 5 and b = 7.
82 = 52 + 72 − 2 × 5 × 7 × cos C
Squares first: 64, 25 and 49.
And 2 × 5 × 7 is 70.
64 = 25 + 49 − 70 cos C
Careful!
70 cos C is one piece: 70 times cos C.
We cannot take 70 from 74 first.
Careful: not 74 − 70 = 4 ✗
25 + 49 is 74.
We swap the two sides, so cos C is on the left.
74 − 70 cos C = 64
We want cos C by itself.
Two things are stuck to cos C: times −70 and + 74.
The + 74 is on the outside, so it comes off first.
Then the times −70.
3 Remove the 74
To remove 74, we take away 74.
We do it on both sides.
Why both sides?
The = sign means both sides are the same amount.
If we change only one side, they are not the same any more.
74 − 70 cos C − 74 = 64 − 74
74 and − 74 make zero.
Cross them out.
64 − 74 = −10.
64 − 74 = −10
Now we have −70 cos C = −10.
−70 cos C = −10
4 Remove the −70
−70 cos C means −70 times cos C.
We want just cos C.
To remove times −70, we divide by −70.
We do it on both sides, so they stay equal.
−70 cos C−70 = −10−70
−70 divided by −70 is 1.
So just cos C is left.
We can make −10 over −70 simpler.
It is the same as 1/7.
−10−70 = 17
So cos C = 1/7!
cos C = 17
As a decimal, about 0.1429.
cos C ≈ 0.1429
5 Turn it into the angle
The cos⁻¹ button turns the ratio back into the angle.
C = cos−1(0.1429)
The calculator gives about 81.787.
To the nearest tenth, C ≈ 81.8°.
C ≈ 81.8°
6 Check
Let's check: put C back.
74 take away 70 times cos 81.8° is about 64.0.
74 − 70 × cos 81.8° ≈ 74 − 70 × 0.1426 ≈ 64.0
And c squared is 64.
The same!
So it is right.
c² = 8² = 64
Let's look back.
First: write the law of cosines.
Then: put the numbers in.
Then: remove the 74.
Then: remove the −70.
Then: turn it into the angle.
Last: check.
▶ Watch it solved