# Gaussian integer

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 **Z**[*i*].^{[1]} This integral domain is a particular case of a commutative ring of quadratic integers. It does not have a total ordering that respects arithmetic.

## Contents

## Formal definition

Formally, Gaussian integers are the set

Note that when they are considered within the complex plane the Gaussian integers may be seen to constitute the 2-dimensional integer lattice.

## Norm of a Gaussian integer

The *(arithmetic or field) norm* of a Gaussian integer is the square of its absolute value (Euclidean norm) as a complex number and a natural number defined as

where Template:Overline is complex conjugation.

The norm is multiplicative, since the absolute value of complex numbers is multiplicative, i.e., one has

The latter can also be verified by a straightforward check. The units of **Z**[*i*] are precisely those elements with norm 1, i.e. the set {±1, ±*i*}.^{[4]}

## {{safesubst:#invoke:anchor|main}}As a principal ideal domain

The Gaussian integers form a principal ideal domain with units {±1, ±*i*}. For *x* ∈ **Z**[*i*], the four numbers ±*x*, ±*ix* are called the associates of Template:Mvar. As for every principal ideal domain, **Z**[*i*] is also a unique factorization domain.

The prime elements of **Z**[*i*] are also known as **Gaussian primes**. An associate of a Gaussian prime is also a Gaussian prime. The Gaussian primes are symmetric about the real and imaginary axes. The *positive integer* Gaussian primes are the prime numbers congruent to 3 modulo 4, (sequence A002145 in OEIS). One should not refer to only these numbers as "the Gaussian primes", which refers to *all* the Gaussian primes, many of which do not lie in **Z**.^{[5]}

A Gaussian integer *a* + *bi* is a Gaussian prime if and only if either:

- one of
*a*,*b*is zero and the other is a prime number of the form 4*n*+ 3 (with Template:Mvar a nonnegative integer) or its negative −(4*n*+ 3), or - both are nonzero and
*a*^{2}+*b*^{2}is a prime number (which will*not*be of the form 4*n*+ 3).

The following elaborates on these conditions.

2 is a special case (in the language of algebraic number theory, 2 is the only ramified prime in **Z**[*i*]), since it factors as 2 = (1 + *i*)(1 − *i*) = *i*(1 − *i*)^{2} in **Z**[*i*]. The second factorisation shows that 2 is divisible by the square of a Gaussian prime (recall that Template:Mvar is a unit in **Z**[*i*]). It is the unique prime number with this property.

The necessary conditions can be stated as follows: if a Gaussian integer is a Gaussian prime, then either its norm is a prime number, or its norm is a square of a prime number. This is because for any Gaussian integer Template:Mvar, notice

Here | means “divides”; that is, *x* | *y* if Template:Mvar is a divisor of Template:Mvar.

Now *N*(*g*) ∈ **Z**, and so can be factored as a product *p*_{1}...*p _{n}* of prime numbers, by the fundamental theorem of arithmetic. By definition of prime element, if Template:Mvar is a Gaussian prime, then for some index Template:Mvar,

*g*|

*p*in

_{k}**Z**[

*i*]. Also, Template:Overline | Template:Overline =

*p*. Therefore in

_{k}**Z**we have:

This gives only two options: either the norm of Template:Mvar is a prime number, or the square of a prime number.

If in fact *N*(*g*) = *p*^{2} for some prime number Template:Mvar, then both Template:Mvar and Template:Overline divide *p*^{2}. Neither can be a unit, and so

where Template:Mvar is a unit. This is to say that either *a* = 0 or *b* = 0, where *g* = *a* + *bi*.

However, not every prime number Template:Mvar is a Gaussian prime. 2 is not because 2 = (1 + *i*)(1 − *i*). Neither are prime numbers of the form 4*n* + 1 because Fermat's theorem on sums of two squares assures us they can be written *a*^{2} + *b*^{2}, *a*, *b* ∈ **Z**, and *a*^{2} + *b*^{2} = (*a* + *bi*)(*a* − *bi*). The only type of prime numbers remaining are of the form 4*n* + 3.

Prime numbers of the form 4*n* + 3 are also Gaussian primes. For suppose *g* = *p* + 0*i* for *p* = 4*n* + 3, and it can be factored *g* = *hk*. Then *p*^{2} = *N*(*g*) = *N*(*h*)*N*(*k*). If the factorization is non-trivial, then *N*(*h*) = *N*(*k*) = *p*. But no sum of squares of integers can be written 4*n* + 3. So the factorization must have been trivial and Template:Mvar is a Gaussian prime.

If Template:Mvar is a Gaussian integer whose norm is a prime number, then Template:Mvar is a Gaussian prime, because the norm is multiplicative.

