Pythagoras' theorem. Image: Wapkaplet.

### Pythagorean triples

First of all, here are some examples of Pythagorean triples:

Some Pythagorean triples.

Pythagoras as depicted by Raffaello Sanzio in his painting *The school of Athens*.

Plato (left) with Aristotle (right) as depicted by Raffaello Sanzio in his painting *The school of Athens*.

### Pythagorean quadruples

Now let's look at \emph{Pythagorean quadruples} which consist of four positive whole numbers instead of three. In a Pythagorean quadruple the sum of squares of first three numbers gives us the square of the fourth: $$a^2+b^2+c^2=d^2.$$Some Pythagorean quadruples.

### Can we generate all Pythagorean quadruples?

Not all Pythagorean quadruples are of the form $$(m+n)^2=m^2+2mn+n^2,$$ so not all of them can be generated using the method we just described — we need to be a little cleverer. Suppose that you're given two numbers $a$ and $b.$ Now find a number $p$ which divides $a^2+b^2$ but so that $p^2Euclid (the man with the compass) as depicted by Raffaello Sanzio in his painting *The school of Athens*.

So letting $$d = \frac{(a^2+b^2+p^2)}{2p}$$ we have $$a^2+b^2+c^2=d^2.$$ But are $a$, $b$, $c$ and $c$ positive whole numbers? This is why we've imposed conditions on $p.$ You can show that as long as $a$ and $b$ are either both even, or if one is even and one is odd, then the conditions ensure that $a$, $b$, $c$ and $d$ are positive whole numbers.

(Click here to see why.)

If $a$ and $b$ are both odd it is impossible to generate a Pythagorean quadruple from them by this method. But the important point is that you can construct every primitive Pythagorean quadruple from two numbers $a$ and $b$ in the way we've just shown. And again, once you have the primitive ones, you can get all the others just by multiplying.### Generating a series of squares

Another nice thing to notice is that using our mechanism for generating triples, we can make sums of squares of any length. Let's start with the triple $(3,4,5).$ We can generate another triple starting with the number 5: it's $(5,12, 13).$ Thus we have $$3^2 + 4^2 = 5^2$$ and $$5^2 + 12^2 = 13^2.$$ Rearranging the second equation gives $$5^2 = 13^2-12^2.$$ Substituting this into the first equation and rearranging gives $$3^2+4^2+12^2=13^2,$$ so we have the quadruple $(3,4,12,13).$ Proceeding in a similar way, always using the biggest of the current set of numbers to generate a new triple, we can construct the \emph{quintuple} $(3, 4, 12, 84, 85)$ and the \emph{sextuple} $(3, 4, 12, 84, 3612, 3613)$ and so on, ad infinitum.### Cubes and beyond

Pythagorean quadruples consist of a sum of squares, but what if we look at sums of cubes of the form $$a^3+b^3+c^3=d^3.$$ These are called \emph{cubic quadruples}. Here are a few examples (again, quadruples written in red, blue or green are multiples of each other).Some cubic quadruples.

The result was made famous by the French mathematician Pierre de Fermat in 1637. Fermat wrote in the margin of his book that he had "discovered a truly marvelous proof of this, which this margin is too narrow to contain". For over 300 years mathematicians desperately tried to reconstruct this marvellous proof, but they didn't succeed. It was not until 1995 that the mathematician Andrew Wiles proved the result, using sophisticated mathematics Fermat could not possibly have known about.

### Further reading

You can read more about Fermat's last theorem on *Plus*.

### About the author

Chandrahas Halai is a mathematics enthusiast from the land of the Shulba sutras, the Bakhshali manuscript, and mathematicians like Aryabhatt, Brahmagupta, Bhaskaracharya, Ramanujan and many more. He is a consultant in the field of computer aided engineering, engineering optimisation, computer science and operations research. He writes research papers, articles and books on mathematics, physics, engineering, computer science and operations research. In his spare time he likes doing nature photography and painting.