CMClearMathAcademy

Law of Cosines

A free Trigonometry lesson from the “Applications of Trigonometry” unit, with a worked example and practice problems including step-by-step solutions.

The Law of Cosines, c^2 = a^2 + b^2 - 2ab*cosC, relates the three sides of any triangle to one of its angles. Use it in the SAS case (two sides and the included angle) to find the third side, and rearrange it to cosC = (a^2 + b^2 - c^2)/(2ab) in the SSS case (three sides) to find an angle. The angle C always sits opposite the side c, and when C = 90 degrees the formula collapses to the Pythagorean theorem.

What you'll learn

Why it matters: Surveyors and GPS systems use the Law of Cosines to compute a distance across terrain they cannot walk directly, when only two leg distances and the angle between them are known.

Worked example

Problem. In triangle ABC, a = 8, b = 11, and the included angle C = 37 degrees. Find side c to the nearest tenth.

  1. Apply c^2 = a^2 + b^2 - 2ab*cosC = 8^2 + 11^2 - 2(8)(11)cos(37)
  2. Compute: 64 + 121 - 176(0.7986) = 185 - 140.6 = 44.4
  3. Take the square root: c = sqrt(44.4) = 6.7

Answer: 6.7

Lesson preview: this page shows 5 practice items. The interactive activity contains 28 practice items and 15 quiz items (typed response and multiple choice). Counts include repeated prompts and variants.

Practice problems

1. In triangle ABC, a = 5, b = 7, and the included angle C = 90 degrees. Find side c to the nearest tenth.

Show solution
  1. c^2 = 5^2 + 7^2 - 2(5)(7)cos(90) = 25 + 49 - 70(0)
  2. Since cos(90) = 0, c^2 = 74
  3. c = sqrt(74) = 8.6

Answer: 8.6

2. You know two sides of a triangle and the angle between them and want the third side. Which equation should you use?

Choices: c^2 = a^2 + b^2 - 2ab*cosC · c^2 = a^2 + b^2 · cosC = (a^2 + b^2 - c^2)/(2ab) · c = a + b - 2ab

Show solution
  1. Two sides plus the included angle is the SAS case for finding a side.
  2. The Law of Cosines c^2 = a^2 + b^2 - 2ab*cosC directly gives the third side.

Answer: c^2 = a^2 + b^2 - 2ab*cosC

3. In triangle ABC, a = 6, b = 10, and the included angle C = 60 degrees. Find side c to the nearest tenth.

Show solution
  1. c^2 = 6^2 + 10^2 - 2(6)(10)cos(60) = 36 + 100 - 120(0.5)
  2. c^2 = 136 - 60 = 76
  3. c = sqrt(76) = 8.7

Answer: 8.7

4. In triangle ABC, a = 9, b = 12, and the included angle C = 45 degrees. Find side c to the nearest tenth.

Show solution
  1. c^2 = 9^2 + 12^2 - 2(9)(12)cos(45) = 81 + 144 - 216(0.7071)
  2. c^2 = 225 - 152.7 = 72.3
  3. c = sqrt(72.3) = 8.5

Answer: 8.5

5. In triangle ABC, a = 14, b = 10, and the included angle C = 120 degrees. Find side c to the nearest tenth.

Show solution
  1. c^2 = 14^2 + 10^2 - 2(14)(10)cos(120) = 196 + 100 - 280(-0.5)
  2. c^2 = 296 + 140 = 436
  3. c = sqrt(436) = 20.9

Answer: 20.9

Practice this interactively with instant feedback and an AI tutor.

Practice Law of Cosines Take the free placement check

More Trigonometry lessons