### As an integral closure

The ring of Gaussian integers is the integral closure of **Z** in the field of Gaussian rationals **Q**(*i*) consisting of the complex numbers whose real and imaginary part are both rational.

### As a Euclidean domain

It is easy to see graphically that every complex number is within units of a Gaussian integer.

Put another way, every complex number (and hence every Gaussian integer) has a maximal distance of

units to some multiple of Template:Mvar, where Template:Mvar is any Gaussian integer; this turns **Z**[*i*] into a Euclidean domain, where

## Historical background

The ring of Gaussian integers was introduced by Carl Friedrich Gauss in his second monograph on quartic reciprocity (1832) (see [2]). The theorem of quadratic reciprocity (which he had first succeeded in proving in 1796) relates the solvability of the congruence *x*^{2} ≡ *q* (mod *p*) to that of *x*^{2} ≡ *p* (mod *q*). Similarly, cubic reciprocity relates the solvability of *x*^{3} ≡ *q* (mod *p*) to that of *x*^{3} ≡ *p* (mod *q*), and biquadratic (or quartic) reciprocity is a relation between *x*^{4} ≡ *q* (mod *p*) and *x*^{4} ≡ *p* (mod *q*). Gauss discovered that the law of biquadratic reciprocity and its supplements were more easily stated and proved as statements about "whole complex numbers" (i.e. the Gaussian integers) than they are as statements about ordinary whole numbers (i.e. the integers).

In a footnote he notes that the Eisenstein integers are the natural domain for stating and proving results on cubic reciprocity and indicates that similar extensions of the integers are the appropriate domains for studying higher reciprocity laws.

This paper not only introduced the Gaussian integers and proved they are a unique factorization domain, it also introduced the terms norm, unit, primary, and associate, which are now standard in algebraic number theory.

## Unsolved problems

Most of the unsolved problems are related to the repartition in the plane of the Gaussian primes.

- Gauss's circle problem does not deal with the Gaussian integers
*per se*, but instead asks for the number of lattice points inside a circle of a given radius centered at the origin. This is equivalent to determining the number of Gaussian integers with norm less than a given value.

There are also conjectures and unsolved problems about the Gaussian primes. Two of them are:

- The real and imaginary axes have the infinite set of Gaussian primes 3, 7, 11, 19, ... and their associates. Are there any other lines that have infinitely many Gaussian primes on them? In particular, are there infinitely many Gaussian primes of the form 1+
*ki*?^{[7]}

- Is it possible to walk to infinity using the Gaussian primes as stepping stones and taking steps of bounded length? This is known as the Gaussian moat problem; it was posed in 1962 by Basil Gordon and remains unsolved.
^{[8]}^{[9]}

## See also

- Quadratic integer
- Hurwitz quaternion
- Eisenstein integer
- Algebraic integer
- Kummer ring
- Proofs of Fermat's theorem on sums of two squares
- Proofs of quadratic reciprocity
- Splitting of prime ideals in Galois extensions describes the structure of prime ideals in the Gaussian integers
- Table of Gaussian integer factorizations

## Notes

- ↑ Template:Harvtxt
- ↑ Template:Harvtxt
- ↑ Template:Harvtxt
- ↑ Template:Harvtxt
- ↑ [1], OEIS sequence A002145 "COMMENT" section
- ↑ Template:Harvtxt
- ↑ Ribenboim, Ch.III.4.D Ch. 6.II, Ch. 6.IV (Hardy & Littlewood's conjecture E and F)
- ↑ {{#invoke:Citation/CS1|citation |CitationClass=journal }}
- ↑ {{#invoke:citation/CS1|citation |CitationClass=book }}

## References

- C. F. Gauss, Theoria residuorum biquadraticorum. Commentatio secunda., Comm. Soc. Reg. Sci. Göttingen 7 (1832) 1-34; reprinted in Werke, Georg Olms Verlag, Hildesheim, 1973, pp. 93–148.
- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:Citation/CS1|citation

|CitationClass=journal }}

- {{#invoke:citation/CS1|citation

|CitationClass=book }}

## External links

- www.alpertron.com.ar/GAUSSIAN.HTM is a Java applet that evaluates expressions containing Gaussian integers and factors them into Gaussian primes.
- www.alpertron.com.ar/GAUSSPR.HTM is a Java applet that features a graphical view of Gaussian primes.
- Henry G. Baker (1993) Complex Gaussian Integers for 'Gaussian Graphics', ACM SIGPLAN Notices, Vol. 28, Issue 11. DOI 10.1145/165564.165571 (html)
- IMO Compendium text on quadratic extensions and Gaussian Integers in problem solving
- Weisstein, Eric W., "Landau's Problems",
*MathWorld*.