Topics · 2 identities
Law of Cosines
The generalized Pythagorean theorem for solving any triangle.
a² = b² + c² − 2bc cos A finds the third side from two sides and the angle between them (SAS). It is the Pythagorean theorem with a correction term: when A = 90°, cos A = 0 and it collapses to a² = b² + c².
Open identityRearranged for the angle, cos A = (b² + c² − a²)/(2bc) finds any angle from all three sides (SSS). Unlike the Law of Sines it has no ambiguous case: arccos returns a unique angle in [0, π], which is the whole range a triangle angle can occupy.
Open identity