In number theory, a Gaussian integer is a complex number whose real and imaginary parts are both integers. The Gaussian integers, with ordinary addition and multiplication of complex numbers, form an integral domain, usually written as or

Gaussian integers share many properties with integers: they form a Euclidean domain, and have thus a Euclidean division and a Euclidean algorithm; this implies unique factorization and many related properties. However, Gaussian integers do not have a total ordering that respects arithmetic.

Gaussian integer

Gaussian integers are algebraic integers and form the simplest ring of quadratic integers.

Gaussian integer

Gaussian integers are named after the German mathematician Carl Friedrich Gauss.

Gaussian integer

Basic definitions

The Gaussian integers are the set

In other words, a Gaussian integer is a complex number such that its real and imaginary parts are both integers. Since the Gaussian integers are closed under addition and multiplication, they form a commutative ring, which is a subring of the field of complex numbers. It is thus an integral domain.

When considered within the complex plane, the Gaussian integers constitute the -dimensional integer lattice.

The conjugate of a Gaussian integer is the Gaussian integer .

The norm of a Gaussian integer is its product with its conjugate.

The norm of a Gaussian integer is thus the square of its absolute value as a complex number. The norm of a Gaussian integer is a nonnegative integer, which is a sum of two squares. Thus a norm cannot be of the form , with integer.

The norm is multiplicative, that is, one has

for every pair of Gaussian integers . This can be shown directly, or by using the multiplicative property of the modulus of complex numbers.

The units of the ring of Gaussian integers (that is the Gaussian integers whose multiplicative inverse is also a Gaussian integer) are precisely the Gaussian integers with norm 1, that is, 1, –1, and .

Euclidean division

Gaussian integers have a Euclidean division (division with remainder) similar to that of integers and polynomials. This makes the Gaussian integers a Euclidean domain, and implies that Gaussian integers share with integers and polynomials many important properties such as the existence of a Euclidean algorithm for computing greatest common divisors, Bézout's identity, the principal ideal property, Euclid's lemma, the unique factorization theorem, and the Chinese remainder theorem, all of which can be proved using only Euclidean division.

A Euclidean division algorithm takes, in the ring of Gaussian integers, a dividend and divisor , and produces a quotient and remainder such that

In fact, one may make the remainder smaller:

Even with this better inequality, the quotient and the remainder are not necessarily unique, but one may refine the choice to ensure uniqueness.

To prove this, one may consider the complex number quotient . There are unique integers and such that and , and thus . Taking , one has

with

and

The choice of and in a semi-open interval is required for uniqueness. This definition of Euclidean division may be interpreted geometrically in the complex plane (see the figure), by remarking that the distance from a complex number to the closest Gaussian integer is at most .

Principal ideals

Since the ring of Gaussian integers is a Euclidean domain, is a principal ideal domain, which means that every ideal of is principal. Explicitly, an ideal is a subset of a ring such that every sum of elements of and every product of an element of by an element of belong to . An ideal is principal if it consists of all multiples of a single element , that is, it has the form

In this case, one says that the ideal is generated by or that is a generator of the ideal.

Every ideal in the ring of the Gaussian integers is principal, because, if one chooses in a nonzero element of minimal norm, for every element of , the remainder of Euclidean division of by belongs also to and has a norm that is smaller than that of ; because of the choice of , this norm is zero, and thus the remainder is also zero. That is, one has , where is the quotient.

For any , the ideal generated by is also generated by any associate of , that is, ; no other element generates the same ideal. As all the generators of an ideal have the same norm, the norm of an ideal is the norm of any of its generators.