Law of Cosines
A free Geometry lesson from the “Triangles, Similarity, and Trigonometry” unit, with a worked example and practice problems including step-by-step solutions.
The law of cosines generalizes the Pythagorean theorem to any triangle: c^2 = a^2 + b^2 - 2ab * cos(C), where C is the angle opposite side c. When C = 90 degrees, cos(C) = 0, and the formula reduces to the Pythagorean theorem. Use the law of cosines when you have two sides and the angle between them (SAS), or all three sides and need an angle (SSS).
What you'll learn
- Apply the law of cosines: c^2 = a^2 + b^2 - 2ab * cos(C)
- Solve a triangle for a missing side given two sides and the included angle (SAS)
- Solve a triangle for a missing angle given all three sides (SSS)
Worked example
Problem. Triangle has sides a = 3, b = 4, and included angle C = 60 degrees. Find c.
- c^2 = a^2 + b^2 - 2ab * cos(C).
- = 9 + 16 - 2(3)(4)(1/2) = 25 - 12 = 13.
- c = sqrt(13).
- Connect the result back to Law of Cosines so the geometric relationship is explicit.
Answer: sqrt(13)
Lesson preview: this page shows 5 practice items. The interactive activity contains 28 practice items and 15 quiz items (multiple choice and typed response). Counts include repeated prompts and variants.
Practice problems
1. When the included angle is 90 degrees, the law of cosines becomes the:
Choices: Pythagorean theorem · Inscribed angle theorem · Law of sines
Show solution
- cos(90) = 0, so c^2 = a^2 + b^2 — exactly the Pythagorean theorem.
Answer: Pythagorean theorem
2. Triangle a = 3, b = 4, C = 90. c?
Show solution
- cos(90)=0, so c^2 = 9+16 = 25. c = 5.
Answer: 5
3. Triangle a = 3, b = 4, C = 60 (cos(60) = 1/2). c^2 = ?
Show solution
- c^2 = 9 + 16 - 2(3)(4)(1/2) = 25 - 12 = 13.
Answer: 13
4. Triangle a = 5, b = 7, C = 60. c^2 = ?
Show solution
- c^2 = 25 + 49 - 2(5)(7)(1/2) = 74 - 35 = 39.
Answer: 39
5. Triangle a = 4, b = 6, C = 120 (cos(120) = -1/2). c^2 = ?
Show solution
- c^2 = 16 + 36 - 2(4)(6)(-1/2) = 52 + 24 = 76.
Answer: 76
Practice this interactively with instant feedback and an AI tutor.
Practice Law of Cosines Take the free placement check