A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.
Primitive Pythagorean triples (a, b, c) with a2 + b2 = c2 and gcd(a,b,c) = 1 are parameterized by: a = m2 - n2, b = 2mn, c = m2 + n2 for coprime m > n > 0 of opposite parity. This complete description follows from factoring in Gaussian integers.
Generate a table for every m ≤ 5 and n < m, and mark which pairs pass the conditions. The passing pairs give (3, 4, 5), (5, 12, 13), (15, 8, 17), (7, 24, 25), (21, 20, 29) and (9, 40, 41), while (3, 1), (5, 1), (5, 3) and (4, 2) give non-primitive triples. Then view each triple as a rational point on the unit circle, (a/c, b/c).
You can verify easily that 3² + 4² = 5², and that 5² + 12² = 13². A natural question is: are there infinitely many such triples, and can we describe all of them systematically? The parametrization answers yes to both. Every primitive Pythagorean triple — one where gcd(a, b, c) = 1 — arises from a pair of parameters (m, n) via the formulas a = m² − n², b = 2mn, c = m² + n², where m > n > 0, gcd(m, n) = 1, and m and n have opposite parity (one even, one odd).
To see why this works algebraically, rewrite a² + b² = c² as b² = c² − a² = (c − a)(c + a). In a primitive triple, exactly one of a, b is even — say b is even. Then (c − a) and (c + a) are both even, their halves (c − a)/2 and (c + a)/2 are coprime, and the halves multiply to the perfect square (b/2)². When two coprime positive numbers multiply to a perfect square, each must itself be a perfect square. Setting c − a = 2n² and c + a = 2m² and solving gives c = m² + n², a = m² − n², b = 2mn. The coprimality and parity conditions on m, n ensure the triple is primitive and that you don't double-count.
The deeper explanation uses Gaussian integers — complex numbers of the form a + bi with a, b ∈ ℤ. The equation a² + b² = c² becomes (a + bi)(a − bi) = c². In the Gaussian integers, c factors into Gaussian primes, and the factorization of c² as a product of two conjugate factors pins down what a and b must be. The parity and coprimality conditions on m, n correspond exactly to the Gaussian factorization being primitive. This approach generalizes: the sum-of-two-squares theorem you studied as a prerequisite follows the same logic — a prime p is a sum of two squares if and only if p ≡ 1 (mod 4), which corresponds to p splitting as a product of conjugate Gaussian primes.
The parametrization has a beautiful completeness property: it misses nothing. Every primitive triple appears exactly once (up to swapping a and b). Non-primitive triples are just multiples: for any k, (ka, kb, kc) is a triple whenever (a, b, c) is. So the full list of all Pythagorean triples is exactly {k(m² − n², 2mn, m² + n²) : m > n > 0, gcd(m,n) = 1, m and n opposite parity, k ≥ 1}. This is a rare example in number theory of a complete, explicit description of all integer solutions to a Diophantine equation.