Pythagoras’ Theorem

The most proved theorem in mathematics. Slide the pieces of five different proofs, find the triples a Babylonian scribe listed nearly four thousand years ago, and turn the theorem into a ruler for the plane

Pythagoras’ Theorem

In a right-angled triangle, the square on the longest side equals the squares on the other two together. It is probably the most proved theorem in mathematics: a 1940 collection by Elisha Loomis gathered 367 proofs. It was known long before Pythagoras, and has been used ever since to measure everything.

Five Proofs

Pick a proof and press Play, or scrub through it with the slider. Then drag the corners of your triangle and run it again: the pieces change, but the proof never fails.

Four copies of the triangle in a square of side a + b. What they leave uncovered is the square on c.
9.00
a2
16.00
b2
25.00
a2 + b2
25.00
c2 (c measured)
49.00
big square (a + b)2
24.00
four triangles, 4 × ½ab
25.00
uncovered area
side aside bhypotenuse cdragaltitude, regions

Lengths are in units, measured from your triangle; areas are in square units. The copies of the triangle are drawn dark with their sides in the colours of a, b and c, so you can see each one is the same triangle. The pieces only slide, turn or (in Euclid’s proof) shear, and none of these changes an area.

Go deeper:What a dissection proves

A picture shows one triangle; a proof must cover them all. The rearrangement works for every right triangle because each piece is defined by a and b alone. Put four copies of the triangle in the corners of a square of side a + b. At each point where two copies meet on a side, their two acute angles add up to 90°, because the three angles of a triangle add up to 180°. The angle left over on that straight side is 180° − 90° = 90°, so the uncovered shape has four equal sides c and four right angles: it is a square of area c2. Slide the copies into two a × b rectangles and the uncovered part is the squares on a and b. The big square and the four triangles have not changed, so neither has the uncovered area:

(a + b)2 − 2ab = c2 = a2 + b2

The other proofs use the same two facts: moving a piece without stretching it keeps its area, and a figure cut into pieces has the total area of the pieces. Euclid’s proof (Elements, Book I, Proposition 47) shows that each rectangle the altitude cuts from the square on c has the area of one of the smaller squares; the shears here are a moving version of his pairs of equal triangles. Euclid then proves the converse as the very next proposition, I.48: if the squares on two sides add up to the square on the third, the angle between those two sides is a right angle. The “Behold!” figure is traditionally attributed to the Indian mathematician Bhāskara II in the 12th century. James A. Garfield published his trapezoid in 1876, before he became President of the United States. The similar-triangles proof uses no areas at all, only the fact that the altitude cuts the triangle into two smaller copies of itself.

Elisha Loomis collected proofs in The Pythagorean Proposition, first published in 1927; the second edition of 1940 has 367. The theorem bears the name of Pythagoras, but whether he or his followers proved it is not known: the stories about him were written down centuries after his death. It was known much earlier. Old Babylonian tablets from around 1800 BCE use it (see the third demo), and in China the Zhoubi Suanjing states it as the “gougu” theorem, after the names for the two shorter sides. See also: Direct Proof.

Squares, or Any Shape

Open and close the angle at C and watch the gap between the shape on c and the other two. Then swap the squares for semicircles or any other shape: at exactly 90° the two smaller still add up to the largest.

5.76
on a = 2.40
3.24
on b = 1.80
9.00
the two together
9.00
on c = 3.00, opposite C
0.00
gap: on c − (on a + on b)
0.00
−2ab cos C (see Solving Triangles)
A right angle: the squares on a and b add up exactly to the one on c. This is Pythagoras’ theorem.
on side a (CB)on side b (CA)on side c (AB)angle Cdrag

Areas are in square units, measured from the drawing: each side is measured, and every copy of a shape on a side of length s has area 1 × s². The angle snaps to exactly 90° when you come within 1.5° of it. The teal figure is computed from the measured a, b and angle C, independently of c.

Go deeper:Why any shape works, and what happens away from 90°

