What Is Law of Cosines?
The law of cosines generalizes the Pythagorean theorem to any triangle, not just right triangles: c² = a² + b² − 2ab×cos(C), where C is the angle opposite side c. It's used to find a missing side when you know two sides and the included angle, or to find an angle when you know all three sides.
Example
A triangle with sides a = 7, b = 10, and an included angle C = 60° has a third side c = √(7² + 10² − 2(7)(10)cos(60°)) = √(49 + 100 − 70) = √79 ≈ 8.89.