Pythagorean Theorem: Visual Proof
The Pythagorean theorem is the oldest piece of mathematics most people still use: it turns the lengths of two sides of a right triangle into the third, and with it every distance in a plane or in space. This page proves it twice, proves its converse, finds all whole-number solutions and shows what replaces it when the angle is not right.
Statement
The Pythagorean theorem states that for a right triangle with legs and and hypotenuse :
The hypotenuse is the side opposite the right angle, and always the longest side. The legs are the two sides that form the right angle. Read as areas, the theorem says that the square built on the hypotenuse has exactly the area of the two squares built on the legs together — which is how Euclid states it in Proposition 47 of Book I of the Elements.
Proof by area rearrangement
Consider a large square with side length . Its total area is .
Place four identical right triangles (each with area ) inside this square. The remaining area equals:
In the first configuration, the remaining area forms a single square with side , so the remaining area is .
In the second configuration, the remaining area forms two squares with sides and , so the remaining area is .
Since both equal the same remaining area: .
One step deserves a check rather than a glance: that the hole in the first configuration really is a square. Its four sides are hypotenuses, so they all have length . At each corner of the hole, the angles and of two neighbouring triangles meet the hole's own angle along a straight side of the big square, so that angle is . The acute angles of a right triangle add up to , so every angle of the hole is : it is a square of side . A "visual proof" is a proof only when every such step can be justified like this.
Step through the rearrangement one triangle at a time, or click the square to move the next triangle. Drag the dot on the bottom edge to try other legs and — the numbers change, the equality does not:
A square of side a + b holding four copies of one right triangle, moved one triangle at a time from around the hypotenuse into two rectangles: the uncovered area is first one square of side c, then two squares of sides a and b, and it never changes.
The card keeps so the outer square stays the same size, and the handle only changes the shape of the triangle. It starts at : the big square has area , the four triangles cover , and the left over is . Each step moves one triangle as a rigid piece — a turn and a slide — so no area is created or lost on the way.
Second proof: similar triangles
Drop the altitude from the right angle to the hypotenuse. It cuts into two pieces, next to leg and next to leg , with . Each of the two smaller triangles shares an acute angle with the original and has a right angle, so both are similar to it. Comparing the ratio of a leg to the hypotenuse in the original triangle and in each small one:
Adding, . This proof uses no area at all; it shows that the theorem is really a statement about similarity, which is why Euclid could generalise it in Book VI (Proposition 31): any similar figures drawn on the three sides, not only squares, satisfy the same relation.
Hundreds of other proofs are known. E. S. Loomis's The Pythagorean Proposition collects 367. One of the best known, by James A. Garfield in 1876 before he became US president, is half of the rearrangement above: a trapezoid made of two copies of the triangle and one isosceles right triangle with legs .
The converse
If a triangle has sides , , with , then the angle opposite is a right angle (Euclid I.48). Proof: build a right triangle with legs and . By the theorem its hypotenuse satisfies , so . The two triangles have the same three sides, so they are congruent, and the angle opposite equals the right angle opposite .
The converse is the practical half. A rope or tape with marks at 3, 4 and 5 units makes a right angle on a building site, because .
Pythagorean triples and Euclid's formula
A Pythagorean triple is three positive integers with , such as , , and . A triple is primitive when the three numbers share no common factor. Euclid's formula produces them: for integers ,
Checking is algebra: . Taking gives ; gives ; gives . When and are coprime and not both odd, the triple is primitive, and every primitive triple arises this way exactly once, up to swapping and . Every other triple is a multiple of a primitive one: and are scaled.
Triples are old. The Babylonian tablet Plimpton 322, from roughly 1800 BC, lists numbers that correspond to fifteen of them, some as large as . Raise the exponent and the picture changes completely: has no solution in positive integers for any — Fermat's Last Theorem, proved by Andrew Wiles in 1995.
Beyond right triangles: the law of cosines
For any triangle with angle opposite side ,
At the cosine is zero and this is the Pythagorean theorem. The correction term tells which way a triangle leans: if , then and is obtuse; if for the longest side , the triangle is acute. Euclid has both cases, without cosines, as Propositions 12 and 13 of Book II.
The theorem also extends to more dimensions. The diagonal of a box with edges , , has length — apply the theorem twice — and the distance between two points in is . In any inner product space, exactly when and are orthogonal. On curved surfaces it fails: on a unit sphere a right triangle obeys , which approaches the familiar form only for small triangles.
A note on history
The relation was known and used long before Pythagoras, in Babylonia, and early in China and India, where the Chinese text Zhoubi Suanjing gives a dissection diagram for it. No writing by Pythagoras survives; the attribution of the theorem, and of a proof, to him or his school comes from much later authors. Euclid's I.47 is the oldest surviving proof in the Greek tradition.
Common pitfalls
- Using the wrong side as . is the hypotenuse, the side opposite the right angle and the longest one. With legs 5 and 12 the hypotenuse is 13, not .
- Applying it to a triangle that is not right. For other triangles use the law of cosines.
- Adding lengths instead of squares. is not : with legs 3 and 4 the hypotenuse is 5, not 7. The hypotenuse is always shorter than the two legs together, and longer than either one.
- Mixing up the theorem and its converse. The theorem goes from a right angle to ; checking whether a triangle is right needs the converse.
- Trusting the picture. In a rearrangement proof, the claim that the pieces fit and the hole is a square is part of the proof and has to be argued.
Short answers
What does the Pythagorean theorem say?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c², where c is the side opposite the right angle.
How do you prove the Pythagorean theorem?
One proof places four copies of the triangle inside a square of side a + b. Arranged one way they leave a square of side c uncovered; arranged another way they leave squares of sides a and b. The uncovered area is the same both times, so c² = a² + b². Another proof uses the altitude to the hypotenuse, which splits the triangle into two triangles similar to it.
Does the Pythagorean theorem work for any triangle?
No, only for right triangles. For any triangle the law of cosines holds, c² = a² + b² − 2ab·cos γ, which reduces to the Pythagorean theorem when the angle γ opposite c is 90°.
How do you know if a triangle is a right triangle?
By the converse of the theorem: if the sides satisfy a² + b² = c², the angle opposite c is a right angle. If c² is larger than a² + b² that angle is obtuse; if smaller, every angle is acute.
How do you find all Pythagorean triples?
Euclid's formula gives a = m² − n², b = 2mn, c = m² + n² for integers m > n > 0. Taking m and n coprime and not both odd gives every primitive triple exactly once (up to swapping a and b); every other triple is a multiple k·(a, b, c) of a primitive one.
Further reading
- Euclid, Elements, Book I, Propositions 47 and 48 (the theorem and its converse); Book II, 12–13 (the law of cosines); Book VI, 31 (similar figures).
- E. S. Loomis, The Pythagorean Proposition, 2nd ed., 1940; reprinted by the National Council of Teachers of Mathematics, 1968. A collection of 367 proofs.
- E. Maor, The Pythagorean Theorem: A 4,000-Year History, Princeton University Press, 2007.
- G. H. Hardy, E. M. Wright, An Introduction to the Theory of Numbers, 6th ed., Oxford University Press, 2008. Pythagorean triples and the equation x² + y² = z².