structural:expansion, information:extraction
Law of cosines

The Pythagorean theorem is a special case of the more general theorem relating the lengths of sides in any triangle, the law of cosines, which states that a 2 + b 2 − 2 a b cos θ = c 2 {\displaystyle a^{2}+b^{2}-2ab\cos {\theta }=c^{2}} where θ {\displaystyle \theta } is the angle between sides a {\displaystyle a} and b {\displaystyle b}.

When θ {\displaystyle \theta } is π 2 {\displaystyle {\frac {\pi }{2}}} radians or 90°, then cos θ = 0 {\displaystyle \cos {\theta }=0}, and the formula reduces to the usual Pythagorean theorem.