📏 Trigonometry
Law of Cosines: c² = a² + b² − 2ab·cosC
Law of Cosines — Solve any non-right triangle when you know two sides and the included angle
1
The formula
c² = a² + b² − 2ab·cos(C), where C is the angle between (included by) sides a and b, and c is the side opposite that angle.
2
When to use it: SAS
Use the Law of Cosines when you know two sides and the included angle between them (SAS) — the Law of Sines can't be used here since you don't yet have any angle-opposite-side pair.
3
When to use it: SSS
Also use the Law of Cosines when you know all three sides but no angles (SSS) — rearrange the formula to solve for cos(C), then take the inverse cosine to find the angle.
4
The generalized Pythagorean theorem
The Law of Cosines is a direct generalization of the Pythagorean theorem. When C = 90°, cos(90°) = 0, and the formula reduces exactly to a² + b² = c² — the familiar Pythagorean theorem for right triangles.
1
A triangle has sides a = 7, b = 9, and the included angle C = 50°. Find side c.
2
Since two sides and the included angle are known (SAS), the Law of Cosines applies: c² = a² + b² − 2ab·cos(C).
3
Substitute: c² = 7² + 9² − 2(7)(9)cos(50°) = 49 + 81 − 126(0.643) ≈ 130 − 81 ≈ 49.
4
Take the square root: c ≈ 7. (Small rounding note: precise calculation gives c ≈ 6.99, essentially 7.)

Exams test whether you can recognize when the Law of Cosines applies (SAS or SSS, as opposed to the Law of Sines' AAS/ASA/SSA cases), and whether you understand its relationship to the Pythagorean theorem as a special case.

The most common trap is trying to apply the Law of Sines to an SAS or SSS triangle — neither of these information types gives you a usable angle-opposite-side ratio for the Law of Sines, so the Law of Cosines must be used instead.

1. What is the Law of Cosines formula?
c² = a² + b² − 2ab·cos(C).
Tap to reveal / hide
2. What two types of triangle information call for the Law of Cosines?
SAS (two sides + included angle) or SSS (all three sides).
Tap to reveal / hide
3. How does the Law of Cosines relate to the Pythagorean theorem?
It's a generalization of it — when C = 90°, the formula reduces to a² + b² = c².
Tap to reveal / hide
4. Given a = 7, b = 9, and included angle C = 50°, find side c.
c ≈ 7.
Tap to reveal / hide
5. Why can't the Law of Sines be used for an SAS triangle?
Because SAS doesn't provide any angle-opposite-side pair, which the Law of Sines requires.
Tap to reveal / hide