← Trigonometry

The law of cosines

Two sides and the angle between them.

Start this lesson

When you know two sides and the angle between them, use the law of cosines: a² = b² + c² − 2bc · cos A. It’s the Pythagorean theorem with a correction for angles that aren’t 90°.

Example: b = 7, c = 9, A = 50°

  1. a² = 7² + 9² − 2(7)(9) cos 50° — Law of cosines
  2. a² ≈ 130 − 80.99
  3. a ≈ 7.0 — Square root, nearest tenth

Why it works: It is the Pythagorean theorem with a correction for an angle that is not 90 degrees. When the angle is 90, the correction is zero.

Tip: If A = 90°, cos A = 0 and it becomes a² = b² + c², the Pythagorean theorem.