Law of Cosines
The Law of Cosines c² = a² + b² - 2ab·cos(C) solves any triangle when you know three sides or two sides and the included angle.
The Formula
The Law of Cosines is a generalization of the Pythagorean theorem.
When angle C is 90°, cos(90°) = 0, and the formula simplifies to c² = a² + b².
Variables
| Symbol | Meaning |
|---|---|
| a, b | Two known sides of the triangle |
| c | The side opposite angle C (the side you are solving for) |
| C | The angle between sides a and b (the included angle) |
| cos | The cosine function |
Finding an Angle
Rearrange the formula to find an angle when you know all three sides.
Example 1
Find side c when a = 7, b = 10, and C = 50°
c² = a² + b² - 2ab × cos(C)
c² = 7² + 10² - 2(7)(10) × cos(50°)
c² = 49 + 100 - 140 × 0.6428
c² = 149 - 89.99 = 59.01
c = √59.01 ≈ 7.68
Example 2
Find angle C when a = 5, b = 8, and c = 9
cos(C) = (a² + b² - c²) / (2ab)
cos(C) = (25 + 64 - 81) / (2 × 5 × 8)
cos(C) = 8 / 80 = 0.1
C = arccos(0.1) ≈ 84.26°
When to Use It
Use the Law of Cosines when:
- You know two sides and the included angle (SAS) and need the third side
- You know all three sides (SSS) and need to find an angle
- The Law of Sines cannot be applied (no opposite side-angle pair known)
- Solving real-world problems like navigation, surveying, or physics