Pythagoras Lab

Set the two legs. Read the theorem as areas, watch the altitude prove it, then bend the surface it lives on and watch it fail.

Loading interactive simulation...

The proof is the tool next door 🖖

Drop a perpendicular from the right angle onto the hypotenuse. It lands at a point that splits c into two pieces, p and q, and it creates two smaller triangles — each of which has the same three angles as the original, so each is similar to it. Similar triangles have proportional sides, and that proportion gives a² = c·p for one piece and b² = c·q for the other. Add them: a² + b² = c(p + q) = c². The whole theorem is one perpendicular line and the fact that shape is angles.

It is a statement about flatness, not about triangles 🖖

Drag the curvature slider and watch a² + b² = c² stop being true. On a sphere the third side falls short; on a hyperbolic surface it overshoots. Neither surface is doing anything strange — the right angle is still a right angle and the legs are still 3 and 4. What changed is the space.

The laws that replace it, cos(c/R) = cos(a/R)·cos(b/R) and cosh(c/R) = cosh(a/R)·cosh(b/R), both become c² = a² + b² as R grows, because the first surviving term of each expansion is the square. This is why the theorem is logically equivalent to Euclid’s parallel postulate: assume one and you can prove the other. A surveyor can ignore this; anyone working at the scale of the Earth, or of spacetime, cannot.

And the angles are not a separate symptom: the amount the sum misses 180° by is exactly the curvature multiplied by the area, which is the Gauss–Bonnet theorem. The tool never measures the area of the curved triangle — it reads it off the three angles.

The squares are incidental — and the leftovers can be squared 🖖

Nothing in the theorem requires squares. Build any shape on the three sides, so long as the three are similar to each other, and the two on the legs still add up to the one on the hypotenuse — that is Euclid, Elements VI.31, and it works for the same reason as everything else here: area scales as the square of length. Use semicircles and something startling drops out. The semicircle on the hypotenuse passes through the right angle, and the two crescents left outside it have a combined area exactly equal to the triangle. Hippocrates of Chios found that around 440 BCE, and it was the first time anyone had shown a region with curved edges to have exactly the area of a straight-sided one.

Older than its name, and the name is probably wrong 🖖

Pythagoras of Samos left no writings, and the attribution to him first appears centuries after he died. The relationship itself is far older and turns up independently in several places. The Babylonian tablet Plimpton 322, from around 1800 BCE, lists numbers that satisfy it — though Eleanor Robson’s reassessment argues the tablet is a teacher’s exercise in reciprocal pairs rather than a table of triples for their own sake. The Baudhāyana Śulbasūtra, a manual for laying out sacrificial altars, states the diagonal rule several centuries before Euclid but proves nothing. In China the gōugǔ rule appears in the Zhōubì Suànjīng, with the dissection diagram usually credited to Zhao Shuang’s commentary in the third century CE. What Euclid supplies, around 300 BCE in Elements I.47, is the first surviving proof — and that is the part nobody else had written down. Elisha Loomis later collected 370 different proofs in one volume.

Every triple is a rational point on a circle 🖖

Divide a² + b² = c² by c² and you get x² + y² = 1 with x and y rational. So Pythagorean triples are not really about triangles either — they are the rational points on the unit circle, and there is a clean way to find all of them. Draw the line from (−1, 0) with rational slope; it meets the circle again at a rational point, and every rational point on the circle except (−1, 0) itself arises exactly once this way. That is where Euclid’s m and n come from, and why the tool can hand them back to you from a, b and c. The method works because a circle with one rational point on it is a curve of genus 0. Try the same on x³ + y³ = 1 and it fails: that curve has genus 1, and a line through one of its rational points meets it in two more rather than one, so the trick has nothing to grip. Genus 1 promises nothing either way, since an elliptic curve can carry infinitely many rational points, and this one happens to carry only (1, 0) and (0, 1): Fermat’s last theorem for cubes, which took Euler to prove. The distance between Pythagoras and Fermat is that one number.

