## Pythagorean Triples

Note: This is the alternative Pythagorean Triples page, for WWW browser which cannot display special symbols. In particular, I am using ^2 for "squared" and +- for "plus or minus" in this version. Please let me know if this is working for you or not, by sending me email. Return to the primary Pythagorean Triples page.

The 3-4-5 right triangle (on the left) is famous. It is the smallest non-trivial (with sides greater than zero) right triangle with integer sides. By The Pythagorean Theorem, we know that 3^2+4^2=5^2 (9+16=25). These numbers are then the smallest Pythagorean triple: 3,4,5. Are there any others?

First, let's notice that we can double or triple (etc.) the 3-4-5 triangle. 6^2+8^2=10^2, 9^2+12^2=15^2, 12^2+16^2=20^2, etc. We could consider these triples to be uninteresting, as they are all the same triangle; the scale is just different. The other, interesting ones are called Primitive Pythagorean Triples.

A little experimentation shows that 5^2+12^2=13^2. And that too can be doubled, tripled, etc., as can all other, as yet undiscovered, triples. You may experiment for quite a while before you find the next interesting triple: 8^2+15^2=17^2.

How about a Pythagorean triple with two of the numbers being equal? Then x^2+x^2=z^2, or 2x^2=z^2, or z=a sqr(2), where sqr() is the square root function. And we know that this equation has no integer solutions (Irrational Numbers).

It is well known that if you choose arbitrary positive integers m>n, that these equations generate all Pythagorean Triples (x, y, z):

x=m^2-n^2, y=2mn, z=m^2+n^2

It is fairly easy to show that no matter what m and n are, x^2+y^2=z^2 (just show that x^2+y^2 is the same number as z^2). I won't show that this method generates ALL Pythagorean Triples. This method shows that there are infinitely many Pythagorean Triples. If we want just primitive triples, then m and n must be relatively prime, and one must be even while the other is odd. I won't prove that, either. Here are the first few values of m and n:

 m n x y z 2 1 3 4 5 3 1 8 6 10 3 2 5 12 13 4 1 15 8 17 4 2 12 16 20 4 3 7 24 25 5 1 24 10 26 5 2 21 20 29 5 3 16 30 34 5 4 9 40 41 6 1 35 12 37 6 2 32 24 40 6 3 27 36 45 6 4 20 48 52 6 5 11 60 61 7 1 48 14 50 7 2 45 28 53 7 3 40 42 58 7 4 33 56 65 7 5 24 70 74 7 6 13 84 85 ...

I notice that 3^2+4^2=5^2 and 5^2+12^2=13^2 have a hypotenuse one greater than one of the legs. We see from the above table that there other triples like that. Let's look at these triples in more detail:

x^2+y^2=(y+1)^2=y^2+2y+1
x^2=2y+1
y=(x^2-1)/2

We should be able to just plug in any odd number x and get a Pythagorean Triple:

 x y z 1 0 1 (trivial) 3 4 5 5 12 13 7 24 25 9 40 41 11 60 61 13 84 85 ...

This, of course, does not generate all triples. But there are infinitely many triples of this form.