In mathematics, a unique factorization domain (UFD) is, roughly speaking, a ring in which every element can be uniquely written as a product of prime elements, analogous to the fundamental theorem of arithmetic for the integers.

Formally, a unique factorization domain is defined to be an integral domain R in which every non-zero non-unit x of R can be written as a product of irreducible elements of R:

x = p1 p2 ... pn
and this representation is unique in the following sense: if q1,...,qm are irreducible elements of R such that
x = q1 q2 ... qm,
then m = n and there exists a bijective map φ : {1,...,n} -> {1,...,n} such that pi is associated to qφ(i) for i=1,...,n.

The uniqueness part is sometimes hard to verify, which is why the following equivalent definition is useful: a unique factorization domain is an integral domain R in which every non-zero non-unit can be written as a product of prime elements of R.

Examples

All principal ideal domains are UFD's; this includes the integers, all fields, all polynomial rings K[X] where K is a field, and the Gaussian integers Z[i].

In general, if R is a UFD, then so is the polynomial ring R[X]. By induction, we therefore see that the polynomial rings Z[X1,...,Xn] as well as K[X1,...,Xn] (K a field) are UFD's.

The formal power series ring K[[X1,...,Xn]] over a field K is also a unique factorization domain.

The ring of functions in n complex variables holomorphic at the origin is a UFD.

Here is an example of an integral domain which is not a UFD: the ring of all complex numbers of the form a + b √ -5, where a and b are integers.

Properties

In UFD's, every irreducible element is prime. (Generally, in any integral domain, every prime element is irreducible.)

Any two (or finitely many) elements of a UFD have a greatest common divisor and a least common multiple. Here, a greatest common divisor of a and b is an element d which divides both a and b, and such that every other common divisor of a and b divides d. All greatest common divisors of a and b are associated.