Fermat's Right Triangle Theorem

A version of Fermat's Right Triangle Theorem states:

Theorem  
Given positive integers $n < a$, such that $a - n, a, a+n$ are all square numbers, then $n$ is not a square number.

Our goal is to prove this statement.

Proof (part 1)

First that's suppose we can find square numbers $n < a$ with $a-n, a+n$ both squares, and see what consequence we can derive.

Note that since $n,a$ are both square numbers, so is $\mathrm{gcd}(n,a)$, and so if we replace \[ n' = \frac{n}{\mathrm{gcd}(n,a)}, \quad a' = \frac{a}{\mathrm{gcd}(n,a)} \] we find $n',a',a'-n',a'+n'$ all square numbers, and are coprime. Furthermore we have $a' \leq a$.

Now, we have $(\sqrt{a'-n'},\sqrt{n'};\sqrt{a'})$ and $(\sqrt{a'},\sqrt{n'};\sqrt{a'+n'})$ forming primitive Pythagorean triples. As is well-known, for primitive triples the hypotenuse must be odd. So we have that both $a'$ and $a'+n'$ are odd, and hence $n'$ is even, and $a'-n'$ is odd.

Thus the numbers $\sqrt{a'+n'} \pm \sqrt{a'-n'}$ are both even, so we can define \[ y_\pm = \frac12 \left( \sqrt{a'+n'} \pm \sqrt{a'-n'}\right). \] A direct computation shows that the integers $y_\pm$ satisfy \[ y_+^2 + y_-^2 = \frac12 \left( a' + n' + a' - n'\right) = a'.\] In other words, $(y_+,y_-;\sqrt{a'})$ forms another Pythagorean triple. As $\sqrt{a'}$ is odd, the standard representation formula for Pythagorean triples means we can find $p,q$ coprime and of different parity with $p > q> 0$, and $k$ odd, such that \[ \sqrt{a'} = k(p^2 + q^2), \quad \{y_\pm\} = \{k(p^2-q^2), 2kpq\}. \] Additionally, we can compute \[4k^2pq (p^2-q^2)= 2\cdot y_+ \cdot y_- = \frac12 \left( a' + n' - (a' - n')\right) = n' \] to show that it is an square number. We can divide by $4k^2$ (which is square) to obtain that $pq(p-q)(p+q)$ is a square number.

Since we know that $p$ and $q$ are coprime, the above implies that we have $p,q,p-q$ and $p+q$ each must be a square number.

Additionally, since $\sqrt{a'} = k(p^2 + q^2)$, we must have $p < a' \leq a$.

We can summarize what we've found thus:

If $0 < n < a$ are integers such that $a, n, a-n, a+n$ are all square numbers, then there exists $0 < q < p < a$ such that $p,q, p-q, p+q$ are all square numbers.

Proof (part 2)

Now take the set of all $(n,a)$ such that $0 < n < a$ and $a, n, a-n, a+n$ are all squares. If this set were not empty, there exists one entry $(n_0,a_0)$ for which $a_0$ is minimal. (The positive integers are well-ordered.) But the previous part of the proof generates another element $(q,p)$ of this set with $p < a_0$. This gives a contradiction. Hence the original set must be empty.

Avatar
Willie WY Wong
Associate Professor

My research interests include partial differential equations, geometric analysis, fluid dynamics, and general relativity.