Pythagorean Triples

When math textbooks need an example of a right triangle, they frequently use a triangle with sides of length 3, 4, and 5, since the numbers work out so nicely: \(3^{2}+4^{2}=5^{2}\) by the Pythagorean theorem. If that gets tiresome, 12, 5, 13 might be used: \(5^{2}+12^{2}=13^{2}\). Clearly, multiplies of these numbers work also, e.g. \(6^{2}+8^{2}=10^{2}\).

Such groups of integers are called pythagorean triples. Recently, I remembered that my high school algebra teacher once challenged the class to find another triple besides the two basic ones above. This was in the days before everyone had a calculator, so just trying out numbers would have been very tedious.

However, I found a way to create triples without trial and error, which I will describe below. It’s nothing profound, and is certainly not original to me, but the reader may find it interesting.

We want:

\[x^{2}+y^{2}=z^{2}\],

where x, y, and z are integers. Rewriting:

\[x^{2}=z^{2}-y^{2}=\left(z+y\right)\left(z-y\right)\]

or

\[x=\sqrt{\left(z+y\right)\left(z-y\right)}=\sqrt{z+y}\bullet\sqrt{z-y}\]

Now, if x is to be an integer, \(\sqrt{z+y}\) and \(\sqrt{z-y}\) must be integers also, so that \(z+y\) and \(z-y\) must be perfect squares:

\[\begin{array}{l} z+y=a^{2}\\ z-y=b^{2}\end{array}\]

Where a and b are integers, and x will be \(ab\). Solving these equations for z and y:

\[\begin{array}{l} z=\frac{1}{2}\left(a^{2}+b^{2}\right)\\ y=\frac{1}{2}\left(a^{2}-b^{2}\right)\\ x=ab\end{array}\]

So now we can just pick integer values for a and b and generate all the x, y, z triples we want. There are two simple constraints on the values for a and b:

  1. the second equation requires that \(a>b\)
  2. the first equation requires that a and b be either both even numbers, or both odd numbers. Otherwise the quantity in the parenthesis won’t be even.
The choice a = 3, b = 1 produces the 3, 4, 5 triple. If a = 5 and b = 1, then the triple is 5, 12, 13. The choice a = 5, b = 3 produces a “new” triple: 8, 15, 17.
Like I said, nothing very deep here. Still, it was nice to surprise the teacher by presenting him with five or so triples instead of just one.



Subscribe

Tags:

Leave a Reply