The Gaussian integers

The Gaussian integers ℤ[i] are the simplest generalization of the ordinary integers ℤ and they behave in much the same way. In particular, ℤ[i] enjoys unique prime factorization, and this allows us to reason about ℤ[i] the same way we do about Z. We do this because ℤ[i] is the natural place to study certain properties of ℤ. In particular, it is the best place to examine sums of two squares, because in ℤ[i] we can factorize a sum of two integer squares into linear factors: x2+y2 (x−yi)(x+yi).