Law of cosines
Pythagoras with a correction term that depends on how far the angle is from a right angle.
What the symbols mean
- two sides you know
- the angle between them
- the side opposite C
Why it works — the picture
Hinge two sticks of lengths a and b at a pivot and swing them open. At 90 degrees you get Pythagoras. Open wider and the far ends get farther apart; close them and they come together. The extra term -2ab cos C is exactly that adjustment: positive when the angle is acute (cos positive, subtracts), negative when obtuse (adds).
Try it yourself
- Set the angle to 60 degrees with sides 3 and 4 and find the third side.
- Set the angle to 180 degrees: what does the formula give?
- Find the angles of a 5-6-7 triangle.
Where it’s used in real life
Navigation, triangulation, and the vector-length calculation in physics engines.