The Law of Cosines
Find a side from two sides and their included angle. Find an angle from three side lengths.
5 min · Non-right triangle trigonometry · Foundations
Learning goals
- Find a side from two sides and their included angle
- Find an angle from three side lengths
Understand the concept
In a triangle, c² = a² + b² − 2ab cos C, where C is the angle between sides a and b. Cyclic versions apply to other sides. When C = 90°, the cosine term vanishes and the formula becomes the Pythagorean theorem.
For three valid side lengths, rearrange to cos C = (a² + b² − c²)/(2ab). Use arccos in degree mode if angles are requested in degrees, and retain exact values until the final rounding step.
Worked example 1
a = 5, b = 7, C = 60° gives c² = 25 + 49 − 35 = 39, so c = √39.
Worked example 2
a = 3, b = 4, c = 5 gives cos C = 0, hence C = 90°.
Check your understanding
UNVRST English edition · Educational support · Editorial policy