Euclidean Domains and PIDs

By now you can build the quotient of a ring by an ideal, and you know that in \mathbb{Z} every ideal turned out to be n\mathbb{Z} — a single generator did all the work. That was not a lucky accident of the integers. It is a structural property with a name, and a whole family of rings share it. A ring in which every ideal is generated by one element is a principal ideal domain (PID), and PIDs are the rings where number theory still feels like number theory: gcds exist, Bézout's identity holds, and factorization behaves.

Where does that good behaviour come from? Almost always from a single humble tool you have used since primary school — division with remainder. The Euclidean algorithm works in \mathbb{Z} because you can always divide a by a nonzero b and get a remainder strictly smaller than b. Abstract exactly that ability — a "size" function that shrinks under division — and you get a Euclidean domain. This page pins down both notions, proves the theorem that ties them together (every Euclidean domain is a PID), and watches the same machinery run in three very different rings: the integers, polynomials over a field, and the Gaussian integers \mathbb{Z}[i].

Principal ideal domains

Recall that in a commutative ring the principal ideal generated by an element a is (a) = \{\, ra : r \in R \,\}, the set of all multiples of a. Some rings have ideals that need two or more generators, written (a, b) = \{\, ra + sb : r, s \in R \,\}. A PID is exactly the ring where that never happens — one generator is always enough.

A principal ideal domain is a ring R that is:

You have already met the founding example. We showed that every ideal of \mathbb{Z} is n\mathbb{Z} = (n), so \mathbb{Z} is a PID. A second heavyweight is F[x], the polynomials over a field F: it too is a PID. Both facts are proved the same way — and that shared proof is what the rest of this page is about.

Euclidean domains: division with remainder, abstracted

What do \mathbb{Z} and F[x] have in common that forces every ideal to be principal? In each you can divide and get a smaller remainder. In \mathbb{Z} "smaller" means smaller absolute value; in F[x] it means lower degree. Distil that into one axiom and you have named a whole class of rings.

A Euclidean domain is an integral domain R equipped with a Euclidean function (or "norm", or "size") N : R \setminus \{0\} \to \mathbb{Z}_{\ge 0} such that:

(The quotient and remainder need not be unique — only their existence is required.)

Three rings carry a natural Euclidean function, and they are the workhorses of the subject:

The theorem that unifies them: Euclidean \Rightarrow PID

Here is the payoff. That one division axiom is powerful enough to force every ideal to collapse onto a single generator.

If R is a Euclidean domain with norm N, then every ideal I \subseteq R is principal. In fact I = (d), where d is any nonzero element of I of smallest norm.

Proof (the Euclidean algorithm in disguise). The zero ideal is (0), done. Otherwise pick a nonzero d \in I whose N(d) is as small as possible (an actual minimum exists because norms are non-negative integers). Certainly (d) \subseteq I by absorption. For the reverse, take any a \in I and divide: a = dq + r with r = 0 or N(r) < N(d). But r = a - dq lies in I (both a and dq do), and d had the smallest norm of any nonzero element of I. So N(r) < N(d) is impossible — the only escape is r = 0, i.e. a = dq \in (d). Hence I = (d). \blacksquare

That single argument retroactively explains everything: \mathbb{Z}, F[x] and \mathbb{Z}[i] are all Euclidean, so all three are PIDs. And the generator d of the ideal (a, b) is precisely a greatest common divisor of a and b — which hands you Bézout for free.

Worked example 1: gcd and Bézout in \mathbb{Z}

Let us find \gcd(48, 18) and write it as an integer combination. Run division with remainder repeatedly, each remainder becoming the next divisor:

\begin{aligned} 48 &= 2 \cdot 18 + 12,\\ 18 &= 1 \cdot 12 + 6,\\ 12 &= 2 \cdot 6 + 0. \end{aligned}

The last nonzero remainder is 6, so \gcd(48, 18) = 6 and the ideal (48, 18) = (6) = 6\mathbb{Z}. Now back-substitute to get Bézout:

6 = 18 - 1 \cdot 12 = 18 - (48 - 2 \cdot 18) = 3 \cdot 18 - 1 \cdot 48.

So 6 = (-1)\cdot 48 + 3 \cdot 18 — check: -48 + 54 = 6. The Euclidean function N(n) = |n| strictly dropped at every line (18 > 12 > 6 > 0), which is why the process had to stop.

Worked example 2: dividing polynomials in \mathbb{Q}[x]

The same division-with-remainder runs in \mathbb{Q}[x], with N = \deg. Divide a = x^3 + 2x^2 - 1 by b = x^2 + 1:

