# Generalized Pythagoras through Vectors

Here’s a proof of the Pythagorean Theorem by way of vectors.  Of course, if your students already know vectors, they’re already way past the Pythagorean Theorem, but I thought Richard Pennington‘s statement of this on LinkedIn gave a pretty and stunningly brief (after all the definitions) proof of one of mathematics’ greatest equations.

Let O be the origin, and let $\overrightarrow A$ and $\overrightarrow B$ be two position vectors starting at O. The vector from $\overrightarrow A$ to $\overrightarrow B$ is simply $\overrightarrow {B-A}$, which I will call $\overrightarrow C$. Using properties of dot products,

$\overrightarrow C\cdot\overrightarrow C = \overrightarrow {B-A}\cdot\overrightarrow {B-A} = \overrightarrow B\cdot\overrightarrow B-2\overrightarrow A\cdot\overrightarrow B+\overrightarrow A\cdot\overrightarrow A$

The dot product of a vector with itself is the square of its magnitude, so

$|\overrightarrow C|^2=|\overrightarrow B|^2-2|\overrightarrow A||\overrightarrow B|cos\theta+|\overrightarrow A|^2$

where $\theta$ is the angle between $\overrightarrow A$ and $\overrightarrow B$.

This is the Law of Cosines–in my classes, I call it the generalized Pythagorean Theorem for all triangles.  If $\theta=\frac{\pi}{2}$, then $\overrightarrow A$ and $\overrightarrow B$ are the legs of a right triangle with hypotenuse $\overrightarrow C$ which makes $cos(\theta)=cos(\frac{\pi}{2})=0$ and

$|\overrightarrow C|^2=|\overrightarrow A|^2+|\overrightarrow B|^2$

Pretty.