TITLE: Pythagoras's theorem as a special case of the law of cosines
QUESTION [6 upvotes]: I heard that the Pythagorean theorem is a special case of the more general theorem relating the lengths of sides in any triangle, the law of cosines?

REPLY [6 votes]: The law of cosines is:
$$c^2 = a^2 + b^2 \;-\; 2\!\cdot\!a\!\cdot\!b\!\cdot\!\cos\theta$$
where $\theta$ is the angle between the sides $a$ and $b$.
Now, when this angle is a right angle ($90^\circ$, or $\frac{\pi}{2}$), its cosine is $0$, so the entire last term is multiplied by $0$ and vanishes, leaving only the usual Pythagorean Theorem for the right triangle with legs $a$ and $b$ and the hypotenuse $c$:
$$c^2 = a^2 + b^2$$
Simple as that.