Generating Pythagorean Triples


Which triples of whole numbers {a, b, c} satisfy   a2 + b2 = c2 ?

You probably know {3, 4, 5} and {5, 12, 13}.   But can you classify all possible Pythagorean triples?

Answer: it is possible to prove that all Pythagorean triples are of the form   {M2 - N2, 2MN, M2 + N2}   for some integers M and N, or they are multiples of this form.
Thus setting M=2, N=1 gives {3,4,5} and M=3, N=2 gives {5,12,13}.

To generate one specific type of Pythagorean triples, you can follow the following algorithm.   It gives a triple where the hypotenuse and the longer leg differ by 1.

  1. Pick an odd integer greater than one.
  2. Square it.
  3. Determine consecutive integers that have that sum.
You have generated a Pythagorean triple!

Here are some examples:

  1. Pick 3.
  2. Square it: 32 = 9.
  3. Determine consecutive integers that add up to 9: 4 and 5.
  4. The Pythagorean triple is 3, 4, 5 since 32 + 42 = 52

  1. Pick 9.
  2. Square it: 92 = 81.
  3. Determine consecutive integers that add up to 81: 40 and 41.
  4. The Pythagorean triple is 9, 40, 41 since 92 + 402 = 412

  1. Pick 11.
  2. Square it: 112 = 121.
  3. Determine consecutive integers that add up to 121: 60 and 61.
  4. The Pythagorean triple is 9, 60, 61 since 112 + 602 = 612


Send any comments or questions to: David Pleacher