Math 2.0

Number theory Proof

Proof of the classification of Pythagorean triples

Builds on Pythagorean tripleCoprime integersGreatest common divisorEuclid's lemmaFundamental theorem of arithmeticP-adic valuationP-adic valuation of a product

Proof

Lemma. Let uu and vv be coprime positive integers such that uvuv is a square. Then uu and vv are squares.

  1. Let pp be a prime and νp\nu_p the p-adic valuation. By the valuation of a product, νp(u)+νp(v)=νp(uv)\nu_p(u) + \nu_p(v) = \nu_p(uv), which is even since uvuv is a square.
  2. The prime pp does not divide both uu and vv. So νp(u)\nu_p(u) is 00 or equals νp(uv)\nu_p(uv). In both cases νp(u)\nu_p(u) is even.
  3. By the fundamental theorem of arithmetic, u=∏ppνp(u)=(∏ppνp(u)/2)2u = \prod_p p^{\nu_p(u)} = \bigl(\prod_p p^{\nu_p(u)/2}\bigr)^2. The same holds for vv.

Part 1: the formula gives primitive triples.

  1. Let m>n≥1m > n \ge 1 be coprime with m−nm - n odd. Put a=m2−n2a = m^2 - n^2, b=2mnb = 2mn and c=m2+n2c = m^2 + n^2. All three are positive.
  2. We have a2+b2=m4−2m2n2+n4+4m2n2=(m2+n2)2=c2a^2 + b^2 = m^4 - 2m^2n^2 + n^4 + 4m^2n^2 = (m^2 + n^2)^2 = c^2. So (a,b,c)(a, b, c) is a Pythagorean triple.
  3. Since m−nm - n is odd, one of m,nm, n is even and the other odd. So cc is odd.
  4. Let qq be a prime dividing aa and cc. Then qq divides c+a=2m2c + a = 2m^2 and c−a=2n2c - a = 2n^2. As cc is odd, q≠2q \ne 2.
  5. By Euclid's lemma, q∣mq \mid m and q∣nq \mid n. This contradicts gcd⁡(m,n)=1\gcd(m, n) = 1. So gcd⁡(a,b,c)=1\gcd(a, b, c) = 1, and the triple is primitive.

Part 2: each primitive triple with bb even comes from exactly one pair.

  1. Let (a,b,c)(a, b, c) be primitive with bb even. A prime dividing aa and bb divides c2c^2, hence cc by Euclid's lemma. So gcd⁡(a,b)=1\gcd(a, b) = 1, and likewise gcd⁡(a,c)=1\gcd(a, c) = 1.
  2. Since bb is even and gcd⁡(a,b)=1\gcd(a, b) = 1, aa is odd. Then c2=a2+b2c^2 = a^2 + b^2 is odd, so cc is odd.
  3. Since b>0b > 0, c>ac > a. Put u=(c+a)/2u = (c + a)/2 and v=(c−a)/2v = (c - a)/2. These are positive integers, as aa and cc are odd.
  4. A common divisor of uu and vv divides u+v=cu + v = c and u−v=au - v = a. So gcd⁡(u,v)=1\gcd(u, v) = 1.
  5. We have uv=(c2−a2)/4=(b/2)2uv = (c^2 - a^2)/4 = (b/2)^2, a square. By the lemma, u=m2u = m^2 and v=n2v = n^2 for positive integers mm and nn.
  6. Then c=u+v=m2+n2c = u + v = m^2 + n^2, a=u−v=m2−n2a = u - v = m^2 - n^2, and b=2uv=2mnb = 2\sqrt{uv} = 2mn.
  7. Since a>0a > 0, m>nm > n. A common divisor of mm and nn divides uu and vv, so gcd⁡(m,n)=1\gcd(m, n) = 1. Since c=m2+n2c = m^2 + n^2 is odd, m−nm - n is odd.
  8. Any pair (m,n)(m, n) as in Part 1 that gives (a,b,c)(a, b, c) satisfies m2=(c+a)/2m^2 = (c + a)/2 and n2=(c−a)/2n^2 = (c - a)/2. As m,n>0m, n > 0, the pair is unique.

Part 3: every triple is a multiple of a primitive one.

  1. Let (x,y,z)(x, y, z) be a Pythagorean triple and k=gcd⁡(x,y,z)≥1k = \gcd(x, y, z) \ge 1. Put a=x/ka = x/k, b=y/kb = y/k and c=z/kc = z/k.
  2. Dividing x2+y2=z2x^2 + y^2 = z^2 by k2k^2 gives a2+b2=c2a^2 + b^2 = c^2. A common divisor ee of a,b,ca, b, c makes keke a common divisor of x,y,zx, y, z, so e=1e = 1. Thus (a,b,c)(a, b, c) is primitive.
  3. Not both of a,ba, b are even: else cc is even too, against step 18. Not both are odd: else c2≡2(mod4)c^2 \equiv 2 \pmod 4, but squares are 00 or 11 modulo 44.
  4. So exactly one of aa and bb is even. After swapping the first two entries if needed, (a,b,c)(a, b, c) has bb even and Part 2 applies. Hence (x,y,z)=(ka,kb,kc)(x, y, z) = (ka, kb, kc) up to the order of the first two entries.

Idea

Write b2=(c−a)(c+a)b^2 = (c - a)(c + a). In a primitive triple the halves (c+a)/2(c + a)/2 and (c−a)/2(c - a)/2 are coprime and multiply to a square, so each is a square m2m^2 and n2n^2. This gives aa, bb and cc in terms of mm and nn. Dividing by the gcd reduces every triple to a primitive one.