Problems solved in full

  1. Showing the 1.4142 hypotenuse is a number no fraction can write 5 steps

    Show that the hypotenuse the tool prints as 1.4142 is a number no fraction can write. This is The proof view with both legs set to 1, so the theorem gives c² = 2 and nothing else is in play.

    1. Two legs of 1 make c² = 2, and 2 is not a perfect square, so c is not a whole number. That part is easy. The hard claim is that it is not a fraction either, and a fraction is what every measurement ever taken has been.

    2. Assume it is one and write it in lowest terms — every fraction has such a form, so assuming it costs nothing. Squaring and clearing the denominator converts a claim about a length into a claim about two integers, which is the only move in the proof that needed inventing.

    3. An odd number squares to an odd number, so p² being even forces p itself to be even. Substituting p = 2m and dividing through puts q in exactly the position p was just in, and now both are even — which contradicts the lowest terms that were chosen freely. The assumption is the only thing in the argument that can be wrong.

    4. So p² = 2q² has no solution in whole numbers at all. Move the target by one and there are infinitely many: pair after pair satisfies p² − 2q² = ±1, and 1 is the smallest a non-zero gap between whole numbers can be. The near misses get arbitrarily good in relative terms and the gap never closes.

    5. Factoring the difference converts that near miss into an error. The numerator is the ±1 from the line above, so the entire error is one over something of size roughly 2√2 q² — the accuracy of a good approximation to √2 comes from q being large, not from any cleverness about p.

    Answer

    Every number the tool prints for this triangle is a rounding: 1.4142 for c, and 0.7071 for the altitude and for both pieces it cuts the hypotenuse into, all three of which are c/2. Four decimals is not a limitation of the display — no display of any width would finish, and step 3 is the reason. One consequence lands at once: no Pythagorean triple has a = b, because that would require whole numbers with p² = 2q², so of the infinitely many right triangles with three whole sides not one is isosceles. The other is that 1.4142 is unreachable in a measurable way rather than a vague one — 99/70 misses by 7.2 × 10⁻⁵, 239/169 does better, and the gap stays at ±1 for every pair that follows. The Greeks knew these pairs as side and diagonal numbers and built with them for centuries, which is the working answer to an impossibility: you cannot have √2, but you can have as many of its digits as you are willing to pay for.

  2. The recipe that produced the 5, 12 and 13 whole number triple 6 steps

    The first problem showed the unit square's diagonal is irrational. Here 5, 12 and 13 are all whole numbers, and the panel even names the pair (m, n) = (3, 2) that produced them. So ask the harder question: does that recipe catch every such triple — and what do all of them secretly have in common?

    1. Start from the panel. 25 and 144 add to 169, and 169 is 13² exactly, which is what makes this triangle worth a name.

    2. Euclid's recipe takes any two whole numbers and returns a triple. Expand the squares and the cross terms cancel: the identity holds for every m and n, so it can never fail to produce a right triangle.

    3. The panel's own pair is (3, 2), which is where 5-12-13 comes from. Feed it (2, 1) instead and out comes 3-4-5.

    4. But does it catch them all? Divide the theorem by c² and the question changes shape: which points with rational coordinates lie on the unit circle? Every one of them is reached by a line of rational slope through (−1, 0), and t = n/m is exactly that slope. So the list is complete — no triple can hide from it.

    5. Now the secret, and it comes from how few things a square can be. Modulo 3 a square is 0 or 1, never 2. Modulo 5 it is 0, 1 or 4. Modulo 8 it is 0, 1 or 4. Feed a² + b² = c² through those and the possibilities collapse fast.

    6. Rather than trust that argument, count. Sixteen primitive triples have a hypotenuse under 100.

    Answer

    Every primitive triple has one leg divisible by 3, one leg divisible by 4, and one side divisible by 5 — so the product of the three sides is always a multiple of 60. Checked against all sixteen with hypotenuse under 100: sixteen out of sixteen on each count. 3-4-5 makes it look like a coincidence, because there the three divisors land on three different sides. In 5-12-13 the single leg 12 carries both the 3 and the 4, and the 5 has moved to a leg rather than the hypotenuse. The tool draws one triangle at a time, and this pattern only exists across all of them at once.

Learning path

The triangle rules, and where they come from

Leads to Solving any triangle a² + b² = c², and the restriction that comes with it: it is a statement about right triangles only.

References (5)

Example problems

  • 3-4-5 - The squares on the legs hold 9 and 16, and the square on the hypotenuse holds 25. It is a Pythagorean triple, generated by m = 2 and n = 1.
  • 5-12-13 - 25 + 144 = 169, so c = 13 exactly. A second triple, from m = 3 and n = 2 — proof that 3-4-5 is an instance of a rule and not a piece of magic.
  • The one that broke a school - Two legs of 1 give c = 1.4142…, and no fraction of whole numbers equals it. The proof view shows the altitude landing exactly halfway, which is the symmetry that makes this the simplest case to argue about.
  • On a sphere - The same legs 3 and 4 on a sphere of radius 3.6199. The hypotenuse comes out at 4.5698 instead of 5 — the surface curves toward itself, so the third side has less distance to cover.
  • Hyperbolic - The same legs 3 and 4 on a hyperbolic surface of the same radius. Now the hypotenuse is 5.3118, longer than 5. Between these two lies the flat case, and only there is c exactly 5.