Pythagorean Triples

A Pythagorean triple is a set of three non-zero integers $a,b,c$ satisfying Pythagoras' formula
$$
c^2 = a^2 + b^2
$$
Pythagoras certainly wasn't the first to know that this formula applied to the sides of right angled triangles, or to compile lists of Pythagorean triples, but he may have been the first to present a proof.  In this post I'm going to show a simple method of finding all Pythagorean triples, using complex numbers.

First we need to introduce Gaussian Integers.  These are complex numbers $z=a+ib$ where $a,b$ are integers.  If $z$ is any complex number then, since multiplication is commutative,
$$
(zz^*)^2 = z^2(z^2)^*
$$
However, in the case where $z$ is a Gaussian Integer the LHS is a square of an ordinary integer, and the RHS is the sum of two squares of integers.  For it to be a sum of two non-zero squares we need $z^2$ to be neither purely real or purely imaginary, or equivalently, that $z$ is neither purely real, purely imaginary, or on a diagonal $a = \pm b$.  So, to summarize, in order to find a Pythagorean triple all we need is to find a Gaussian Integer $z=a+ib$ where $a \ne 0$, $b \ne 0$, and $a \ne \pm b$.

It turns out that all Pythagorean triples are of this form, provided $a,b,c$ have no common factor.  To see this note that, just like with normal integers, Gaussian integers can be decomposed into a product of primes, and this is unique, up to a root of unity factor (i.e. $\pm 1, \pm i$).  These primes are not a simple extension of the integer primes.  For example, 5 is a prime in the integers, but it is not a prime in the Gaussian integers since it has the factorization $(1 + 2i)(1-2i)$.

Now, consider a Pythagorean triple with no common factors: $a,b,c$. We know that
$$
c^2 = (a+ib)(a-ib)
$$
Let $p_1...p_n$ be the prime decomposition of $a+ib$.  We know none of the $p_i$ are real as this would lead to common factors in the Pythagorean triple $a,b,c$.  We also know that no $p_i$ reappears in the decomposition in it's conjugate form, for the same reason.  However, the LHS is a square and so it follows that each $p_i$ must appear twice in the decomposition of $a+ib$.  This means we can write $a+ib$ as $z^2$ for some Gaussian integer $z$ and it follows this Pythagorean triple is also of the same form.

Comments

Popular posts from this blog

How To Make ASCII Diagrams Beautifuller

Why growth is falling in all developed countries (as a long term trend)

Three ways to look at the Bell/GHZ experiment