Pythagorean Triples
Statement
A Pythagorean triple is a triple of positive integers satisfying
Every primitive Pythagorean triple (with and even) has the form
where , , and .
Every Pythagorean triple is obtained by multiplying a primitive one by a common factor .
Visualization
Primitive triples generated by small :
m n a = m²-n² b = 2mn c = m²+n² Check
----+---+-----------+---------+-----------+------
2 1 3 4 5 3²+4²=25=5² ✓
3 2 5 12 13 5²+12²=169=13² ✓
4 1 15 8 17 15²+8²=289=17² ✓
4 3 7 24 25 7²+24²=625=25² ✓
5 2 21 20 29 21²+20²=841=29²✓
5 4 9 40 41 9²+40²=1681=41²✓
The first triple is the simplest and best known. All others in the table above are primitive because and .
Proof Sketch
-
Odd/even structure: In a primitive triple, exactly one of is even. Say is even. Then , and one checks .
-
Unique factorization: Write and (using that the product of two coprime numbers each equalling a perfect square forces each factor to be a square). Then and .
-
Complete classification: Conversely, for any with and , the triple is primitive.
-
Every triple: Multiply any primitive triple by to get .
Connections
The proof uses unique factorization from the Fundamental Theorem of ArithmeticFundamental Theorem of ArithmeticEvery integer greater than 1 has a unique prime factorizationRead more →. The structure of (Gaussian integers) provides a slick alternative proof — each factor or is a product of Gaussian primes, tying this to Sum of Two SquaresSum of Two SquaresA prime is a sum of two perfect squares if and only if it equals 2 or is congruent to 1 mod 4Read more →. Pythagorean triples also connect to Euler's Totient (counting coprime pairs) and to Diophantine equations more broadly, which uses ideas from Chinese Remainder TheoremChinese Remainder TheoremSimultaneous congruences with coprime moduli have a unique solution mod their productRead more →.
Lean4 Proof
/-- Mathlib defines `PythagoreanTriple x y z` as `x * x + y * y = z * z` (over ℤ).
The triple (3, 4, 5) satisfies this by a direct numerical check. -/
theorem pyth_345 : PythagoreanTriple 3 4 5 := by
unfold PythagoreanTriple
norm_num
/-- Scaling: if (a, b, c) is a Pythagorean triple, so is (k·a, k·b, k·c). -/
theorem pyth_scaled (x y z k : ℤ) (h : PythagoreanTriple x y z) :
PythagoreanTriple (k * x) (k * y) (k * z) :=
h.mul kReferenced by
- Euler's Formula for Planar GraphsGraph Theory
- Pell's EquationNumber Theory