1. The statement
In any right triangle with legs of length $a$ and $b$ and hypotenuse of length $c$, $$a^2 + b^2 = c^2.$$ The hypotenuse is the side opposite the right angle — always the longest side of a right triangle.
Three small clarifications matter. First, "right triangle" means a triangle with one $90°$ angle — exactly one. The theorem fails for non-right triangles. Second, the hypotenuse is opposite the right angle; the two legs are the sides that form the right angle. Third, $a$, $b$, $c$ are lengths, so they're positive numbers — when we take a square root to solve for one of them, we discard the negative root.
2. A visual proof
There are over 350 known proofs of the Pythagorean theorem. The most popular is by rearrangement: take two squares of the same size, each containing four copies of the right triangle, and arrange them differently to show the theorem.
Take a square of side $a + b$. Inside, place four copies of the right triangle.
- Arrangement 1: the triangles in the four corners, leaving a tilted square in the middle whose side is the hypotenuse $c$. The area of the middle square is $c^2$.
- Arrangement 2: the same four triangles, but rearranged so the leftover regions are two squares — one of side $a$, one of side $b$. Their areas are $a^2$ and $b^2$.
Both arrangements use the same four triangles inside the same big square, so the leftover area in each case must be equal:
$$ c^2 = a^2 + b^2. $$The proof is essentially "subtract the triangles from both sides," but the visual rearrangement makes it convincing without algebra.
The theorem is named for Pythagoras (~500 BCE), but the relationship was known well before him — the Babylonians used it around 1800 BCE, and the ancient Chinese mathematical text Zhou Bi Suan Jing contains a version with a pictorial proof. Pythagoras may have been the first to prove it as a general statement (rather than verifying specific cases), which is why his name stuck.
3. Finding a missing side
The theorem is most often used in reverse: given two sides of a right triangle, find the third.
Finding the hypotenuse
If the two legs are $3$ and $4$, find the hypotenuse $c$:
$$ c^2 = 3^2 + 4^2 = 9 + 16 = 25, $$ $$ c = \sqrt{25} = 5. $$Finding a leg
If the hypotenuse is $13$ and one leg is $5$, find the other leg $b$:
$$ 5^2 + b^2 = 13^2, $$ $$ 25 + b^2 = 169, $$ $$ b^2 = 144, $$ $$ b = 12. $$The procedure is the same whichever side is missing. The only thing to be careful about is the direction: if you're solving for a leg, you subtract the known leg's square from the hypotenuse's square. If you're solving for the hypotenuse, you add.
4. Pythagorean triples
A Pythagorean triple is a set of three positive integers $(a, b, c)$ that satisfy $a^2 + b^2 = c^2$. They're surprisingly rare — most triangles with two integer legs have an irrational hypotenuse.
The famous ones, worth memorizing:
| Triple | Verification |
|---|---|
| $(3, 4, 5)$ | $9 + 16 = 25$ |
| $(5, 12, 13)$ | $25 + 144 = 169$ |
| $(8, 15, 17)$ | $64 + 225 = 289$ |
| $(7, 24, 25)$ | $49 + 576 = 625$ |
Each of these gives infinitely many more triples by scaling: $(6, 8, 10)$, $(9, 12, 15)$, and $(15, 20, 25)$ are all $(3, 4, 5)$ multiplied by $2$, $3$, $5$.
Recognizing a Pythagorean triple in a problem saves you from having to compute a square root. If you see legs $5$ and $12$, the hypotenuse is $13$ — no calculator needed.
5. The converse
The Pythagorean theorem says: if a triangle is right-angled, then $a^2 + b^2 = c^2$. The converse reverses that arrow:
If $a^2 + b^2 = c^2$ for the three side lengths of a triangle, then the triangle is right-angled, with the right angle opposite the side $c$.
This is genuinely useful: it lets you test whether an arbitrary triangle is right-angled, given only its side lengths. If $a^2 + b^2 < c^2$, the triangle is obtuse; if $a^2 + b^2 > c^2$, it's acute.
| Relation | Triangle type |
|---|---|
| $a^2 + b^2 = c^2$ | Right (the right angle is opposite $c$). |
| $a^2 + b^2 > c^2$ | Acute (all angles less than $90°$). |
| $a^2 + b^2 < c^2$ | Obtuse (one angle greater than $90°$). |
6. Extensions: distance and 3D
The theorem isn't just a fact about triangles — it's the engine behind every formula for distance. Once you see it that way, two extensions fall out for free.
The distance formula
Given two points $(x_1, y_1)$ and $(x_2, y_2)$ in the plane, the straight-line distance between them is simply the hypotenuse of a right triangle whose legs are the horizontal and vertical gaps:
$$ d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}. $$That's the entire derivation. The leg lengths $|x_2 - x_1|$ and $|y_2 - y_1|$ are just $a$ and $b$, and the distance $d$ is $c$.
Three dimensions
In 3D, the theorem stacks on itself. To find the body diagonal of a box with side lengths $\ell$, $w$, $h$, first use the theorem in the base to get the floor diagonal:
$$ \text{floor diagonal} = \sqrt{\ell^2 + w^2}. $$Then apply the theorem again, vertically, with that floor diagonal as one leg and the height $h$ as the other:
$$ d_{3\text{D}} = \sqrt{\ell^2 + w^2 + h^2}. $$The same pattern continues into any number of dimensions — the squared distance is always the sum of the squared coordinate differences. The Pythagorean theorem is the rule that makes Euclidean geometry Euclidean.
The 3D formula $\sqrt{\ell^2 + w^2 + h^2}$ isn't a new theorem — it's the original theorem used twice. Every "distance" you'll meet in physics or data science (Euclidean norm, length of a vector, magnitude of velocity) is the same idea.