# Gaussian integer

 related topics {math, number, function}

In number theory, a Gaussian integer is a complex number whose real and imaginary part are both integers. The Gaussian integers, with ordinary addition and multiplication of complex numbers, form an integral domain, usually written as Z[i]. The Gaussian integers are a special case of the quadratic integers. This domain does not have a total ordering that respects arithmetic.

Formally, Gaussian integers are the set

The norm of a Gaussian integer is the natural number defined as

(Where the overline over "a+bi" refers to the complex conjugate.)

The norm is multiplicative, i.e.

The units of Z[i] are therefore precisely those elements with norm 1, i.e. the elements

## Contents

### As a unique factorization domain

The Gaussian integers form a unique factorization domain with units 1, −1, i, and −i. If x is a Gaussian integer, the four numbers x, ix, −x, and −ix are called the associates of x.

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 OEIS A002145. It is a common error to refer to only these positive integers as "the Gaussian primes" when in fact this term refers to all the Gaussian primes. [1]

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

• one of a, b is zero and the other is a prime of the form 4n + 3 or its negative − (4n + 3) (where $n \geq 0$)
• or both are nonzero and a2 + b2 is prime.

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]).