Pythagorean Triples

A Pythagorean triple is three whole numbers fitting Pythagoras' theorem:

a^2 + b^2 = c^2.

The famous (3, 4, 5) is the smallest, known to the Babylonians a thousand years before Pythagoras. Finding all such triples is a classic Diophantine problem with a beautiful, complete answer.

Primitive triples

Scaling a triple gives another — (6, 8, 10) is just (3,4,5) doubled — so we focus on primitive triples, where a, b, c share no common factor (gcd = 1). Every triple is a primitive one scaled up, so it's enough to find all the primitives.

Euclid's complete formula

Every primitive Pythagorean triple (with b even) is given, for coprime m > n > 0 of opposite parity, by

a = m^2 - n^2, \qquad b = 2mn, \qquad c = m^2 + n^2.

Try m = 2, n = 1: (3, 4, 5). Then m = 3, n = 2 gives (5, 12, 13), and m = 4, n = 1 gives (15, 8, 17). Two coprime seeds generate the entire infinite family — and a quick check confirms (m^2-n^2)^2 + (2mn)^2 = (m^2+n^2)^2 identically.

A geometric retelling

Dividing by c^2 turns the equation into (a/c)^2 + (b/c)^2 = 1 — so primitive triples are rational points on the unit circle. Drawing lines of rational slope from the point (-1, 0) hits every such point exactly once, which is another way to derive Euclid's formula. This "rational points on a curve" viewpoint is the seed of modern arithmetic geometry — and it makes the contrast with Fermat's Last Theorem (no such solutions for cubes and higher) all the more striking.