oblique triangles
Law of Cosines
You should know: trigonometric functions
Overview
The law of cosines generalizes the Pythagorean theorem to any triangle, not just right triangles. For a triangle with sides a, b, c opposite angles α, β, γ, it expresses the square of one side in terms of the other two sides and the cosine of their included angle. When the included angle is 90°, cos(90°) = 0 and the formula reduces exactly to the Pythagorean theorem. The law of cosines is used to solve triangles given SAS (two sides and the included angle) or SSS (three sides), cases the law of sines cannot handle directly.
Formal Definition
For a triangle with sides a, b, c opposite angles α, β, γ respectively, the law of cosines states (using angle γ opposite side c as the reference):
Generalizes the Pythagorean theorem; reduces to c² = a² + b² when γ = 90°
Solved for the angle, used in the SSS case
Worked Examples
Substitute into the law of cosines with the included angle γ between sides a and b.
Simplify.
Answer: c ≈ 8.89
Practice Problems
A triangle has sides a = 8, b = 5, and included angle γ = 120°. Find side c.
A surveyor cannot measure across a pond directly. From a station, one shore point is 120 m away, the other 150 m away, and the angle between the two sightlines is 80°. How wide is the pond between the two points?
A triangular truss panel has members of length 3 m, 4 m, and 6 m. Find the angle opposite the 6 m member (to check the geometry).
A ship sails 40 km on one bearing, then turns and sails 30 km on a bearing that makes an interior angle of 120° with the first leg. How far is the ship from its starting point?
Common Mistakes
Forgetting the minus sign, or writing c² = a² + b² + 2ab·cos(γ).
The correct form is c² = a² + b² − 2ab·cos(γ). When γ = 90°, cos(γ) = 0 and the formula must reduce to the Pythagorean theorem — use that as a sanity check.
Quiz
Summary
- Law of cosines: c² = a² + b² − 2ab·cos(γ), where γ is the angle opposite side c.
- Generalizes the Pythagorean theorem: setting γ = 90° recovers c² = a² + b².
- Solves SAS (two sides + included angle) and SSS (three sides) triangle cases.
- Solved for the angle: γ = arccos((a²+b²−c²)/(2ab)).
References
- WebsiteWikipedia — Law of cosines
Mathematics