Unique Factorization in the Polynomial Ring over a Field (Theorem # 3237)
Theorem
Let $k$ be a field. Then $k[x]$ is a unique factorization domain. Every nonzero polynomial $f \in k[x]$ can be written as $f = c \cdot p_1^{e_1} p_2^{e_2} \cdots p_m^{e_m}$, where $c \in k^\times$, each $p_i \in k[x]$ is a monic irreducible polynomial, the $p_i$ are pairwise distinct, and $e_i \ge 1$. This representation is unique up to reordering the factors.
Algebra
Ring Theory
Discussion
No discussion available for this theorem.
Proof
[proofplan]
We prove unique factorization in $k[x]$ by establishing it as a consequence of the Euclidean algorithm. First, we show that $k[x]$ is a Euclidean domain with respect to the degree function, which implies it is a principal ideal domain. In a PID, every nonzero non-unit element factors into irreducibles (existence) and any two such factorizations agree up to reordering and unit multiples (uniqueness). We then normalize by extracting the leading coefficient to obtain the stated decomposition into a unit and monic irreducibles.
[/proofplan]
[step:Establish that $k[x]$ is a Euclidean domain via polynomial division]
Since $k$ is a field, every nonzero element of $k$ is invertible, so polynomial long division is valid in $k[x]$. Define the norm function $N: k[x] \setminus \{0\} \to \mathbb{Z}_{\ge 0}$ by $N(f) = \deg(f)$. For any $f, g \in k[x]$ with $g \neq 0$, there exist $q, r \in k[x]$ such that $f = qg + r$ with either $r = 0$ or $\deg(r) < \deg(g)$. This is the [Division Algorithm for Polynomials](/theorems/???). The key point is that the leading coefficient of $g$ is a unit in $k$ (since $k$ is a field), so the division process terminates. Therefore $k[x]$ is a Euclidean domain with Euclidean function $N = \deg$.
[guided]
Why does polynomial long division work over a field but not over an arbitrary ring? The algorithm repeatedly subtracts multiples of $g$ from $f$ to reduce the degree. At each step, we must divide the leading coefficient of the current remainder by the leading coefficient of $g$. Over a field $k$, the leading coefficient of $g$ is a nonzero element of $k$ and hence invertible, so this division always succeeds. Over a general ring (say $\mathbb{Z}$), the leading coefficient might not be invertible, and the algorithm can fail — for example, $x^2 + 1$ cannot be divided by $2x + 1$ in $\mathbb{Z}[x]$ because $2$ is not a unit in $\mathbb{Z}$.
Formally, define the norm function $N: k[x] \setminus \{0\} \to \mathbb{Z}_{\ge 0}$ by $N(f) = \deg(f)$. A ring $R$ equipped with such a function is a Euclidean domain if the following property holds: for any $f, g \in R$ with $g \neq 0$, there exist $q, r \in R$ such that $f = qg + r$ with either $r = 0$ or $N(r) < N(g)$. We must verify this for $R = k[x]$ with $N = \deg$.
Let $f, g \in k[x]$ with $g \neq 0$. Write $\deg(f) = n$ and $\deg(g) = d$. If $n < d$, take $q = 0$ and $r = f$, so $\deg(r) = n < d = \deg(g)$. The Euclidean condition is satisfied in this case.
If $n \ge d$, let $a \in k^\times$ be the leading coefficient of $g$ and let $b \in k^\times$ be the leading coefficient of $f$. The first step of long division forms the monomial $ba^{-1} x^{n-d}$ and subtracts $ba^{-1} x^{n-d} \cdot g$ from $f$, producing a polynomial $f_1 = f - ba^{-1} x^{n-d} g$ of degree at most $n - 1$. This subtraction is valid precisely because $a^{-1}$ exists in $k$, so the leading terms cancel exactly.
Repeating this process, each step strictly reduces the degree of the remainder by at least one. After at most $n - d + 1$ iterations, we arrive at a remainder $r \in k[x]$ satisfying either $r = 0$ or $\deg(r) < d = \deg(g)$. Accumulating the monomial quotients gives $q = ba^{-1}x^{n-d} + \cdots \in k[x]$ with $f = qg + r$. This is the [Division Algorithm for Polynomials](/theorems/???).
Note that the Euclidean function $N = \deg$ satisfies an additional multiplicativity property: $N(fg) = N(f) + N(g)$ for nonzero $f, g$, since $k$ is an integral domain and leading coefficients multiply without cancellation. This ensures $N(f) \le N(fg)$ for nonzero $g$, which is the second axiom sometimes required of a Euclidean function.
Therefore $k[x]$ satisfies the Euclidean property with Euclidean function $N = \deg$, and so $k[x]$ is a Euclidean domain.
[/guided]
[/step]
[step:Deduce that $k[x]$ is a principal ideal domain]
Every Euclidean domain is a principal ideal domain. Since $k[x]$ is a Euclidean domain (established above), it follows that $k[x]$ is a PID: every ideal $I \trianglelefteq k[x]$ has the form $I = (g)$ for some $g \in k[x]$.
To verify the hypothesis: the proof that every Euclidean domain is a PID proceeds by taking a nonzero element of minimal norm in a given nonzero ideal and showing (via the division algorithm) that it generates the entire ideal. This applies to $k[x]$ with the degree function, since $\deg$ takes values in $\mathbb{Z}_{\ge 0}$ and therefore any nonempty subset of $\mathbb{Z}_{\ge 0}$ has a minimum.
[guided]
Why does the Euclidean property force every ideal to be principal? The idea is simple: pick the "smallest" nonzero element in the ideal (using the Euclidean function as a measure of size), then show it generates everything else via the division algorithm.
Let $I \trianglelefteq k[x]$ be a nonzero ideal. Consider the set of degrees $S = \{\deg(h) : h \in I, h \neq 0\} \subset \mathbb{Z}_{\ge 0}$. Since $I$ is nonzero, $S$ is nonempty. Since $\mathbb{Z}_{\ge 0}$ is well-ordered (every nonempty subset has a minimum), $S$ has a minimum element. Let $g \in I$ be a nonzero polynomial achieving this minimum degree.
We claim $I = (g)$. The inclusion $(g) \subset I$ is immediate: $g \in I$, and since $I$ is an ideal, every multiple $qg$ belongs to $I$, so $(g) = \{qg : q \in k[x]\} \subset I$.
For the reverse inclusion $I \subset (g)$, let $f \in I$ be arbitrary. Apply the division algorithm (established in the previous step): there exist $q, r \in k[x]$ with $f = qg + r$ and either $r = 0$ or $\deg(r) < \deg(g)$. Now $r = f - qg$. Since $f \in I$ and $qg \in I$ (because $g \in I$ and $I$ is an ideal), we have $r \in I$. If $r \neq 0$, then $r$ is a nonzero element of $I$ with $\deg(r) < \deg(g)$, contradicting the minimality of $\deg(g)$ in $S$. Therefore $r = 0$ and $f = qg \in (g)$.
This argument uses two ingredients: the Euclidean property (to perform the division) and the well-ordering of $\mathbb{Z}_{\ge 0}$ (to guarantee a minimum-degree element exists). Both hold in any Euclidean domain, so the implication "Euclidean domain $\implies$ PID" is completely general.
[/guided]
[/step]
[step:Prove existence of factorization into irreducibles by strong induction on degree]
We show that every nonzero $f \in k[x]$ that is not a unit (i.e., $\deg(f) \ge 1$) can be written as a product of irreducible polynomials in $k[x]$. The proof is by strong induction on $\deg(f)$.
**Base case.** If $\deg(f) = 1$, then $f$ is irreducible in $k[x]$ (a polynomial of degree $1$ over a field cannot factor as a product of two polynomials of positive degree), so $f$ is already a product of one irreducible.
**Inductive step.** Suppose the statement holds for all non-unit polynomials of degree less than $\deg(f)$, where $\deg(f) \ge 2$. If $f$ is irreducible, there is nothing to prove. If $f$ is reducible, then $f = gh$ for some $g, h \in k[x]$ with $1 \le \deg(g) < \deg(f)$ and $1 \le \deg(h) < \deg(f)$. By the inductive hypothesis, both $g$ and $h$ factor into irreducibles. Concatenating these factorizations gives a factorization of $f$ into irreducibles.
[guided]
The existence of a factorization into irreducibles does not require the PID property; it holds in any ring where a suitable notion of "size" decreases under proper factorization. In $k[x]$, the degree serves this role.
We proceed by strong induction on $n = \deg(f)$, for $f \in k[x]$ with $n \ge 1$ (the units $k^\times$ are the polynomials of degree $0$ and need no factorization).
**Base case ($n = 1$).** A polynomial $f$ of degree $1$ over a field is irreducible: if $f = gh$ with $g, h \in k[x]$, then $\deg(g) + \deg(h) = 1$. Since degrees are non-negative integers, one of $\deg(g), \deg(h)$ is $0$ and the other is $1$. A polynomial of degree $0$ is a unit in $k[x]$ (it is a nonzero element of $k$). So $f$ is irreducible, and we can write $f$ as a "product" of a single irreducible factor.
**Inductive step ($n \ge 2$).** Assume every polynomial of degree $d$ with $1 \le d < n$ factors into irreducibles. Let $\deg(f) = n$. If $f$ is irreducible, we are done. Otherwise, $f = gh$ where $g, h \in k[x]$ are not units. Since $k[x]$ is an integral domain (as $k$ is a field and hence an integral domain), $\deg(f) = \deg(g) + \deg(h)$. Neither $g$ nor $h$ is a unit, so $\deg(g) \ge 1$ and $\deg(h) \ge 1$, which forces $\deg(g) < n$ and $\deg(h) < n$. By the inductive hypothesis, $g = q_1 \cdots q_s$ and $h = q_{s+1} \cdots q_t$ for irreducible $q_i$. Then $f = q_1 \cdots q_t$ is a product of irreducibles.
Note that this argument terminates because the degree is a non-negative integer and strictly decreases at each factorization step.
[/guided]
[/step]
[step:Prove uniqueness of factorization using the prime property of irreducibles in a PID]
We show that if $f = q_1 q_2 \cdots q_s = r_1 r_2 \cdots r_t$ are two factorizations of $f$ into irreducible polynomials in $k[x]$, then $s = t$ and, after reordering, each $q_i$ is an associate of $r_i$ (i.e., $q_i = u_i r_i$ for some $u_i \in k^\times$).
The key fact is that in a PID, every irreducible element is prime. An element $p \in k[x]$ is prime if whenever $p \mid ab$, either $p \mid a$ or $p \mid b$. To verify this: if $p$ is irreducible in the PID $k[x]$, then $(p)$ is a maximal ideal (since in a PID, nonzero prime ideals are maximal and $(p)$ is nonzero and prime because $p$ is irreducible in a PID). In particular, $(p)$ is a prime ideal, so $p$ is a prime element.
Now proceed by induction on $s$. If $s = 1$, then $f = q_1$ is irreducible, so $t = 1$ and $r_1$ is an associate of $q_1$. For $s \ge 2$, since $q_1$ is irreducible and hence prime, and $q_1 \mid r_1 r_2 \cdots r_t$, there exists an index $j$ with $q_1 \mid r_j$. Since $r_j$ is irreducible and $q_1$ is not a unit, $r_j = u_1 q_1$ for some $u_1 \in k^\times$. Reindex so that $j = 1$. Cancel $q_1$ from both sides (valid since $k[x]$ is an integral domain): $q_2 \cdots q_s = u_1 r_2 \cdots r_t$. Absorbing $u_1$ into $r_2$ (replacing $r_2$ by $u_1 r_2$, which is still irreducible), the inductive hypothesis gives $s - 1 = t - 1$ and, after reordering, $q_i$ is an associate of $r_i$ for $i = 2, \dots, s$.
[guided]
Uniqueness of factorization is the deeper part of the argument, and it hinges on a property that does not hold in all integral domains: in a PID, every irreducible element is prime.
**Why is irreducible the same as prime in $k[x]$?** Let $p \in k[x]$ be irreducible. We want to show that $p$ is prime, i.e., the ideal $(p)$ is a prime ideal. In a PID, the ideal $(p)$ is nonzero (since $p$ is not zero) and proper (since $p$ is not a unit). We claim $(p)$ is maximal. Suppose $(p) \subset (d)$ for some $d \in k[x]$. Then $p = d \cdot q$ for some $q \in k[x]$. Since $p$ is irreducible, either $d \in k^\times$ (so $(d) = k[x]$) or $q \in k^\times$ (so $(d) = (p)$). Hence $(p)$ is maximal. In a commutative ring, every maximal ideal is prime, so $(p)$ is prime and $p$ is a prime element.
This is exactly where the PID hypothesis is consumed. In a ring like $\mathbb{Z}[\sqrt{-5}]$, which is not a PID, irreducible elements need not be prime, and unique factorization fails.
**Uniqueness by induction.** Suppose $q_1 q_2 \cdots q_s = r_1 r_2 \cdots r_t$ where all $q_i, r_j$ are irreducible in $k[x]$. We induct on $s$.
*Base case ($s = 1$):* Then $q_1 = r_1 \cdots r_t$. Since $q_1$ is irreducible and each $r_j$ is a non-unit, we must have $t = 1$ and $q_1 = r_1$ (up to a unit, but if both sides have the same product, the unit is forced).
*Inductive step ($s \ge 2$):* The irreducible $q_1$ divides the product $r_1 r_2 \cdots r_t$. Since $q_1$ is prime, $q_1 \mid r_j$ for some $j \in \{1, \dots, t\}$. Reindex so that $j = 1$. Since $r_1$ is irreducible and $q_1 \mid r_1$ with $q_1$ not a unit, we must have $r_1 = u_1 q_1$ for some $u_1 \in k^\times$ (the only divisors of an irreducible are units and associates). Now cancel $q_1$: since $k[x]$ is an integral domain, $q_1 q_2 \cdots q_s = u_1 q_1 r_2 \cdots r_t$ implies $q_2 \cdots q_s = u_1 r_2 \cdots r_t$. Absorbing the unit $u_1$ into $r_2$ (replacing $r_2$ by $u_1 r_2$, which remains irreducible since units do not affect irreducibility), we apply the inductive hypothesis to conclude $s - 1 = t - 1$ and, after reordering, $q_i$ is an associate of $r_i$ for each $i \ge 2$. Combined with $r_1 = u_1 q_1$, the two factorizations agree up to reordering and unit multiples.
[/guided]
[/step]
[step:Normalize the factorization to obtain the stated form with monic irreducibles]
Let $f \in k[x]$ be nonzero. By the existence result, if $\deg(f) \ge 1$, write $f = q_1^{e_1} \cdots q_m^{e_m}$ where $q_1, \dots, q_m$ are pairwise non-associate irreducibles and $e_i \ge 1$ (grouping together associate factors). For each $i$, let $a_i \in k^\times$ be the leading coefficient of $q_i$ and define the monic irreducible $p_i = a_i^{-1} q_i$. Then $q_i = a_i p_i$ and
\begin{align*}
f = \left(\prod_{i=1}^{m} a_i^{e_i}\right) p_1^{e_1} p_2^{e_2} \cdots p_m^{e_m}.
\end{align*}
Define $c = \prod_{i=1}^{m} a_i^{e_i} \in k^\times$. Then $f = c \cdot p_1^{e_1} p_2^{e_2} \cdots p_m^{e_m}$ where $c \in k^\times$, each $p_i$ is monic irreducible, the $p_i$ are pairwise distinct, and $e_i \ge 1$. If $\deg(f) = 0$, then $f \in k^\times$ and we take $m = 0$ with $c = f$ (an empty product).
Uniqueness of this normalized form follows from the uniqueness of the irreducible factorization up to associates: each monic irreducible in $k[x]$ represents a unique associate class of irreducibles (since the only monic associate of a monic irreducible $p$ is $p$ itself), so the $p_i$ and $e_i$ are uniquely determined, and $c$ is then forced to equal $f \cdot (p_1^{e_1} \cdots p_m^{e_m})^{-1}$. This completes the proof that $k[x]$ is a unique factorization domain with the stated normal form.
[guided]
The previous step established that every nonzero non-unit $f \in k[x]$ factors as $f = q_1^{e_1} \cdots q_m^{e_m}$ where the $q_i$ are irreducible and pairwise non-associate, and this factorization is unique up to reordering and multiplication by units. We now convert this into the cleaner normal form stated in the theorem by choosing a canonical representative from each associate class.
Every nonzero polynomial $q \in k[x]$ has a unique monic associate: if $q$ has leading coefficient $a \in k^\times$, then $a^{-1}q$ is monic and $a^{-1}q \sim q$ (they differ by the unit $a^{-1}$). Moreover, two monic polynomials are associates if and only if they are equal, since if $p_1 = u \cdot p_2$ with $u \in k^\times$ and both $p_1, p_2$ monic, then comparing leading coefficients gives $u = 1$. So "monic" selects exactly one representative per associate class.
For each $i$, let $a_i \in k^\times$ be the leading coefficient of $q_i$ and define $p_i = a_i^{-1} q_i$, which is monic and irreducible (since $a_i^{-1}$ is a unit, irreducibility is preserved). Substituting $q_i = a_i p_i$ gives
\begin{align*}
f = (a_1 p_1)^{e_1} \cdots (a_m p_m)^{e_m} = \left(\prod_{i=1}^{m} a_i^{e_i}\right) p_1^{e_1} \cdots p_m^{e_m}.
\end{align*}
Define $c = \prod_{i=1}^{m} a_i^{e_i} \in k^\times$. Then $f = c \cdot p_1^{e_1} \cdots p_m^{e_m}$ with $c \in k^\times$, each $p_i$ monic irreducible, the $p_i$ pairwise distinct, and $e_i \ge 1$. For the case $\deg(f) = 0$, we have $f \in k^\times$ and take $m = 0$ with $c = f$.
This normalized representation is unique: the monic irreducibles $p_i$ are uniquely determined (as canonical representatives of the associate classes from the uniqueness of irreducible factorization), the exponents $e_i$ are uniquely determined by uniqueness of factorization, and $c$ is then forced by $c = f \cdot (p_1^{e_1} \cdots p_m^{e_m})^{-1}$.
[/guided]
[/step]