As the Gaussian integers form a principal ideal domain they form also a unique factorization domain. This implies that a Gaussian integer is irreducible (that is, it is not the product of two non-units) if and only if it is prime (that is, it generates a prime ideal).

The prime elements of Z[i] are also known as Gaussian primes. An associate of a Gaussian prime is also a Gaussian prime. The conjugate of a Gaussian prime is also a Gaussian prime (this implies that Gaussian primes are symmetric about the real and imaginary axes).

A positive integer is a Gaussian prime if and only if it is a prime number that is congruent to 3 modulo 4 (that is, it may be written 4n + 3, with n a nonnegative integer), thus a prime is a Gaussian prime if and only if it ends with 3, 7 or E.

## Factorization of numbers in Z[i]

The primes in Z[i] with no imaginary part are exactly the primes in Z end with 3, 7 or E.

Since Z[i] is a UFD (Unique Factorization Domain), thus all numbers in Z[i] only have one factorization.

 number factorization number factorization 1 unit 11 (3−2i) × (3+2i) 2 (1−i) × (1+i) 12 (1−i) × (1+i) × 7 3 prime 13 (2−i) × (2+i) × 3 4 (1−i)2 × (1+i)2 14 (1−i)4 × (1+i)4 5 (2−i) × (2+i) 15 (4−i) × (4+i) 6 (1−i) × (1+i) × 3 16 (1−i) × (1+i) × 32 7 prime 17 prime 8 (1−i)3 × (1+i)3 18 (1−i)2 × (1+i)2 × (2−i) × (2+i) 9 32 19 3 × 7 X (1−i) × (1+i) × (2−i) × (2+i) 1X (1−i) × (1+i) × E E prime 1E prime 10 (1−i)2 × (1+i)2 × 3 20 (1−i)3 × (1+i)3 × 3