The user-friendly version of this content is available here.

The following content is copyright (c) 2009-2013 by Goods of the Mind, LLC.

This essential trains for: AMC-8, AMC-10, AMC-12, AIME, Math Kangaroo 7-8, Math Kangaroo 9-10.

A Pythagorean triple is a set of three positive integers a, b, c that satisfy the Pythagorean relation: The question is 'how do we find such numbers'? We know they exist since we know that, for instance, 3, 4, 5 is such a triple. But is there a recipe for obtaining such numbers, possibly all of them?

Of course, this problem is a Diophantine equation. We know that it is generally difficult to solve these.

We have to think about how to add two perfect squares to get a perfect square.

We know that all perfect squares can be written as sums of two squares, plus or minus a 'cross-term':  It's cool to see that, if we add these two identities, the 'cross-terms' go away: but this is not very helpful since we have sums of squares on both sides and some annoying coefficients.

But we also notice that, if we subtracted the identities instead of adding them, we would get only the 'cross-term' with a coefficient of 4 and 4 is a perfect square.

Let's see what happens if we do that: Unfortunately, the right hand side is not a perfect square, even though the 4 is an encouraging number. The left hand side is a difference of squares, but that does not worry us, since we can easily move one of them to the left side: The only difficulty left now is the 'cross-term' which is definitely not a perfect square for any x, y.

In order to make it a perfect square we can force x and y to be perfect squares by squaring them. Let us thus first square x and y, then subtract the two identities:   and now move the negative term: and tidy up to see that we got the Pythagorean relation: Therefore, we now have a recipe for finding Pythagorean triples (a, b, c) by using two positive integers x≥ y chosen at random:   Numeric example:  with the obvious property: Thus, a right triangle could have sides of lengths: (7,24,25).