Pythagorean Triplets

ab

We seek to identify all positive integers a, b, and c so that a^{2}+b^{2} = c^{2}. A triple (a, b, c) satisfying this equation is called a pythagorean triplet. Since any multiple of a pythagorean triplet is again one, we only seek primitive ones where a, b, and c have no common factor.

By setting x = \frac{a}{c} and y = \frac{b}{c}, we can first seek rational numbers x and y so that x^{2} + y^{2} = 1.

Now, if (x, y) is such a pair of rational numbers, the line from (x, y) to (−1, 0) will have rational slope - call it t. Along this line, y = t(x + 1), so x^{2} + t^{2}(x + 1)^{2} = 1 telling us that

(1 + t^{2})x^{2} + 2t^{2}x = 1 − t^{2}

or

x^{2} + \frac{2t^{2}}{1 + t^{2}} x = \frac{1 − t^{2}}{1 + t^{2}}

Complete the square on the above equation giving

(x + \frac{t^{2}}{1 + t^{2}} )^{2} = \frac{1 − t^{2}}{1 + t^{2}} + \frac{t^{4}}{(1 + t^{2})^{2}}
= \frac{1}{(1 + t^{2})^{2}}

Taking square roots gives

x = \frac{1 − t^{2}}{1 + t^{2}} .

Write t = \frac{u}{v} with u, v positive integers having no common factor. This gives

x = \frac{v^{2} − u^{2}}{v^{2} + u^{2}}
y = \frac{2uv}{v^{2} + u^{2}}

Using x = \frac{a}{c} and y = \frac{b}{c} we see that

a = k(v^{2} − u^{2})
b = k(2uv)
c = k(v^{2} + u^{2})

for some rational number k.

By thinking about the highest power p^{r} of an odd prime appearing in the denominator of k (written in lowest terms), one sees that p^{r} divides uv, u^{2} +v^{2}, −u^{2} +v^{2}, 2u^{2}, and 2v^{2}. This means p^{\frac{r}{2}} divides both u and v contradicting u and v having no common factor, UN-LESS r = 0. Similarly by noting exactly one of a and b can be odd, and choosing b to be the even number, we can eliminate powers of 2 in the denominator of k. This shows that k is a whole number and we obtain:

Theorem: The pythagorean triplets with b even are exactly the triples of the form

a = v^{2} − u^{2}
b = 2uv
c = v^{2} + u^{2}

where u and v are positive whole numbers with no common factor.