The Cosine Law
The sine law needs a side and its opposite angle. When you don’t have such a pair, as when you know two sides and the angle between them, or all three sides, the cosine law steps in. It’s the Pythagorean theorem, upgraded to work in any triangle. All angles are in degrees.
Key ideas
Section titled “Key ideas”The cosine law
Section titled “The cosine law”In any triangle (labelled as below):
The same pattern works for every side: and . The side on the left is opposite the angle in the cosine.
Finding an angle
Section titled “Finding an angle”Rearranging to find an angle from three sides:
When to use it
Section titled “When to use it”| You know | Use |
|---|---|
| two sides and the angle between them (SAS) | cosine law, to find the third side |
| all three sides (SSS) | cosine law, to find an angle |
| a side and its opposite angle, plus one more | sine law |
Connection to Pythagoras
Section titled “Connection to Pythagoras”If , then and the law becomes . The term corrects for angles that aren’t right angles.
The cosine law has no ambiguous case: gives values from to , and a negative cosine correctly gives an obtuse angle.
Worked examples
Section titled “Worked examples”Example 1: Two sides and the included angle (SAS)
Section titled “Example 1: Two sides and the included angle (SAS)”In , , , and . Find to two decimal places.
Solution.
So .
Example 2: Three sides (SSS)
Section titled “Example 2: Three sides (SSS)”A triangle has sides , , and . Find its largest angle.
Solution. The largest angle is opposite the longest side, so find :
. The negative cosine tells you the angle is obtuse.
Example 3: Back to Pythagoras
Section titled “Example 3: Back to Pythagoras”Use the cosine law to find when , , and .
Solution.
That’s the familiar –– right triangle.
Example 4: Two hikers
Section titled “Example 4: Two hikers”Two hikers leave camp on straight paths apart. One walks km and the other walks km. How far apart are they?
Solution. The angle between the two known sides is :
km.
Common mistakes
Section titled “Common mistakes”Using an angle that isn’t between the two sides. For , angle must be the angle between sides and (opposite ).
Order of operations. means multiply first, then subtract. It isn’t .
Forgetting the square root. The formula gives . Take the square root at the end.
Picking the wrong angle to find first. When solving a whole triangle from three sides, find the largest angle first with the cosine law. Then the remaining angles are acute, and the sine law is safe to use.
Practice
Section titled “Practice”1. (Warm-up) Which law would you use first?
- (a) two sides and the angle between them
- (b) two angles and a side
- (c) three sides
- (d) two sides and an angle opposite one of them
Solution
(a) Cosine law. (b) Sine law. (c) Cosine law. (d) Sine law (watch for the ambiguous case).
2. (Warm-up) Find if , , and . Give an exact answer and a decimal.
Solution
.
3. (Warm-up) A triangle has all three sides equal to . Use the cosine law to find one of its angles.
Solution
So , as expected for an equilateral triangle.
4. (Core) In , , , and . Find .
Solution
. ( is negative, so this side is longer than it would be in a right triangle.)
5. (Core) A triangle has sides , , and . Find its smallest angle.
Solution
The smallest angle is opposite the shortest side, :
.
6. (Core) Find all three angles of a triangle with sides , , and .
Solution
Largest angle first (opposite ):
Angle opposite :
The third angle is about .
7. (Core) A triangular garden has two sides of m and m with a angle between them. How much fencing is needed to go all the way around?
Solution
m. The fencing needed is about m.
8. (Challenge) Explain what the cosine law says about compared with when is acute, right, and obtuse.
Solution
, and is positive.
- Acute : , so .
- Right : , so (Pythagoras).
- Obtuse : , so .
The bigger the angle, the longer the opposite side.
9. (Challenge) A parallelogram has sides of cm and cm with an angle of between them. Find the lengths of both diagonals.
Solution
The parallelogram’s angles are and . Each diagonal is the third side of a triangle with sides and .
Short diagonal (): , so cm.
Long diagonal (): , so cm.