The Law of Cosines is a generalization of the Pythagorean Theorem that works for any triangle:
a2=b2+c2−2bccosA
You can write it for any side:
b2=a2+c2−2accosBc2=a2+b2−2abcosC
Notice that if the angle is 90°, then cos 90° = 0 and the formula reduces to the Pythagorean Theorem. So this is really the same idea, just extended to handle any angle.
Use the Law of Cosines when you have:
Two sides and the included angle (SAS) - find the third side
All three sides (SSS) - find any angle
The Law of Sines handles AAS and ASA nicely, but for SAS and SSS, the Law of Cosines is the right tool.
GPS and navigation (calculating distances between three known points)
Surveying (when you can measure two sides and the angle between them)
Physics (finding the resultant of two forces at an angle)
Construction (calculating diagonal measurements for non-rectangular structures)
Aviation (determining flight paths and distances between waypoints)
Example: two roads diverge from a town at a 65° angle. One road leads to a lake 12 miles away, the other to a mountain 8 miles away. The Law of Cosines tells you the straight-line distance between the lake and the mountain.