x^3 + 2x^2 - 1 = (x^2 + 1)(x + 2) + (-x - 3).

The remainder -x - 3 has degree 1 < 2 = \deg b, so the algorithm halts — exactly the Euclidean condition N(r) < N(b). Crucially this needs F to be a field: you must divide by the leading coefficient of b. Over \mathbb{Z}, where you cannot, \mathbb{Z}[x] is not Euclidean (and, we will see, not even a PID).

Worked example 3: dividing Gaussian integers

The Gaussian integers \mathbb{Z}[i] are lattice points in the complex plane, and the norm N(a + bi) = a^2 + b^2 measures squared distance from the origin. Division with remainder is beautifully geometric: to divide, snap the exact complex quotient to its nearest lattice point. Divide 3 + 2i by 1 + i. First compute the true quotient by rationalising:

\frac{3 + 2i}{1 + i} = \frac{(3 + 2i)(1 - i)}{(1 + i)(1 - i)} = \frac{5 - i}{2} = 2.5 - 0.5\,i.

Round each coordinate to the nearest integer: the closest Gaussian integer is q = 2. Then the remainder is

r = (3 + 2i) - (1 + i)\cdot 2 = (3 + 2i) - (2 + 2i) = 1.

Check the shrinking condition: N(r) = N(1) = 1, while N(b) = N(1 + i) = 1^2 + 1^2 = 2, so indeed N(r) < N(b). Why can we always succeed? The multiples of 1 + i form a coarser sublattice (below), and every point of the plane lies within distance \tfrac{\sqrt{2}}{2}\,|b| of some multiple of b — comfortably less than |b|. That geometric fact is the proof that \mathbb{Z}[i] is Euclidean, hence a PID.

The hierarchy so far

Each new condition is strictly stronger than the last, nesting these rings into a tower. Reading inward (most special first):

\text{Fields} \subset \text{Euclidean domains} \subset \text{PIDs} \subset \text{UFDs} \subset \text{integral domains}.

All four inclusions are strict — there are PIDs that are not Euclidean, UFDs that are not PIDs, and domains with no unique factorization at all. Those separating examples are what the two vignettes below are for.

Two symmetric traps sit on either side of "PID", and confusing them is the classic mistake.

Trap 1 — a domain need not be a PID. The polynomial ring \mathbb{Z}[x] is a perfectly good integral domain (even a UFD), but it is not a PID. The witness is the ideal (2, x) of all polynomials with even constant term. Suppose it were (d) for a single d. Then d \mid 2, forcing d \in \{\pm 1, \pm 2\}; and d \mid x forces d = \pm 1. But d = \pm 1 would make (d) = \mathbb{Z}[x], which contains 1 — yet 1 has an odd constant term, so 1 \notin (2, x). Contradiction: (2, x) genuinely needs two generators. (This is exactly why F[x] demands F be a field.)

Trap 2 — a PID need not be Euclidean. "Euclidean" is a sufficient tool for being a PID, not a necessary one. The famous counterexample is R = \mathbb{Z}\!\left[\tfrac{1 + \sqrt{-19}}{2}\right], the ring of integers of \mathbb{Q}(\sqrt{-19}). It is a PID, yet one can prove no Euclidean function of any kind exists on it (it has no "universal side divisor"). So the inclusion Euclidean \subset PID is strict: being a PID is about ideals, being Euclidean is about an algorithm, and the algorithm can be missing even when the ideal property holds.

The norm N(a + bi) = a^2 + b^2 is not just a bookkeeping device — it is multiplicative: N(zw) = N(z)\,N(w). Multiplying two Gaussian integers multiplies their squared lengths. Spelled out for z = a + bi and w = c + di, this is the ancient Brahmagupta–Fibonacci identity (a^2 + b^2)(c^2 + d^2) = (ac - bd)^2 + (ad + bc)^2, which says a product of two sums of two squares is itself a sum of two squares.

Because \mathbb{Z}[i] is a Euclidean domain — hence a PID, hence a UFD — primes factor uniquely there, and analysing which ordinary primes p stay prime or split as p = (a + bi)(a - bi) = a^2 + b^2 yields Fermat's two-square theorem: an odd prime p is a sum of two squares exactly when p \equiv 1 \pmod 4. So 13 = 2^2 + 3^2 and 29 = 2^2 + 5^2, but 7 and 11 never can be. A fact about plain integers, proved cleanly by moving up into a Euclidean domain of complex ones.