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).
Answer: sqrt(13)
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
- Warm-up: First identify exactly what the question is asking: When the included angle is 90 degrees, the law of cosines becomes the:
- Use the relevant geometric relationship first, then set up an equation from the angle measures or side relationships.
- cos(90) = 0, so c^2 = a^2 + b^2 — exactly the Pythagorean theorem.
- Verify the selected choice by checking that it satisfies the original prompt and that the other choices fail the same test.
Answer: Pythagorean theorem
2. Triangle a = 3, b = 4, C = 90. c?
Show solution
- Warm-up: First identify exactly what the question is asking: Triangle a = 3, b = 4, C = 90. c?
- Use the relevant geometric relationship first, then set up an equation from the angle measures or side relationships.
- cos(90)=0, so c^2 = 9+16 = 25. c = 5.
- Check the result by substituting or estimating: the response should match 5 and make sense in the original problem.
Answer: 5
3. Triangle a = 3, b = 4, C = 60 (cos(60) = 1/2). c^2 = ?
Show solution
- Warm-up: First identify exactly what the question is asking: Triangle a = 3, b = 4, C = 60 (cos(60) = 1/2). c^2 = ?
- Use the relevant geometric relationship first, then set up an equation from the angle measures or side relationships.
- c^2 = 9 + 16 - 2(3)(4)(1/2) = 25 - 12 = 13.
- Check the result by substituting or estimating: the response should match 13 and make sense in the original problem.
Answer: 13
4. Triangle a = 5, b = 7, C = 60. c^2 = ?
Show solution
- Core Practice: First identify exactly what the question is asking: Triangle a = 5, b = 7, C = 60. c^2 = ?
- Use the relevant geometric relationship first, then set up an equation from the angle measures or side relationships.
- c^2 = 25 + 49 - 2(5)(7)(1/2) = 74 - 35 = 39.
- Check the result by substituting or estimating: the response should match 39 and make sense in the original problem.
Answer: 39
5. Triangle a = 4, b = 6, C = 120 (cos(120) = -1/2). c^2 = ?
Show solution
- Core Practice: First identify exactly what the question is asking: Triangle a = 4, b = 6, C = 120 (cos(120) = -1/2). c^2 = ?
- Use the relevant geometric relationship first, then set up an equation from the angle measures or side relationships.
- c^2 = 16 + 36 - 2(4)(6)(-1/2) = 52 + 24 = 76.
- Check the result by substituting or estimating: the response should match 76 and make sense in the original problem.
Answer: 76
Practice this interactively with instant feedback and an AI tutor.
Practice Law of Cosines Take the free placement check