A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Pythagorean Triples (Parametrization)

Graduate Depth 82 in the knowledge graph ☐ I know this ☆ Set as goal
1topic build on this
384prerequisites beneath it
See this on the map →
Linear Diophantine EquationsSum of Two Squares Theorem→→Fermat's Last Theorem (Overview)
pythagorean-triples diophantine parametrization

Core Idea

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.

Explainer

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, coprime to each other, and their product is a perfect square b². When two coprime 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.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Proof by Cases → Proving by Cases and Exhaustion → Vacuous Truth and Trivial Cases → Proof by Cases (Proof by Exhaustion) → Mathematical Induction → Divisibility and Greatest Common Divisor → The Fundamental Theorem of Arithmetic → Divisibility Theory (Formal Treatment) → Bézout's Identity → Linear Diophantine Equations → Pell's Equation → Lagrange's Four-Square Theorem → Sum of Two Squares Theorem → Pythagorean Triples (Parametrization)

Longest path: 83 steps · 384 total prerequisite topics

Prerequisites (2)

Leads To (1)