This site is supported by donations to The OEIS Foundation.

# Unique factorization domain

A unique factorization domain (UFD) is a commutative ring with unity in which all nonzero elements have a unique factorization in the irreducible elements of that ring, without regard for the order in which the prime factors are given (since multiplication is commutative in a commutative ring) and notwithstanding multiplication by units (invertible elements, e.g. {–1, 1} for ${\displaystyle \scriptstyle \mathbb {Z} }$) of its associates from the ring with unity.

Taken all together, the rational integers ${\displaystyle \scriptstyle \mathbb {Z} \,}$ form a unique factorization domain (see A000040 for positive prime numbers). This principle is commonly known as “the fundamental theorem of arithmetic” and is then understood to be in regards to the rational integers.[1]

The vast majority of sequences in the OEIS concern rational integers, though there is a significant amount of sequences concerning integers that are not in a unique factorization domain (see for example the Hilbert numbers). Some quadratic number fields are UFDs, some are not (see below).

The Gaussian integers ${\displaystyle \scriptstyle \mathbb {Z} [i],\ i\,=\,{\sqrt {-1}}\,}$ are another example of a unique factorization domain. For example, 13, which is not a Gaussian prime (since it is the sum of two squares ${\displaystyle \scriptstyle a^{2}+b^{2}\,=\,(a+bi)(a-bi)\,}$), has this unique factorization (up to units ${\displaystyle \scriptstyle \{i^{0},\,i^{1},\,i^{2},\,i^{3}\}\,=\,\{1,\,i,\,-1,\,-i\}\,}$ of ${\displaystyle \scriptstyle \mathbb {Z} [i]\,}$): ${\displaystyle \scriptstyle 13\,=\,(3+2i)(3-2i)\,=\,[-i(3+2i)][i(3-2i)]\,=\,(2-3i)(2+3i)\,}$, where the prime factorization is considered unique since the apparently different prime factors are associates (related to each other by product with units). No other Gaussian primes multiply to 13.

The Eisenstein integers ${\displaystyle \scriptstyle \mathbb {Z} [\omega ],\ \omega \,=\,{\frac {1}{2}}(-1+i{\sqrt {3}})\,=\,e^{i2\pi /3}\,}$, with units ${\displaystyle \scriptstyle \{\omega ^{0},\,\omega ^{1},\,\omega ^{2}\}\,=\,\{1,\,e^{i2\pi /3},\,e^{i4\pi /3}\}\,}$, form another example of a unique factorization domain.

One consequence of a domain having unique factorization is that the distinction between irreducible elements and prime elements is irrelevant because they are the same set.

## Examples of non UFDs

The elements of the quadratic integer ring ${\displaystyle \scriptstyle \mathbb {Z} [{\sqrt {-5}}]\,}$, while a commutative ring with unity, do not form a UFD, since some elements have more than one factorization. For example, ${\displaystyle \scriptstyle 6\,=\,2\,\cdot \,3\,=\,(1+{\sqrt {-5}})\,(1-{\sqrt {-5}})\,}$ has two distinct factorizations in irreducible elements (which are thus not prime elements).

## Notes

1. Peter Giblin, Primes and Programming: An Introduction to Number Theory with Computing, Cambridge University Press (1993) p. 1.