Law of Cosines
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn the Law of Cosines and how to use it to find missing sides and angles when the Law of Sines won’t cut it.
The Concept
Section titled “The Concept”The Law of Cosines is a generalization of the Pythagorean Theorem that works for any triangle:
You can write it for any side:
Notice that if the angle is 90°, then cos 90° = 0 and the formula reduces to the Pythagorean Theorem. So this is really the same idea, just extended to handle any angle.
Use the Law of Cosines when you have:
- Two sides and the included angle (SAS) - find the third side
- All three sides (SSS) - find any angle
The Law of Sines handles AAS and ASA nicely, but for SAS and SSS, the Law of Cosines is the right tool.
Worked Example
Section titled “Worked Example”Example 1 (SAS): Find the missing side
In triangle PQR, p = 7, q = 10, and angle R = 55°. Find side r.
We know two sides and the included angle, so we plug straight into the formula:
Example 2 (SSS): Find an angle
A triangle has sides a = 5, b = 7, c = 9. Find angle A.
Rearrange the Law of Cosines to solve for cos A:
Example 3 (SSS): Find all angles
A triangle has sides a = 8, b = 6, c = 10. Find all three angles.
Start with the largest angle (opposite the longest side, c = 10):
This is actually a right triangle (6-8-10 is a Pythagorean triple). Now find angle A:
And angle B = 180° - 90° - 53.1° = 36.9°.
Real-World Application
Section titled “Real-World Application”The Law of Cosines is used in:
- GPS and navigation (calculating distances between three known points)
- Surveying (when you can measure two sides and the angle between them)
- Physics (finding the resultant of two forces at an angle)
- Construction (calculating diagonal measurements for non-rectangular structures)
- Aviation (determining flight paths and distances between waypoints)
Example: two roads diverge from a town at a 65° angle. One road leads to a lake 12 miles away, the other to a mountain 8 miles away. The Law of Cosines tells you the straight-line distance between the lake and the mountain.
Retrying will remove your ✅ checkmark until you pass again.