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 diagon...