Every student of algebra eventually meets the integers and polynomial rings side by side and notices something striking: both have a division algorithm, both factor elements uniquely, and in both rings every ideal is generated by a single element. This is not a coincidence. These two rings share a structural property — being a **principal ideal domain** — that is responsible for all three phenomena simultaneously. Understanding why requires us to ask a sharper question: what is the minimal ring-theoretic hypothesis that forces unique factorization?
The naive answer might be "just assume unique factorization." But that circular answer misses the deeper algebra. The concept of a principal ideal domain gives us a machine: impose one structural condition on ideals, and unique factorization, the Euclidean-like behavior, and the structure of finitely generated modules all emerge as consequences. This page develops that machine from the ground up.
[example: Failure of Unique Factorization in $\mathbb{Z}[\sqrt{-5}]$]
To see what can go wrong, consider the ring $\mathbb{Z}[\sqrt{-5}] = \{a + b\sqrt{-5} : a, b \in \mathbb{Z}\}$. This is an integral domain, but unique factorization fails: the element $6$ factors in two genuinely different ways,
\begin{align*}
6 &= 2 \cdot 3 = (1 + \sqrt{-5})(1 - \sqrt{-5}).
\end{align*}
To verify that these are genuinely different, define the norm $N(a + b\sqrt{-5}) = a^2 + 5b^2$. Then $N(2) = 4$, $N(3) = 9$, $N(1 \pm \sqrt{-5}) = 6$. An element $\alpha$ is a unit iff $N(\alpha) = 1$, so the only units are $\pm 1$. One checks that $2$ is irreducible (if $2 = \alpha\beta$, then $N(\alpha)N(\beta) = 4$, so one of $N(\alpha), N(\beta)$ must be $1$ or $2$; but $a^2 + 5b^2 = 2$ has no integer solutions), and similarly $3$ and $1 \pm \sqrt{-5}$ are irreducible. Since $2$ does not divide $1 + \sqrt{-5}$ (the ratio $\frac{1 + \sqrt{-5}}{2}$ is not in $\mathbb{Z}[\sqrt{-5}]$), and $3$ does not divide $1 + \sqrt{-5}$ either, the two factorizations are genuinely distinct. Unique factorization fails.
The ring-theoretic culprit: the ideal $(2, 1 + \sqrt{-5})$ is not principal. In a principal ideal domain, every ideal is principal, and this forces the algebraic structure that prevents precisely this sort of failure.
[/example]
## Definition
The concept we need is one level above integral domain. An integral domain already rules out zero divisors; what we want is a condition on the ideal structure that is just strong enough to recover unique factorization.
Every element $a$ in a commutative ring $R$ generates a principal ideal $(a) = aR = \{ar : r \in R\}$. Not every ideal need be of this form. The rings where all ideals are principal are exactly the rings where divisibility and ideal containment become perfectly aligned — where the lattice of ideals is as simple as possible.
[definition: Principal Ideal Domain]
An **integral domain** $R$ is a **principal ideal domain** (PID) if every ideal $I \trianglelefteq R$ is principal, that is, there exists $a \in R$ such that
\begin{align*}
I &= (a) = \{ar : r \in R\}.
\end{align*}
[/definition]
The two hypotheses — integral domain and every ideal principal — are both essential. The ring $\mathbb{Z}/6\mathbb{Z}$ has every ideal principal (it is cyclic as an additive group) but is not an integral domain: $2 \cdot 3 = 0$. The polynomial ring $\mathbb{Z}[x]$ is an integral domain but the ideal $(2, x)$ is not principal (it consists of all polynomials with even constant term, and no single polynomial generates it). Neither is a PID.
[example: $\mathbb{Z}$ is a PID]
Let $I \trianglelefteq \mathbb{Z}$. If $I = \{0\}$ then $I = (0)$. Otherwise, let $d$ be the smallest positive integer in $I$. We claim $I = (d)$. Since $d \in I$, we have $(d) \subset I$. Conversely, for any $a \in I$, write $a = qd + r$ with $0 \le r < d$ by the division algorithm. Then $r = a - qd \in I$, and since $r < d$ and $d$ is the smallest positive element of $I$, we must have $r = 0$. Thus $a = qd \in (d)$, so $I \subset (d)$.
[/example]
The same argument works for polynomial rings over a field, where the degree of a polynomial plays the role of the absolute value. The only essential ingredient is that the leading coefficient of the divisor is invertible — which is automatic when the coefficients lie in a field.
[example: $k[x]$ is a PID for any field $k$]
Let $k$ be a field and $I \trianglelefteq k[x]$ a nonzero ideal. Among all nonzero elements of $I$, pick a polynomial $f$ of minimal degree. For any $g \in I$, divide: $g = qf + r$ with $\deg r < \deg f$ or $r = 0$. Since $r = g - qf \in I$ and $\deg r < \deg f$, minimality forces $r = 0$. Thus $g \in (f)$ and $I = (f)$. Note this argument uses crucially that $k$ is a field: division with remainder requires the leading coefficient of $f$ to be a unit, which holds in $k[x]$ since $k^\times = k \setminus \{0\}$.
[/example]
[remark: Euclidean Domains]
Any [Euclidean domain](/page/Euclidean%20Domain) is a PID. The argument is identical to the two examples above: minimize the Euclidean function over nonzero elements of an ideal, then use division with remainder to show every element reduces to zero. The class of PIDs is strictly larger than the class of Euclidean domains, but most naturally occurring PIDs (e.g., $\mathbb{Z}$, $k[x]$, Gaussian integers $\mathbb{Z}[i]$) are in fact Euclidean.
[/remark]
## Divisibility and the GCD
One of the first dividends of working in a PID is that greatest common divisors not only exist but can be expressed as linear combinations — the Bezout identity. This fails in general integral domains.
In $\mathbb{Z}[\sqrt{-5}]$, the elements $2$ and $3$ share no common factor beyond units, yet no integer linear combination $2\alpha + 3\beta$ (with $\alpha, \beta \in \mathbb{Z}[\sqrt{-5}]$) equals $1$. The ideal $(2, 3)$ is not the whole ring. In a PID, this cannot happen: the ideal generated by two elements is principal, and its generator is the gcd.
[definition: Greatest Common Divisor]
Let $R$ be an integral domain and $a, b \in R$, not both zero. A **greatest common divisor** of $a$ and $b$ is an element $d \in R$ such that:
1. $d \mid a$ and $d \mid b$,
2. if $c \mid a$ and $c \mid b$ then $c \mid d$.
The gcd is unique up to units. We write $d = \gcd(a, b)$.
[/definition]
With the gcd in hand, the decisive feature of a PID enters: because $(a, b)$ is a principal ideal, the gcd is not merely an abstract divisibility notion but a concrete ring element expressible as a linear combination of $a$ and $b$.
[quotetheorem:728]
The proof is immediate: $(a, b)$ is an ideal in a PID, hence $(a, b) = (d)$ for some $d$. Since $a, b \in (d)$, we have $d \mid a$ and $d \mid b$. Since $d \in (a, b)$, we can write $d = sa + tb$. If $c \mid a$ and $c \mid b$, then $c \mid sa + tb = d$. So $d$ is the gcd.
[explanation: Why ideal-principal forces Bezout]
The key insight is the translation between divisibility and ideal containment: in a commutative ring, $a \mid b$ if and only if $(b) \subset (a)$. This means the gcd of $a$ and $b$ — the "largest" common divisor — corresponds to the "smallest" ideal containing both $(a)$ and $(b)$. That smallest ideal is exactly $(a) + (b) = (a, b)$, the ideal generated by both. When every ideal is principal, $(a, b) = (d)$ for some $d$, and $d$ is the gcd. The Bezout identity $d = sa + tb$ then follows because $d \in (a, b)$ means $d$ is an $R$-linear combination of $a$ and $b$. The entire structure flows from one assumption: principality.
[/explanation]
Principal ideals and linear combinations thus give a handle on divisibility. The next question is what kinds of elements can appear in factorizations — and that requires distinguishing two notions that happen to coincide in a PID but diverge in weaker settings.
[definition: Irreducible Element]
Let $R$ be an integral domain. An element $p \in R$ is **irreducible** if:
1. $p$ is not zero and not a unit,
2. whenever $p = ab$ with $a, b \in R$, either $a$ is a unit or $b$ is a unit.
[/definition]
Irreducibility is a statement about how $p$ can be written as a product. Primality is a stronger, ideal-theoretic statement about how $p$ can divide a product — and the gap between them is precisely what fails in rings like $\mathbb{Z}[\sqrt{-5}]$.
[definition: Prime Element]
Let $R$ be an integral domain. An element $p \in R$ is **prime** if:
1. $p$ is not zero and not a unit,
2. whenever $p \mid ab$, either $p \mid a$ or $p \mid b$.
[/definition]
In a general integral domain, prime implies irreducible, but not conversely. The element $2 \in \mathbb{Z}[\sqrt{-5}]$ is irreducible (as we verified above) but not prime: $2 \mid (1 + \sqrt{-5})(1 - \sqrt{-5}) = 6$ yet $2 \nmid 1 \pm \sqrt{-5}$. In a PID, this gap closes.
[quotetheorem:856]
The argument uses the Bezout identity: if $p \mid ab$ but $p \nmid a$, then $\gcd(p, a) = 1$ (since $p$ is irreducible, its only divisors are units and associates of $p$, and $p \nmid a$ rules out the latter). By Bezout, $sp + ta = 1$ for some $s, t \in R$. Multiplying by $b$: $spb + tab = b$. Now $p \mid spb$ and $p \mid tab$ (since $p \mid ab$), so $p \mid b$.
## Unique Factorization
The payoff of the PID condition is that every nonzero non-unit element factors uniquely into irreducibles. This is the theorem that elevates PIDs above arbitrary integral domains.
[definition: Unique Factorization Domain]
An integral domain $R$ is a **unique factorization domain** (UFD) if:
1. Every nonzero non-unit element $a \in R$ can be written as a finite product of irreducibles:
\begin{align*}
a &= p_1 p_2 \cdots p_n, \quad p_i \text{ irreducible}.
\end{align*}
2. This factorization is unique up to order and associates: if $a = p_1 \cdots p_n = q_1 \cdots q_m$, then $n = m$ and after reordering, $p_i$ and $q_i$ are associates for each $i$.
[/definition]
This is the category of rings we want to show PIDs belong to. The theorem below closes the circle started by the opening example: $\mathbb{Z}[\sqrt{-5}]$ fails to be a PID precisely because it fails to be a UFD, and these two failures are the same thing.
[quotetheorem:3256]
The proof proceeds in two stages. First, one shows that every element factors into finitely many irreducibles — this uses the **ascending chain condition** (ACC) on principal ideals, which holds in any PID (an ascending chain of principal ideals $(a_1) \subset (a_2) \subset \cdots$ corresponds to a chain of divisibility, and one checks it must stabilize). Second, uniqueness follows from the fact that irreducibles are prime in a PID: if $p$ is irreducible and $p \mid q_1 \cdots q_m$, then by primality $p \mid q_j$ for some $j$, and since $q_j$ is also irreducible, $p$ and $q_j$ are associates.
[remark: The Converse is False]
The converse fails: there exist UFDs that are not PIDs. The polynomial ring $\mathbb{Z}[x]$ is a UFD — this is a theorem — but the ideal $(2, x)$ is not principal. The property that distinguishes PIDs from general UFDs is precisely the principality of ideals, not unique factorization.
[/remark]
<!-- illustration-needed: lattice of ring classes — fields, Euclidean domains, PIDs, UFDs, integral domains — as nested containments, with labelled examples at each boundary -->
To see unique factorization in action, it helps to work through a concrete PID beyond $\mathbb{Z}$ — one where the Gaussian integers show how rational primes split into genuinely distinct Gaussian primes.
[example: Factorization in $\mathbb{Z}[i]$]
The Gaussian integers $\mathbb{Z}[i] = \{a + bi : a, b \in \mathbb{Z}\}$ form a PID (they are in fact Euclidean, with Euclidean function $N(a + bi) = a^2 + b^2$). Let us factor $50$ in $\mathbb{Z}[i]$. In $\mathbb{Z}$, $50 = 2 \cdot 5^2$. In $\mathbb{Z}[i]$:
\begin{align*}
2 &= -i(1 + i)^2 \\
5 &= (2 + i)(2 - i).
\end{align*}
To verify: $(1 + i)^2 = 2i$ and $-i \cdot 2i = 2$, confirming the first. For the second, $(2 + i)(2 - i) = 4 + 1 = 5$. Thus
\begin{align*}
50 &= -i(1+i)^2 \cdot (2+i)^2(2-i)^2.
\end{align*}
Each of $1+i$, $2+i$, $2-i$ is irreducible in $\mathbb{Z}[i]$: their norms are $2$, $5$, $5$ respectively, and an element of norm $p$ (prime in $\mathbb{Z}$) is irreducible in $\mathbb{Z}[i]$ because if $\alpha\beta = \gamma$ with $N(\gamma) = p$, then $N(\alpha)N(\beta) = p$, forcing one of $N(\alpha), N(\beta)$ to be $1$, hence a unit. The factor $-i$ is a unit in $\mathbb{Z}[i]$ since $N(-i) = 1$. The factorization is unique up to units and order.
[/example]
## Ideals and the Lattice Structure
In a PID, the ideal structure is completely transparent: every ideal is determined by a single element, and the containment order on ideals corresponds exactly to divisibility. This translates deep questions about ring structure into questions about divisibility, which can often be answered by inspection.
[quotetheorem:3257]
This is elementary: $a \in (b)$ iff $a = rb$ for some $r \in R$, iff $b \mid a$.
An important consequence concerns prime and maximal ideals.
[quotetheorem:3258]
Suppose $\mathfrak{p} = (p)$ with $p$ prime (hence irreducible) and $(p) \subset I = (a)$ for some ideal $I$. Then $a \mid p$, so either $a$ is a unit (giving $I = R$) or $a$ is an associate of $p$ (giving $I = (p)$). No intermediate ideal exists.
This rigidity of the prime ideal lattice is a hallmark of PIDs and has no analogue in general Noetherian domains. The explanation below contrasts it with $\mathbb{Z}[x]$, where a richer hierarchy of prime ideals is visible.
[explanation: Why This Fails Outside PIDs]
In the polynomial ring $\mathbb{Z}[x]$, the ideal $(p)$ for a prime $p \in \mathbb{Z}$ is prime but not maximal: $(p) \subsetneq (p, x) \subsetneq \mathbb{Z}[x]$. The chain of prime ideals in $\mathbb{Z}[x]$ has length $2$ (the Krull dimension of $\mathbb{Z}[x]$ is $2$). In a PID, every nonzero prime ideal is maximal, so the Krull dimension is at most $1$. A PID is either a field (dimension $0$) or has Krull dimension exactly $1$. The principality condition severely constrains the ideal lattice, collapsing the hierarchy of prime ideals.
[/explanation]
Before moving to modules, it is worth formalizing the notion of associates, which appeared implicitly throughout: two elements generate the same ideal precisely when they are related by a unit, and this equivalence underlies the uniqueness statements in both the ideal structure theorem and unique factorization.
[definition: Associates]
Two elements $a, b$ in an integral domain $R$ are **associates** if there exists a unit $u \in R^\times$ such that $a = ub$. Being associates is an equivalence relation, and two elements generate the same principal ideal iff they are associates.
[/definition]
## Structure of Finitely Generated Modules
One of the deepest applications of the PID condition is the classification of finitely generated modules. Over a general ring, modules can be wildly complicated. Over a PID, they admit a complete and explicit classification — the **structure theorem** — which simultaneously generalizes the classification of finite abelian groups and the Jordan normal form theorem from linear algebra.
The key question is: what do finitely generated $R$-modules look like when $R$ is a PID? Over a field, every module is free (a vector space). Over $\mathbb{Z}$, finitely generated modules are finitely generated abelian groups, which we know can have torsion. Over a PID, the same picture holds.
[definition: Torsion Element and Torsion Submodule]
Let $R$ be an integral domain and $M$ an $R$-module. An element $m \in M$ is a **torsion element** if there exists a nonzero $r \in R$ with $rm = 0$. The set of all torsion elements,
\begin{align*}
\operatorname{Tor}(M) &= \{m \in M : rm = 0 \text{ for some } r \in R \setminus \{0\}\},
\end{align*}
is a submodule of $M$, called the **torsion submodule**. The module $M$ is **torsion-free** if $\operatorname{Tor}(M) = 0$, and **torsion** if $\operatorname{Tor}(M) = M$.
[/definition]
At the opposite extreme from torsion modules are the modules that behave like vector spaces: those with a basis, where every element decomposes uniquely as a finite linear combination of basis elements. The correct generalization of "dimension" in this setting is rank.
[definition: Free Module and Rank]
An $R$-module $M$ is **free of rank $n$** if it is isomorphic to the direct sum $R^n = R \oplus \cdots \oplus R$ ($n$ copies). The **rank** of a finitely generated torsion-free module over a PID is the unique $n$ such that $M \cong R^n$.
[/definition]
With torsion and freeness defined, the structure theorem states that every finitely generated module over a PID splits into a free part — the rank $r$ summand — and a torsion part built from cyclic modules $R/(d_i)$, with the divisibility chain $d_1 \mid \cdots \mid d_k$ making the decomposition canonical.
[quotetheorem:3233]
The elements $d_1, \ldots, d_k$ are the invariant factors, and the condition $d_1 \mid d_2 \mid \cdots \mid d_k$ is what makes them unique. There is an equivalent formulation using **elementary divisors**, which are the prime power factors of the invariant factors — the two forms carry identical information and are interchangeable.
[example: Finitely Generated Abelian Groups]
For $R = \mathbb{Z}$, finitely generated $\mathbb{Z}$-modules are finitely generated abelian groups. The structure theorem says every such group is isomorphic to
\begin{align*}
\mathbb{Z}^r \oplus \mathbb{Z}/d_1\mathbb{Z} \oplus \cdots \oplus \mathbb{Z}/d_k\mathbb{Z},
\end{align*}
with $d_1 \mid d_2 \mid \cdots \mid d_k$. For instance, all abelian groups of order $12$ are classified:
- $\mathbb{Z}/12\mathbb{Z}$ (invariant factor $12$),
- $\mathbb{Z}/2\mathbb{Z} \oplus \mathbb{Z}/6\mathbb{Z}$ (invariant factors $2 \mid 6$, since $d_1 = 2$ and $d_2 = 6$).
These are the only two, since the elementary divisors must partition $12 = 2^2 \cdot 3$: either $4 \cdot 3$ (cyclic) or $2 \cdot 2 \cdot 3 = 2 \cdot 6$ (non-cyclic). We verify $2 \mid 6$ and $|G| = 2 \cdot 6 = 12$ in the second case. Note that $\mathbb{Z}/2\mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z} \oplus \mathbb{Z}/3\mathbb{Z}$ has order $12$ but invariant factors $2 \mid 6$ since $\mathbb{Z}/2\mathbb{Z} \oplus \mathbb{Z}/6\mathbb{Z} \cong \mathbb{Z}/2\mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z} \oplus \mathbb{Z}/3\mathbb{Z}$ by the Chinese Remainder Theorem (since $\gcd(2,3) = 1$, $\mathbb{Z}/6\mathbb{Z} \cong \mathbb{Z}/2\mathbb{Z} \oplus \mathbb{Z}/3\mathbb{Z}$). So there are exactly two isomorphism classes.
[/example]
The same structure theorem, applied to the PID $k[x]$, recovers one of the fundamental theorems of linear algebra: every linear operator has a Jordan normal form when the base field is algebraically closed.
[example: Jordan Normal Form]
Let $V$ be a finite-dimensional vector space over a field $k$ and $T: V \to V$ a linear operator. Make $V$ into a $k[x]$-module by letting $x$ act as $T$: $f(x) \cdot v = f(T)(v)$. Since $V$ is finite-dimensional and $k[x]$ is a PID, the structure theorem applies:
\begin{align*}
V &\cong k[x]/(f_1(x)) \oplus \cdots \oplus k[x]/(f_m(x)),
\end{align*}
where $f_1 \mid f_2 \mid \cdots \mid f_m$ in $k[x]$. The polynomial $f_m$ is the **minimal polynomial** of $T$, and the product $f_1 \cdots f_m$ is the **characteristic polynomial**. When $k$ is algebraically closed, each $f_i$ factors as a product of linear factors, and the decomposition into primary components (elementary divisors) yields the Jordan blocks. The Jordan normal form theorem is thus a corollary of the structure theorem over the PID $k[x]$.
[/example]
## The Chinese Remainder Theorem
The principal ideal structure allows a clean and general formulation of the Chinese Remainder Theorem. In $\mathbb{Z}$, the classical CRT says that simultaneous congruences modulo pairwise coprime moduli have a unique simultaneous solution. In a PID, this generalizes verbatim.
The Chinese Remainder Theorem requires its moduli to be "independent" in a precise sense: no non-unit element should divide into both of them simultaneously. This independence condition is captured by the notion of coprime ideals, which generalizes the familiar condition $\gcd(a, b) = 1$ from the integers to arbitrary rings.
[definition: Coprime Ideals]
Two ideals $I, J \trianglelefteq R$ are **coprime** (or **comaximal**) if $I + J = R$.
[/definition]
The name reflects the same intuition as coprime integers: two ideals are coprime when together they cover the whole ring, leaving no common non-unit factor. In a PID with $I = (a)$ and $J = (b)$, the ideals are coprime iff $(a) + (b) = (d) = R$ where $d = \gcd(a, b)$. This holds iff $d$ is a unit, iff $\gcd(a, b) = 1$ — so coprime ideals correspond exactly to coprime elements. The Bezout identity provides the key: $\gcd(a, b) = 1$ implies $sa + tb = 1$ for some $s, t \in R$.
[quotetheorem:734]
The classical case $R = \mathbb{Z}$ makes this entirely concrete: coprime moduli yield a bijection between residues modulo the product and tuples of residues modulo each factor.
[example: CRT in $\mathbb{Z}$]
Find $x \in \mathbb{Z}$ with $x \equiv 2 \pmod{3}$, $x \equiv 3 \pmod{5}$, $x \equiv 2 \pmod{7}$. Since $\gcd(3, 5) = \gcd(3, 7) = \gcd(5, 7) = 1$, the moduli are pairwise coprime, and the CRT gives a unique solution mod $105 = 3 \cdot 5 \cdot 7$. Using the standard constructive proof: set $M = 105$, $M_1 = 35$, $M_2 = 21$, $M_3 = 15$. Solve $35 y_1 \equiv 1 \pmod{3}$: $35 \equiv 2 \pmod 3$, and $2 \cdot 2 = 4 \equiv 1$, so $y_1 = 2$. Solve $21 y_2 \equiv 1 \pmod{5}$: $21 \equiv 1 \pmod 5$, so $y_2 = 1$. Solve $15 y_3 \equiv 1 \pmod{7}$: $15 \equiv 1 \pmod 7$, so $y_3 = 1$. Then
\begin{align*}
x &\equiv 2 \cdot 35 \cdot 2 + 3 \cdot 21 \cdot 1 + 2 \cdot 15 \cdot 1 \\
&= 140 + 63 + 30 \\
&= 233 \equiv 233 - 2 \cdot 105 = 23 \pmod{105}.
\end{align*}
Check: $23 = 7 \cdot 3 + 2$, so $23 \equiv 2 \pmod{3}$. $23 = 4 \cdot 5 + 3$, so $23 \equiv 3 \pmod{5}$. $23 = 3 \cdot 7 + 2$, so $23 \equiv 2 \pmod{7}$. All three congruences satisfied.
[/example]
## Examples and Non-Examples
Building intuition for PIDs requires not just seeing the main examples but also understanding which rings fail to be PIDs and why. Every failure traces to an ideal that is not principal.
[example: $\mathbb{Z}[\sqrt{-5}]$ is Not a PID]
The ideal $I = (2, 1 + \sqrt{-5})$ in $\mathbb{Z}[\sqrt{-5}]$ is not principal. To see this, suppose $I = (d)$ for some $d \in \mathbb{Z}[\sqrt{-5}]$. Then $d \mid 2$ and $d \mid 1 + \sqrt{-5}$, so $N(d) \mid N(2) = 4$ and $N(d) \mid N(1 + \sqrt{-5}) = 6$. Thus $N(d) \mid \gcd(4, 6) = 2$. The only elements with norm $1$ are $\pm 1$ (units), and there is no element with norm $2$ in $\mathbb{Z}[\sqrt{-5}]$ (since $a^2 + 5b^2 = 2$ has no integer solutions). So $N(d) = 1$, meaning $d$ is a unit, and $I = R$. But $I \ne R$: for example, $1 \notin I$ since every element of $I$ has the form $2\alpha + (1 + \sqrt{-5})\beta$, and every element of $I$ can be written as $2(a_1 + b_1\sqrt{-5}) + (1+\sqrt{-5})(a_2 + b_2\sqrt{-5})$ for integers $a_1, b_1, a_2, b_2$. Expanding the real part gives $2a_1 + a_2 - 5b_2$, which has the same parity as $a_2 + b_2$. The imaginary part is $2b_1 + a_2 + b_2$, which also has the same parity as $a_2 + b_2$. For an element of $I$ to equal $1$, the real part must be $1$ (odd) and the imaginary part must be $0$ (even), but since both parts share the parity of $a_2 + b_2$, they must have the same parity. An odd real part and an even imaginary part is impossible, so $1 \notin I$. This contradiction shows $I$ is not principal.
[/example]
The polynomial ring $\mathbb{Z}[x]$ provides a second, more elementary non-example, where the failure can be seen with a simpler parity argument.
[example: $\mathbb{Z}[x]$ is Not a PID]
The ideal $(2, x) \trianglelefteq \mathbb{Z}[x]$ is not principal. Suppose $(2, x) = (f)$ for some $f \in \mathbb{Z}[x]$. Then $f \mid 2$ in $\mathbb{Z}[x]$, so $f$ divides the constant polynomial $2$. Divisors of $2$ in $\mathbb{Z}[x]$ are the divisors of $2$ in $\mathbb{Z}$: namely $\pm 1$ and $\pm 2$. If $f = \pm 1$, then $(f) = \mathbb{Z}[x]$, but $(2, x) \ne \mathbb{Z}[x]$ because every element of $(2, x)$ evaluated at $0$ is even, so $1 \notin (2, x)$. If $f = \pm 2$, then $(f) = (2) \ne (2, x)$ since $x \notin (2)$ (as $x = 2g(x)$ would require $g(x) = x/2$, which is not in $\mathbb{Z}[x]$). In all cases we reach a contradiction.
[/example]
Having seen concrete examples and non-examples, it is useful to have an intrinsic characterization of PIDs that does not mention ideals directly but instead separates the condition into two independently checkable properties.
[quotetheorem:3259]
This characterization is useful because it connects the PID condition to the broader theory of Dedekind domains. Every Dedekind domain has unique factorization of ideals into prime ideals; when the class group is trivial, every ideal is principal, and ideal factorization reduces to element factorization. The condition separates naturally: the Dedekind hypothesis provides the well-behaved ideal theory, and the trivial class group forces every ideal to be principal. Note the contrast with the weaker characterization of UFDs: an integral domain is a UFD if and only if it is Noetherian and every irreducible element is prime. The ring $\mathbb{Z}[x]$ satisfies both of those conditions (it is a UFD) but is not a PID — the ideal $(2, x)$ is not principal, as we saw above.
[remark: Connection to Dedekind Domains]
Every PID is a [Dedekind domain](/page/Dedekind%20Domain). Dedekind domains are the rings in which every nonzero ideal factors uniquely into prime ideals — the natural generalization of unique factorization from elements to ideals. In a PID, every ideal is principal, so this ideal factorization reduces to ordinary element factorization. The gap between PIDs and general Dedekind domains is measured by the **ideal class group** $\operatorname{Cl}(\mathcal{O}_K)$ of a number field $K$: the ring of integers $\mathcal{O}_K$ is a Dedekind domain, and $\mathcal{O}_K$ is a PID if and only if $\operatorname{Cl}(\mathcal{O}_K)$ is trivial, equivalently the class number $h_K = |\operatorname{Cl}(\mathcal{O}_K)| = 1$. The ring $\mathbb{Z}[\sqrt{-5}]$ has class number $2$ — the nontrivial ideal class is represented by the ideal $(2, 1 + \sqrt{-5})$ that appeared in our opening example.
[/remark]
## References
- Dummit, D. S. and Foote, R. M., *Abstract Algebra*, Third Edition (2004). Chapters 8–9 cover PIDs, UFDs, and the structure theorem.
- Lang, S., *Algebra*, Revised Third Edition (2002). Chapter II–III.
- Atiyah, M. F. and Macdonald, I. G., *Introduction to Commutative Algebra* (1969). Chapter 1–2 for the ideal-theoretic perspective.
- Jacobson, N., *Basic Algebra I* (1985). Chapter 2 for a detailed treatment of PIDs.