☰ Course contents
Mathematics 🔍 Grade 10 Cosine Flex: Generalizing Pythagoras with the Law of Cosines
🔍 Grade 10 · Lesson 9 of 12

Cosine Flex: Generalizing Pythagoras with the Law of Cosines

Bend a right triangle's angle away from 90° and Pythagoras needs just one correction term to keep working.

Grade 10Geometry / Algebra 2
Cosine Flex: Generalizing Pythagoras with the Law of Cosines — illustration
💡
The big idea: The Pythagorean theorem only works for right triangles. The Law of Cosines works for every triangle by adding a correction term, −2ab cos C, that vanishes exactly when C = 90° (because cos 90° = 0). It's Pythagoras with a built-in adjustment for any angle.
🎯 By the end, you'll be able to
  • State the Law of Cosines
  • Show that it reduces to the Pythagorean theorem when the included angle is 90°
  • Use the Law of Cosines to find an unknown side given two sides and the included angle (SAS)
  • Use the Law of Cosines to find an unknown angle given all three sides (SSS)
📎 You should already know
  • Pythagorean theorem
  • Basic trigonometric ratios (cosine)

Pythagoras only handles right angles

The Pythagorean theorem, c² = a² + b², is one of the most useful facts in geometry — but it only holds when the angle between sides a and b is exactly 90°. Bend that angle open or closed even slightly, and c² is no longer a² + b². What is it instead?

🔑 The Law of Cosines
For any triangle with sides a, b, c and the angle C between sides a and b: c² = a² + b² − 2ab cos C. It works for acute, right, and obtuse triangles alike.
\[ c^2 = a^2 + b^2 - 2ab\cos C \]
The Law of Cosines: Pythagoras with a correction term for any angle C.
🎮 Cosine Flex LIVE
Bend a triangle away from 90 degrees; the cosine rule generalizes Pythagoras.

Watch it collapse back to Pythagoras

Set C = 90° in the formula. Since cos(90°) = 0, the whole correction term −2ab cos C disappears, and you're left with c² = a² + b² — exactly the Pythagorean theorem. The Law of Cosines isn't a separate rule to memorize alongside Pythagoras; it contains Pythagoras as the special case where the angle happens to be a right angle.

✨ The sign of the correction tells you the angle's flavor
If C is acute, cos C > 0, so the correction term is subtracted and c comes out shorter than √(a²+b²). If C is obtuse, cos C < 0, so the correction term flips sign and adds, making c longer than √(a²+b²).
📝 Worked example: A triangle has a = 7, b = 10, and included angle C = 60°. Find c.
  1. c² = 7² + 10² − 2(7)(10)cos(60°).
  2. c² = 49 + 100 − 140(0.5) = 149 − 70 = 79.
  3. c = √79.
✓ c = &radic;79 &asymp; <strong>8.89</strong>.
📝 Worked example: A triangle has sides a = 5, b = 6, c = 7. Find angle C (opposite side c).
  1. Rearrange the Law of Cosines to solve for cos C: cos C = (a² + b² − c²) ÷ (2ab).
  2. cos C = (25 + 36 − 49) ÷ (2 × 5 × 6) = 12 ÷ 60 = 0.2.
  3. C = cos−1(0.2).
✓ C &asymp; <strong>78.5°</strong>.
⚠️ Match each side to the angle across from it
In c² = a² + b² − 2ab cos C, side c must be the one opposite angle C, and a, b are the two sides forming that angle. Relabeling which side is “c” without keeping this correspondence straight is the most common setup mistake.

Check your understanding

1. What does the Law of Cosines reduce to when angle C = 90°?
cos(90°) = 0, so the −2ab cosC term vanishes entirely, leaving exactly the Pythagorean theorem.
2. Using the Law of Cosines with a = 7, b = 10, C = 60°, what is c²?
c² = 49 + 100 − 140(0.5) = 149 − 70 = 79.
3. A triangle has sides a = 5, b = 6, c = 7. Using the Law of Cosines, cos C equals:
cos C = (25 + 36 − 49) ÷ (2×5×6) = 12 ÷ 60 = 0.2.
4. In the formula c² = a² + b² − 2ab cos C, which side is opposite angle C?
By convention in the Law of Cosines, the side on the left (c) is always the one opposite the angle used on the right (C).
5. If angle C is obtuse, how does side c compare to what it would be in a right triangle with the same a and b?
For obtuse C, cos C < 0, so −2ab cosC becomes positive, making c² — and therefore c — larger than the right-triangle value.
✅ Key takeaways
  • The Law of Cosines, c² = a² + b² − 2ab cos C, works for any triangle, not just right triangles.
  • Setting C = 90° makes cos C = 0, collapsing the formula exactly to the Pythagorean theorem.
  • Use it with two sides and the included angle (SAS) to find the third side.
  • Rearrange it to find an angle when all three sides (SSS) are known.
  • An acute included angle shortens c below √(a²+b²); an obtuse one lengthens it beyond that.