[proofplan]
The proof proceeds by the division algorithm in $k[x]$. Given a nonzero ideal $I$, we select the monic polynomial $f$ of minimal degree in $I$ and show $(f) \subset I$. For the reverse inclusion, we divide an arbitrary element $g \in I$ by $f$ and use minimality of $\deg f$ to conclude the remainder is zero, giving $g \in (f)$. Uniqueness of the monic generator follows from the fact that two monic generators of the same ideal must divide each other, forcing them to be equal.
[/proofplan]
[step:Handle the trivial case $I = \{0\}$]
If $I = \{0\}$, then $I = (0)$, which is a principal ideal generated by the zero polynomial. The remaining claims are vacuous in this case.
[/step]
[step:Select the monic polynomial of minimal degree in a nonzero ideal $I$]
Suppose $I \neq \{0\}$. Since $I$ contains a nonzero polynomial, the set
\begin{align*}
S := \{\deg h : h \in I,\, h \neq 0\} \subset \mathbb{N} \cup \{0\}
\end{align*}
is a nonempty subset of the non-negative integers. By the well-ordering of $\mathbb{N} \cup \{0\}$, the set $S$ has a minimum element $d$. Let $g \in I$ be a nonzero polynomial with $\deg g = d$. Since $k$ is a field, the leading coefficient $a := \operatorname{lc}(g) \in k$ is a unit in $k$. Define $f := a^{-1} g$. Then $f$ is monic, $\deg f = d$, and $f \in I$ because $I$ is an ideal and $a^{-1} \in k \subset k[x]$.
[guided]
Our goal is to find a single polynomial that generates all of $I$. The strategy is to select a nonzero element of smallest possible degree and normalise it to be monic. Why minimal degree? Because the division algorithm will later force every element of $I$ to be a multiple of this polynomial — and that argument only works if no nonzero element of $I$ has strictly smaller degree.
Consider the set of degrees of nonzero elements of $I$:
\begin{align*}
S := \{\deg h : h \in I,\, h \neq 0\} \subset \mathbb{N} \cup \{0\}.
\end{align*}
Since $I \neq \{0\}$, the set $S$ is nonempty. By the well-ordering of $\mathbb{N} \cup \{0\}$, the set $S$ has a minimum element $d$. Let $g \in I$ be a nonzero polynomial with $\deg g = d$.
The polynomial $g$ need not be monic — its leading coefficient $a := \operatorname{lc}(g)$ is some nonzero element of $k$. Since $k$ is a field, $a$ is a unit, so $a^{-1} \in k$ exists. Define $f := a^{-1} g$. We verify that $f$ has the required properties: $f$ is monic because $\operatorname{lc}(f) = a^{-1} \operatorname{lc}(g) = a^{-1} a = 1$; $\deg f = \deg g = d$ because scalar multiplication does not change the degree; and $f \in I$ because $g \in I$, $a^{-1} \in k \subset k[x]$, and $I$ is an ideal of $k[x]$ (so it is closed under multiplication by elements of $k[x]$).
Note that the use of $k$ being a field is essential here: we needed to invert the leading coefficient to produce a monic polynomial. Over a ring that is not a field, such as $\mathbb{Z}$, we cannot normalise to a monic generator, and the theory diverges.
[/guided]
[/step]
[step:Show $(f) \subset I$ using the ideal property]
Since $f \in I$ and $I$ is an ideal of $k[x]$, for every $q \in k[x]$ the product $qf$ belongs to $I$. Therefore $(f) = \{qf : q \in k[x]\} \subset I$.
[/step]
[step:Show $I \subset (f)$ by applying the division algorithm and minimality of $\deg f$]
Let $g \in I$ be arbitrary. By the [Division Algorithm for Polynomials](/theorems/???), since $f$ is nonzero, there exist unique polynomials $q, r \in k[x]$ with
\begin{align*}
g = qf + r, \qquad \deg r < \deg f \text{ or } r = 0.
\end{align*}
We verify the hypothesis of the division algorithm: $f \neq 0$, which holds since $f$ is monic of degree $d \geq 0$. Now $r = g - qf$. Since $g \in I$ and $qf \in I$ (because $f \in I$ and $I$ is an ideal), the difference $r = g - qf$ belongs to $I$. If $r \neq 0$, then $\deg r < \deg f = d$, contradicting the minimality of $d$ as the smallest degree of a nonzero polynomial in $I$. Therefore $r = 0$, which gives $g = qf \in (f)$.
Since $g \in I$ was arbitrary, $I \subset (f)$.
[guided]
This is the heart of the proof: we must show that every element of $I$ is a multiple of $f$. The tool is the [Division Algorithm for Polynomials](/theorems/???), and the key observation is that minimality of $\deg f$ forces the remainder to vanish.
Let $g \in I$ be arbitrary. We apply the division algorithm with dividend $g$ and divisor $f$. The division algorithm requires that the divisor be nonzero; this holds since $f$ is monic of degree $d \geq 0$. The algorithm produces unique polynomials $q, r \in k[x]$ satisfying
\begin{align*}
g = qf + r, \qquad \deg r < \deg f \text{ or } r = 0.
\end{align*}
We now show that $r$ must be zero. Rearranging gives $r = g - qf$. Since $g \in I$ and $f \in I$, and since $I$ is an ideal of $k[x]$, we have $qf \in I$ (closure under multiplication by $q \in k[x]$) and therefore $r = g - qf \in I$ (closure under subtraction). Suppose for contradiction that $r \neq 0$. Then $\deg r$ is a well-defined non-negative integer belonging to the set $S = \{\deg h : h \in I,\, h \neq 0\}$. But $\deg r < \deg f = d$, which contradicts the fact that $d = \min S$. Therefore $r = 0$, and we conclude $g = qf \in (f)$.
Since $g \in I$ was arbitrary, this gives $I \subset (f)$.
Why does this argument require $k$ to be a field? The division algorithm for polynomials over a ring $R$ requires dividing by the leading coefficient of the divisor at each step of the long division process. When $R = k$ is a field, every nonzero leading coefficient is invertible, so the algorithm terminates with a valid quotient and remainder for any nonzero divisor. Over a general commutative ring such as $\mathbb{Z}$, division with remainder need not be possible — for example, we cannot divide $x$ by $2$ in $\mathbb{Z}[x]$. Consequently $\mathbb{Z}[x]$ is not a PID: the ideal $(2, x) \trianglelefteq \mathbb{Z}[x]$ cannot be generated by a single polynomial.
[/guided]
[/step]
[step:Conclude $I = (f)$ and establish uniqueness of the monic generator]
Combining $(f) \subset I$ and $I \subset (f)$ gives $I = (f)$. It remains to show that $f$ is the unique monic polynomial of minimal degree in $I$.
[claim:The monic generator of minimal degree is unique]
If $f_1, f_2 \in I$ are both monic of degree $d = \min S$, then $f_1 = f_2$.
[/claim]
[proof]
Since $I = (f_1)$, we have $f_2 = q f_1$ for some $q \in k[x]$. Comparing degrees: $d = \deg f_2 = \deg q + \deg f_1 = \deg q + d$, so $\deg q = 0$, meaning $q = c$ for some $c \in k \setminus \{0\}$. Since both $f_1$ and $f_2$ are monic, comparing leading coefficients gives $1 = c \cdot 1 = c$. Therefore $f_2 = f_1$.
[/proof]
This completes the proof that every ideal of $k[x]$ is principal, generated by the unique monic polynomial of minimal degree (or by $0$ if the ideal is trivial).
[/step]