Canonical: https://knowlpedia.com/algebra-rings/unique-factorization-theorem/

# Unique factorization theorem

In a UFD, every nonzero nonunit factors uniquely into irreducibles up to associates and order.

**Unique factorization theorem**: Let \(R\) be a [unique factorization domain](https://knowlpedia.com/algebra-rings/ufd/). Every nonzero element of \(R\) that is not a [unit](https://knowlpedia.com/algebra-rings/unit/) can be written as a finite product of [irreducible elements](https://knowlpedia.com/algebra-rings/irreducible-element/). Moreover, if
\[
r = u\,p_1\cdots p_m = v\,q_1\cdots q_n
\]
with \(u,v\) units and \(p_i,q_j\) irreducible, then \(m=n\) and after reordering, each \(p_i\) is [associated](https://knowlpedia.com/algebra-rings/associated-elements/) to \(q_i\). In particular, irreducibles are [prime](https://knowlpedia.com/algebra-rings/prime-element/) in a UFD.

## Remarks

This theorem is the foundational reason gcd/lcm notions behave well in UFDs and underlies factorization results in [polynomial rings](https://knowlpedia.com/algebra-rings/polynomial-ring/) via Gauss-type arguments.