Similar shapes have areas in proportion to the squares of their sides: double every length and the area is multiplied by four. So a shape built on a side of length s has area k × s2, where k depends only on the shape: 1 for a square, π/8 for a semicircle, √3/4 for an equilateral triangle. Multiply a2 + b2 = c2 through by k and the theorem holds for that shape too. Euclid proves exactly this, for any similar figures, in Book VI, Proposition 31. The theorem is really about area, and squares are only the most convenient shape to put on a side.

When the angle at C is not a right angle, the squares no longer balance, and the gap is measured exactly by the law of cosines:

c2 = a2 + b2 − 2ab cos C

For an acute angle cos C is positive and c2 falls short; for an obtuse angle cos C is negative and c2 is larger; at 90°, cos C = 0 and Pythagoras is the special case. So the converse holds too: if a2 + b2 = c2, the angle must be 90°. See also: Solving Triangles.

All of this is a fact about the flat plane. On a sphere, a triangle with three right angles has three equal sides, and a2 + b2 = c2 fails. Given Euclid’s other axioms, the theorem is equivalent to his parallel postulate. See also: The Parallel Postulate.

Triples and the Distance Formula

Move the m and n sliders to build whole-number right triangles, and tap the dots to find the pattern they make. Then read a Babylonian tablet of triples, and drag two points to see the theorem measure distance.

3
a = m2 − n2
4
b = 2mn
5
c = m2 + n2
25 = 25
a2 + b2 = c2
m and n have no common factor and one of them is even, so the triple is primitive: a, b and c share no factor.
primitive triple (a, b), both ways roundthe triple from m and n

The first picture is drawn on a grid of whole units; the marks along the hypotenuse are one unit apart, and there is a whole number of them. In the second, each dot is a primitive triple with c up to 300 (47 of them, each shown as (a, b) and (b, a)); point at one to read it, tap to load it.

Go deeper:Euclid’s formula, Plimpton 322, and geometry by algebra

A Pythagorean triple is three whole numbers with a2 + b2 = c2; it is primitive when they share no common factor. Euclid’s formula a = m2 − n2, b = 2mn, c = m2 + n2 always gives a triple, since (m2 − n2)2 + (2mn)2 = (m2 + n2)2. Every primitive triple, taking a as its odd side, comes from exactly one pair m > n with no common factor and not both odd, so there are infinitely many: one for every such pair. There are 158 with c up to 1000. In the plot of (a, b), the triples with the same n lie on one parabola.

Plimpton 322 is a clay tablet from about 1800 BCE, Old Babylonian, now at Columbia University. Its fifteen rows give the short side and the diagonal of right triangles with whole-number sides, written in base 60; the long side is not on the surviving part, but every row implies a whole number for it. The tablet has a few copying errors, which scholars correct, and its purpose is debated: a table of triples worked out for their own sake, or an aid for a teacher setting problems. The tablet YBC 7289 shows a square with its diagonals and the number 1;24,51,10, which differs from √2 by less than one part in a million.

Put two points on a grid and the segment between them is the hypotenuse of a right triangle whose legs are the differences of the coordinates. So the distance is

d = √((x2 − x1)2 + (y2 − y1)2)

and, using the theorem twice, the diagonal of a box is √(a2 + b2 + c2). This formula turns lengths into arithmetic on coordinates, which is why geometry can be done by algebra. See also: Coordinates and Vectors. Whole numbers fail one step up: Fermat’s Last Theorem says that an + bn = cn has no solution in positive whole numbers for any n above 2. Andrew Wiles’s proof was published in 1995.

Key Takeaways

  • In a right triangle a2 + b2 = c2, and a dissection proves it for every right triangle at once.
  • The theorem is about area: any similar shapes on the three sides balance at a right angle, and nowhere else.
  • Away from 90°, the law of cosines measures the gap: c2 = a2 + b2 − 2ab cos C.
  • Whole-number triples were tabulated in Babylon nearly 4000 years ago, and the same theorem gives the distance formula.

Spot a mistake or have an idea?

Search