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 TheoremFermat'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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesSet Operations: Union, Intersection, and ComplementProof by CasesProving by Cases and ExhaustionVacuous Truth and Trivial CasesProof by Cases (Proof by Exhaustion)Mathematical InductionDivisibility and Greatest Common DivisorThe Fundamental Theorem of ArithmeticDivisibility Theory (Formal Treatment)Bézout's IdentityLinear Diophantine EquationsPell's EquationLagrange's Four-Square TheoremSum of Two Squares TheoremPythagorean Triples (Parametrization)

Longest path: 83 steps · 384 total prerequisite topics

Prerequisites (2)

Leads To (1)