Reading path

To understand this page from the ground up, read these 39 pages in order. The foundations come first. The path takes the proofs Proof of Bézout's identity, Proof of the generalized Euclid's lemma, Proof of the commutativity of addition by induction, Proof of Euclid's lemma, Proof of strong induction from ordinary induction, Proof that the p-adic valuation of a product is the sum of the valuations, Proof of the fundamental theorem of arithmetic, Proof of the existence of prime factorization, Proof of the well-ordering principle from strong induction, Proof of the division algorithm, Proof of the existence of a prime divisor.

Show the path as a graph
Definition by recursion, concept, no evidence levelDefinition by recursi…conceptDivisibility, definition, no evidence levelDivisibilitydefinitionMathematical induction, concept, no evidence levelMathematical inductionconceptNatural numbers, object, no evidence levelNatural numbersobjectPeano axioms, concept, no evidence levelPeano axiomsconceptGreatest common divisor, definition, no evidence levelGreatest common divis…definitionPrime number, definition, no evidence levelPrime numberdefinitionSuccessor function, definition, no evidence levelSuccessor functiondefinitionCoprime integers, definition, no evidence levelCoprime integersdefinitionPythagorean triple, definition, no evidence levelPythagorean tripledefinitionP-adic valuation, definition, no evidence levelP-adic valuationdefinitionPrime factorization, definition, no evidence levelPrime factorizationdefinitionAddition of natural numbers, definition, no evidence levelAddition of natural n…definitionThe successor function is injective, statement, no evidence levelThe successor functio…statementZero is not a successor, statement, no evidence levelZero is not a success…statementProof of the commutativity of addition by induction, proof, no evidence levelProof of the commutat…proofOrder on the natural numbers, definition, no evidence levelOrder on the natural …definitionCommutativity of addition, statement, no evidence levelCommutativity of addi…statementProof of strong induction from ordinary induction, proof, no evidence levelProof of strong induc…proofStrong induction, statement, no evidence levelStrong inductionstatementProof of the well-ordering principle from strong induction, proof, no evidence levelProof of the well-ord…proofWell-ordering principle, statement, no evidence levelWell-ordering princip…statementProof of the division algorithm, proof, no evidence levelProof of the division…proofProof of the existence of a prime divisor, proof, no evidence levelProof of the existenc…proofDivision algorithm, statement, no evidence levelDivision algorithmstatementExistence of a prime divisor, statement, no evidence levelExistence of a prime …statementProof of Bézout's identity, proof, no evidence levelProof of Bézout's ide…proofProof of the existence of prime factorization, proof, no evidence levelProof of the existenc…proofBézout's identity, statement, no evidence levelBézout's identitystatementExistence of prime factorization, statement, no evidence levelExistence of prime fa…statementProof of the generalized Euclid's lemma, proof, no evidence levelProof of the generali…proofGeneralized Euclid's lemma, statement, no evidence levelGeneralized Euclid's …statementProof of Euclid's lemma, proof, no evidence levelProof of Euclid's lem…proofEuclid's lemma, statement, no evidence levelEuclid's lemmastatementProof of the fundamental theorem of arithmetic, proof, no evidence levelProof of the fundamen…proofProof that the p-adic valuation of a product is the sum of the valuations, proof, no evidence levelProof that the p-adic…proofFundamental theorem of arithmetic, statement, no evidence levelFundamental theorem o…statementP-adic valuation of a product, statement, no evidence levelP-adic valuation of a…statementProof of the classification of Pythagorean triples, proof, no evidence levelProof of the classifi…proof
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Definition by recursion concept
  2. Divisibility definition
  3. Mathematical induction concept
  4. Natural numbers object
  5. Peano axioms concept
  6. Greatest common divisor definition
  7. Prime number definition
  8. Successor function definition
  9. Coprime integers definition
  10. Pythagorean triple definition
  11. P-adic valuation definition
  12. Prime factorization definition
  13. Addition of natural numbers definition
  14. The successor function is injective statement
  15. Zero is not a successor statement
  16. Proof of the commutativity of addition by induction proof
  17. Order on the natural numbers definition
  18. Commutativity of addition statement
  19. Proof of strong induction from ordinary induction proof
  20. Strong induction statement
  21. Proof of the well-ordering principle from strong induction proof
  22. Well-ordering principle statement
  23. Proof of the division algorithm proof
  24. Proof of the existence of a prime divisor proof
  25. Division algorithm statement
  26. Existence of a prime divisor statement
  27. Proof of Bézout's identity proof
  28. Proof of the existence of prime factorization proof
  29. Bézout's identity statement
  30. Existence of prime factorization statement
  31. Proof of the generalized Euclid's lemma proof
  32. Generalized Euclid's lemma statement
  33. Proof of Euclid's lemma proof
  34. Euclid's lemma statement
  35. Proof of the fundamental theorem of arithmetic proof
  36. Proof that the p-adic valuation of a product is the sum of the valuations proof
  37. Fundamental theorem of arithmetic statement
  38. P-adic valuation of a product statement
  39. Proof of the classification of Pythagorean triples proof

Where this leads

6 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Pythagorean_triple, Proof of Euclid's formula
About this page
Tag6BX1MKXX97
URIm2://6BX1MKXX97
Kindproof
WritingW0 stub
MSC11D09
ProvesClassification of Pythagorean triples
UsesPythagorean triple, Coprime integers, Greatest common divisor, Euclid's lemma, Fundamental theorem of arithmetic, P-adic valuation, P-adic valuation of a product
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.