Motivation
The equation has infinitely many solutions in positive integers, such as , and . Listing examples does not tell us what all solutions look like. This chapter gives a complete description.
The plan has three stages.
- Reduce to primitive triples. If is a solution, then so is for every positive integer . We show that every positive triple is obtained in exactly one way by scaling a primitive one.
- Pin down the arithmetic shape of a primitive triple. We prove that its entries are pairwise coprime, that exactly one leg is even, and that the hypotenuse is odd.
- Factor and use unique factorization. We rewrite as a product of two coprime integers. Unique factorization then forces each factor to be a perfect square, and the parameters and appear.
At the end we view the same result geometrically. A positive triple determines a rational point in the first quadrant of the unit circle; its positive integer multiples determine the same point. A single rational parameter describes these points and, more broadly, all rational points except one.
Definitions
Definition 7.3.1
(Positive and primitive triples)
A positive Pythagorean triple is an ordered triple of integers with , , and
The numbers and are the legs and is the hypotenuse. The triple is primitive if .
Two points about these conventions need to be explicit.
Excluded cases. Triples with a zero or negative entry are excluded. The equation itself also has solutions such as , and . The zero cases do not describe triangles. The sign changes add nothing new, because , and appear only through their squares. Requiring positivity means each geometric right triangle with integer sides is counted once for each ordering of its legs.
Order matters. Because the triple is ordered, and are different positive triples, even though they describe the same triangle. This distinction becomes important when we state uniqueness.
Throughout, we use the Fundamental Theorem of Arithmetic: every integer greater than factors as a product of primes in a way that is unique up to the order of the factors.
Structure of primitive triples
Lemma 7.3.2
(Pairwise coprimality)
If is a primitive positive triple, then
Proof
(A common prime factor spreads to the third entry)
Suppose a prime divides two of the three entries. We show that then divides the third entry too, which contradicts .
- If and . Then . Since is prime and , Euclid's lemma gives .
- If and . Then , so .
- If and . Then , so .
In every case divides , which is impossible. So no prime divides any two of the entries, and each pairwise gcd equals .
Lemma 7.3.3
(Parity via residues modulo 4)
Every integer square is congruent to or modulo . Consequently, in any integer solution of the legs are not both odd. In a primitive positive triple, exactly one leg is even and the hypotenuse is odd.
Proof
(Squares modulo 4)
Squares modulo 4. Every integer is either or .
- If , then .
- If , then .
So even squares are and odd squares are .
The legs are not both odd. If and were both odd, then
No square is congruent to modulo , so this is impossible. This step uses no primitivity.
The legs are not both even (primitive case). If and , then , which contradicts the pairwise-coprimality lemma.
So exactly one leg is even and the other is odd. Then
which means is odd. Hence is odd.
For a non-primitive triple both legs may be even; for example, in both legs are even. What the parity lemma rules out in general is that both legs are odd. The statement "exactly one leg is even" holds for primitive triples.
The classification theorem
By the parity lemma, every primitive positive triple has one odd leg and one even leg. We fix the convention that the odd leg is written first, as , and the even leg second, as .
Theorem 7.3.4
(Classification of primitive triples)
(Existence and uniqueness.) Let be a primitive positive triple with odd and even. Then there are unique integers and with , , and of opposite parity, such that
(Converse.) Suppose are coprime integers of opposite parity. Then is a primitive positive triple whose first leg is odd and whose second leg is even.
Proof
(Existence of the parameters)
Step 1: and are positive even integers. By the parity lemma, and are both odd. The sum and the difference of two odd numbers are even, so and are even. Clearly . Also , so . Since and are positive, this gives , so . Define the positive integers
Note that , , and because .
Step 2: and are coprime. Let . Then divides and . So divides , which equals by the pairwise-coprimality lemma. Hence .
Step 3: is a perfect square. Since is even, is a positive integer, and
Step 4: unique factorization makes and squares. Write . Let be any prime dividing . Because , the prime does not divide . So the exponent of in is exactly its exponent in . The prime factorization of is obtained by doubling every exponent in the factorization of , so every exponent in is even. By uniqueness of prime factorization, the exponent of in is even.
This holds for every prime dividing , so is a perfect square. (If , it is the square .) The same argument applied to shows that is a perfect square. Let and be the positive integers with
Since , we get .
Step 5: recover the formulas.
- .
- .
- . Both and are positive, so , which gives .
Step 6: and are coprime. If a prime divided both and , it would divide both and . This contradicts Step 2.
Step 7: and have opposite parity. The hypotenuse is odd. If and had the same parity, then and would have the same parity, and their sum would be even. So and have opposite parity. (They cannot both be even anyway, since they are coprime.)
Proof X-ray
Where each hypothesis enters the existence proof
The proof turns one square, , into two squares by factoring and halving both factors. Each hypothesis has one job.
- Parity (the parity lemma) makes even, so and are integers and is the square of an integer.
- Primitivity, through , gives . This is the key move: a square that is the product of two coprime positive integers splits into two squares, because the even exponent of each prime lies wholly in one factor.
- Positivity gives and lets us take positive square roots, so and .
Coprimality cannot be skipped. The non-primitive triple has an odd first leg and gives , and , yet neither nor is a square; here . Once and exist, their coprimality and opposite parity are read back from and from the oddness of .
Proof
(Uniqueness of the parameters)
Suppose satisfy the three formulas with . Adding and subtracting the formulas for and gives
So and are determined by the triple. A positive integer has only one positive square root, so and are determined by the triple.
Proof
(The converse)
Let be coprime integers of opposite parity. Set
Positivity. Since , we have . Clearly and .
The equation holds. Expanding both sides,
Parity of the legs. Exactly one of and is odd, so is odd. The leg is even. Therefore the odd leg is in the first position and the even leg in the second, as the convention requires.
Primitivity. Suppose a prime divides both and . Since is odd, is odd. Now
so and . Since is odd, it follows that and , and then and . This contradicts . So , and therefore .
What the uniqueness statement does and does not say
The classification theorem gives a bijection between two sets:
- the set of pairs with , and opposite parity;
- the set of primitive positive triples ordered with the odd leg first.
Each such triple has a partner obtained by swapping the legs. The partner is also a primitive positive triple, but its even leg is first, so the formula never produces it directly. To find the parameters of a triple whose even leg comes first, swap the legs and then apply the theorem.
Consequently, each pair accounts for exactly two ordered primitive positive triples, and exactly one unordered pair of legs.
Uniqueness concerns the parameters of a given triple. It does not say that a hypotenuse value determines the triple. The exercise on hypotenuse at the end of this note exhibits two different primitive triples with that hypotenuse.
Reduction of all positive triples to primitive ones
Theorem 7.3.5
(Unique primitive scaling)
Every positive triple can be written as , where is a positive integer and is a primitive positive triple. The integer and the triple are uniquely determined, with .
Proof
(Dividing by the greatest common divisor)
Existence. Let , and set , , . These are positive integers. Dividing by gives
Moreover, , so is primitive.
Uniqueness. Suppose with primitive. Then
So must equal . Then is determined as well.
Combining the classification theorem and the scaling theorem: every positive triple is times a primitive triple, for a unique . That primitive triple, after placing its odd leg first, corresponds to a unique admissible pair .
Rational points on the unit circle
Suppose is a positive triple. Dividing by gives
So is a point on the unit circle . Both coordinates are rational, and both are positive.
Theorem 7.3.6
(Rational parametrization of the circle)
For each rational number , the point
is a rational point of other than .
Conversely, every rational point on the circle with arises from exactly one rational , namely
Furthermore, and both hold if and only if .
Proof
(Lines of rational slope through )
Where the formulas come from. Consider the line through with slope , namely . Substituting into the circle equation and factoring:
The root is the starting point . The second factor vanishes when , which gives the stated . Then
The point lies on the circle. We check directly:
Dividing by gives . Since is rational and , both and are rational.
The point is never . We have , so .
The parameter can be recovered. For the point produced by ,
So distinct values of give distinct points.
Every point other than is reached. Let be a rational point on the circle with . Put , which is rational. Using ,
Then
So produces exactly the point .
Positivity. Since :
- if and only if ;
- if and only if , that is, .
Both inequalities hold together if and only if .
Remarks on this parametrization
Orientation. The parameter is the slope of the line through , and is taken as the horizontal coordinate. With this orientation, rational parameters with correspond exactly to the rational points on the open quarter-circle in the first quadrant.
Boundary points. The value gives and gives . These correspond to the degenerate solutions and , which we excluded. The other three quadrants come from , or , and they correspond to sign changes. The point is the one point not reached by any .
Exact arithmetic. No limiting process, real-number approximation or floating-point arithmetic is involved anywhere. Every step is exact arithmetic with rational numbers, and every rational point other than is obtained from one explicit rational value .
Concept lensGeometric
Primitive triples as rational points of the quarter-circle
A primitive positive triple and the point determine each other: by pairwise coprimality the fractions and are already in lowest terms, so is their common denominator. For the triple with odd leg first and parameters , the slope parameter is
Conversely, write a rational with as in lowest terms. If and have opposite parity, the point is and its triple is the one the classification theorem produces. If and are both odd, the same point has the primitive triple , whose even leg comes first; for example gives the point and the triple . So the rational points with correspond to all ordered primitive triples, with both orderings of the legs.
Worked examples
Worked example 7.3.7
(Classify )
It is a triple. We have .
It is primitive. The number is prime and does not divide , so . Hence .
Put the odd leg first. The odd leg is , so we apply the classification theorem to .
Compute and .
so and .
Check. We have , , and and have opposite parity. The formulas give
The original ordering is the leg-swapped partner of the triple that the formula produces.
Worked example 7.3.8
(Generate and )
The pair . It satisfies , , and opposite parity. It gives
The pair . It is coprime and of opposite parity. It gives
By the converse part of the classification theorem, both triples are primitive, without any separate gcd computation. Their swapped partners are and .
Worked example 7.3.9
(A primitive hypotenuse is never even)
Claim. If is a primitive positive triple, then is odd.
Argument. Suppose were even. Then . The legs cannot both be even, because that would contradict primitivity (the pairwise-coprimality lemma). They cannot both be odd, because then .
So exactly one leg is odd, and
This contradicts . Hence is odd.
Remark. Non-primitive triples can have an even hypotenuse; for example . The claim relies on primitivity.
Counterexample mode
Dropping coprimality or opposite parity
The formulas , , always give a solution of the equation. Without the two side conditions, however, the conclusions of the converse can fail.
Coprimality omitted. Take . These parameters have opposite parity, but . They give
which is not primitive.
Opposite parity omitted. Take . Here , but both are odd. It gives
This triple is not primitive. In addition, after dividing by , the triple has its even leg in the first position. So the formula's "odd-leg slot" now holds an even number.
Conclusion. Both side conditions are needed for the converse to produce exactly the primitive triples, with the correct ordering of the legs.
Common mistakes
- Confusing leg order with uniqueness. An unordered primitive pair of legs still determines a unique admissible because exactly one leg is odd. The formula places that odd leg first: it produces from , while the ordered triple requires an explicit swap.
- Forgetting positivity. If zero or negative entries are allowed, the classification statement as written is false, and the uniqueness count changes.
- Using the wrong range of . In this orientation, positive legs correspond exactly to . Values or give points on an axis or outside the open first quadrant.
Common mistake
(A hypotenuse does not determine its triple)
Uniqueness in the classification theorem concerns the parameters of a given triple. Different primitive triples can share a hypotenuse: and both have , as the exercise on hypotenuse shows.
Common mistake
(A square product does not force square factors)
Two integers can have a square product without being squares themselves; for example . In Step 4 of the existence proof, the conclusion that and are squares rests on .
Common mistake
(Parity facts of primitive triples do not hold for all triples)
In a non-primitive triple both legs and the hypotenuse may be even, as in . What never happens, for any integer solution, is that both legs are odd.
Exercises
Quick check
(Prove that every positive integer Pythagorean triple has integer area . Then show that, for a primitive triple, the area is even.)
Solution
By the scaling theorem, write with primitive. Order its legs so that is odd and is even. (Swapping the legs does not change the product .) By the classification theorem, for an admissible pair . Then
which is an integer.
Parity detail. For the primitive triple (), the area is . Since and have opposite parity, one of them is even. So is even, and therefore the area is even. Equivalently, .
Since every area has the form times a primitive area, in fact every positive triple has even area.
Quick check
(Find all primitive positive triples with hypotenuse , giving a complete argument.)
Solution
By the classification theorem, the primitive triples with hypotenuse correspond to pairs satisfying
Bounding . Since , we have , so , which gives .
Checking each case. We need to be a perfect square:
- : , so .
- : , not a square.
- : , not a square.
- : , so .
- : , not a square.
Both pairs and are coprime and of opposite parity, so both are admissible.
The triples.
- gives . Check: .
- gives . Check: .
Answer. With the odd leg first, the primitive positive triples with hypotenuse are exactly and . As ordered triples there are four, including the swapped partners and .
Non-primitive triples are excluded. The triples and also have hypotenuse , but they are not primitive.
Quick check
(Find the parameters for the triple .)
Solution
The triple is primitive. We have , and is prime and does not divide , so the triple is primitive.
Put the odd leg first. The odd leg is , so we use .
Compute and .
so .
Check. , , and . The given order is the swapped partner of .
Quick check
(Show that no integer solution of has both and odd.)
Solution
If and are both odd, then , so
Every square is congruent to or modulo , so this is impossible. The argument uses neither positivity nor primitivity, so it applies to every integer solution.
Quick check
(Using the circle parametrization theorem, explain why gives a point with positive legs, compute that point, and identify the corresponding primitive triple.)
Solution
Positive legs. Since , the circle parametrization theorem guarantees that both coordinates are positive.
The point. Here , so and . Then
The triple. Clearing the common denominator gives . This is primitive, with odd leg first, and corresponds to ; this matches .
Recovering . As a check, .