Topics · 2 identities

Law of Cosines

The generalized Pythagorean theorem for solving any triangle.

Law of Cosines for a side: a² = b² + c² − 2bc cos A

a2=b2+c22bccosAa^{2} = b^{2} + c^{2} - 2bc \cos A

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 identity

Law of Cosines for an angle: cos A = (b² + c² − a²)/(2bc)

cosA=b2+c2a22bc\cos A = \dfrac{b^{2} + c^{2} - a^{2}}{2bc}

Rearranged 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