Chapter 7 · Rings

7.2 Prime and Maximal Ideals; ED, PID and UFD

When does a ring behave like $\mathbb{Z}$? Prime and maximal ideals and their quotients, irreducible versus prime elements, and the hierarchy Euclidean domain ⇒ principal ideal domain ⇒ unique factorisation domain — with $\mathbb{Z}[i]$, $\mathbb{Z}[x]$ and $\mathbb{Z}[\sqrt{-5}]$ as the decisive examples.

Two properties of a prime number $p$ are taught as if they were one. The first is that $p$ cannot be written as a product of two smaller positive integers (it is irreducible); the second is Euclid's lemma, that $p\mid ab$ forces $p\mid a$ or $p\mid b$ (it is prime). In $\mathbb{Z}$ they are equivalent, and their equivalence is exactly what makes factorisation into primes unique (§5.2). In other rings they separate. In $\mathbb{Z}[\sqrt{-5}]$ the number $2$ cannot be factored, yet it divides $6=(1+\sqrt{-5})(1-\sqrt{-5})$ without dividing either factor, and $6$ has two genuinely different factorisations into irreducibles. In 1847 Gabriel Lamé announced a proof of Fermat's Last Theorem that assumed unique factorisation in rings like $\mathbb{Z}[\zeta_p]$; Ernst Kummer had already found that it fails there, and his repair — "ideal numbers" — became Dedekind's ideals.

This section translates divisibility into the language of ideals. Prime ideals are the ideals $P$ for which $R/P$ is an integral domain, and maximal ideals those for which $R/M$ is a field — the machine that manufactures every finite field and every number field in Chapter 8. We then climb the ladder of well-behaved domains: Euclidean domains (division with remainder), principal ideal domains (every ideal has one generator) and unique factorisation domains, prove $\text{ED}\Rightarrow\text{PID}\Rightarrow\text{UFD}$, and learn the standard examples that show neither arrow reverses. CSIR NET asks for this hierarchy in almost every paper: "which of the following rings are PIDs / UFDs", "which ideals are prime / maximal", "is this element irreducible / prime", "how many maximal ideals does $\mathbb{Z}_n$ have". Throughout, ring means commutative ring with identity $1\ne0$.

Prime and Maximal Ideals

📘 Definition 7.10 — Prime ideal, maximal ideal

Let $R$ be a commutative ring with $1\ne0$ and $I$ a proper ideal ($I\ne R$).

  • $I$ is a prime ideal if $ab\in I$ implies $a\in I$ or $b\in I$.
  • $I$ is a maximal ideal if there is no ideal strictly between $I$ and $R$: whenever $I\subseteq J\subseteq R$ with $J$ an ideal, $J=I$ or $J=R$.

In $\mathbb{Z}$, the ideal $n\mathbb{Z}$ ($n\ge2$) is prime exactly when $n$ is prime — that is Euclid's lemma — and $\{0\}$ is prime because $\mathbb{Z}$ has no zero divisors. The whole ring is excluded by convention, just as $1$ is not a prime number.

📐 Theorem 7.20 — The quotient test
Let $R$ be a commutative ring with $1\ne0$ and $I$ an ideal. Then
  1. $I$ is prime $\iff$ $R/I$ is an integral domain;
  2. $I$ is maximal $\iff$ $R/I$ is a field.

Proof. In both parts, $I\ne R$ iff $1+I\ne0+I$ iff $R/I$ is not the zero ring, so the conditions "$I$ proper" and "$1\ne0$ in $R/I$" match. (1) $(a+I)(b+I)=0+I$ means $ab\in I$, and $a+I=0+I$ means $a\in I$. So "$ab\in I\Rightarrow a\in I$ or $b\in I$" says exactly that $R/I$ has no zero divisors.

(2) Suppose $I$ is maximal and $a\notin I$. The ideal $I+\langle a\rangle=\{x+ra:x\in I,r\in R\}$ strictly contains $I$, so it is $R$: $1=x+ra$ for some $x\in I$, $r\in R$. Then $(r+I)(a+I)=1-x+I=1+I$, so $a+I$ is invertible: $R/I$ is a field. Conversely, let $R/I$ be a field and $J\supsetneq I$ an ideal; pick $a\in J\setminus I$. Then $a+I\ne0$ has an inverse $b+I$, so $ab-1\in I\subseteq J$; as $ab\in J$, we get $1\in J$ and $J=R$. ∎

A second proof of (2) uses the correspondence theorem (§7.1): ideals of $R/I$ correspond to ideals between $I$ and $R$, so $I$ is maximal iff $R/I$ has exactly two ideals, iff $R/I$ is a field. The two halves of Theorem 7.20 are the most-used facts in this chapter: they turn "is this ideal prime/maximal?" into "is this ring a domain/field?", which we can usually decide by identifying the quotient with the first isomorphism theorem.

📐 Theorem 7.21 — Consequences
  1. Every maximal ideal is prime.
  2. $\{0\}$ is a prime ideal iff $R$ is an integral domain, and a maximal ideal iff $R$ is a field.
  3. If $R/P$ is finite — in particular if $R$ itself is finite — then $P$ is prime iff it is maximal.
  4. If $\phi:R\to S$ is a unital homomorphism and $Q$ is a prime ideal of $S$, then $\phi^{-1}(Q)$ is a prime ideal of $R$.

Proof. (1) A field is an integral domain. (2) $R/\{0\}\cong R$. (3) A finite integral domain is a field (§7.1, finite integral domains are fields). (4) $\phi^{-1}(Q)$ is an ideal (§7.1), proper because $\phi(1)=1\notin Q$, and $ab\in\phi^{-1}(Q)$ means $\phi(a)\phi(b)\in Q$, so $\phi(a)\in Q$ or $\phi(b)\in Q$. ∎

Part (4) fails for maximal ideals: for the inclusion $\iota:\mathbb{Z}\to\mathbb{Q}$, $\{0\}$ is maximal in $\mathbb{Q}$ but $\iota^{-1}(\{0\})=\{0\}$ is not maximal in $\mathbb{Z}$. And all the results need an identity: in the ring $2\mathbb{Z}$, the ideal $4\mathbb{Z}$ is maximal (there is nothing strictly between $4\mathbb{Z}$ and $2\mathbb{Z}$, since $[2\mathbb{Z}:4\mathbb{Z}]=2$), but $2\mathbb{Z}/4\mathbb{Z}$ has all products zero and is not a field.

📐 Theorem 7.22 — Krull's theorem: maximal ideals exist
In a commutative ring with $1\ne0$, every proper ideal is contained in a maximal ideal. In particular every non-unit lies in some maximal ideal, and every nonzero ring has at least one maximal ideal.

Proof (sketch). Let $I$ be proper and let $\mathcal{S}$ be the set of proper ideals containing $I$, ordered by inclusion; $I\in\mathcal{S}$. If $\{J_\lambda\}$ is a chain in $\mathcal{S}$, its union $J$ is an ideal (two elements lie in a common $J_\lambda$, because the family is a chain) and is proper, because $1\notin J_\lambda$ for every $\lambda$. So every chain has an upper bound in $\mathcal{S}$, and Zorn's lemma gives a maximal element of $\mathcal{S}$, which is a maximal ideal containing $I$. For a non-unit $a$, apply this to $I=\langle a\rangle\ne R$. ∎

For the rings in exams no Zorn is needed: in $\mathbb{Z}$, $\mathbb{Z}_n$, $F[x]$ or $\mathbb{Z}[i]$ one exhibits the maximal ideals directly, as follows.

📐 Theorem 7.23 — Prime and maximal ideals of $\mathbb{Z}$, $\mathbb{Z}_n$ and products
  1. The prime ideals of $\mathbb{Z}$ are $\{0\}$ and $p\mathbb{Z}$ ($p$ prime); the maximal ideals are the $p\mathbb{Z}$.
  2. The prime ideals of $\mathbb{Z}_n$ ($n\ge2$) are the ideals $\langle\bar p\rangle$ for the primes $p\mid n$; they are all maximal, and $\mathbb{Z}_n/\langle\bar p\rangle\cong\mathbb{Z}_p$. So $\mathbb{Z}_n$ has exactly $\omega(n)$ prime ideals, $\omega(n)$ being the number of distinct prime divisors of $n$.
  3. The prime ideals of $R\times S$ are the ideals $P\times S$ ($P$ prime in $R$) and $R\times Q$ ($Q$ prime in $S$); the same holds with "maximal" in place of "prime".

Proof. (1) Every ideal is $n\mathbb{Z}$ with $n\ge0$ (§7.1). $\mathbb{Z}/\{0\}\cong\mathbb{Z}$ is a domain but not a field; $\mathbb{Z}/n\mathbb{Z}=\mathbb{Z}_n$ is a domain iff it is a field iff $n$ is prime (§7.1). Apply Theorem 7.20. (2) By the correspondence theorem, ideals of $\mathbb{Z}_n$ are $d\mathbb{Z}/n\mathbb{Z}$ with $d\mid n$, and $\mathbb{Z}_n/\langle\bar d\rangle\cong\mathbb{Z}/d\mathbb{Z}$ by the third isomorphism theorem; this is a domain (equivalently a field) iff $d$ is prime. (3) Every ideal of $R\times S$ is $I\times J$ (§7.1, Exercise III.8 there), and $(R\times S)/(I\times J)\cong R/I\times S/J$ via $(r,s)\mapsto(r+I,s+J)$. A product of two rings is a domain only if one factor is the zero ring, i.e. $I=R$ or $J=S$; the remaining factor must then be a domain (respectively a field). ∎

📐 Theorem 7.24 — The maximal ideals of $C[0,1]$
For $c\in[0,1]$ let $M_c=\{f\in C[0,1]:f(c)=0\}$. Each $M_c$ is a maximal ideal, $M_c\ne M_{c'}$ for $c\ne c'$, and every maximal ideal of $C[0,1]$ is one of the $M_c$.

Proof. Evaluation $f\mapsto f(c)$ is a homomorphism onto $\mathbb{R}$ (constants are continuous) with kernel $M_c$, so $C[0,1]/M_c\cong\mathbb{R}$ is a field and $M_c$ is maximal. The function $x\mapsto|x-c|$ lies in $M_c$ but not in $M_{c'}$. Now let $M$ be any proper ideal, and suppose that for every $c\in[0,1]$ some $f_c\in M$ has $f_c(c)\ne0$. By continuity $f_c\ne0$ on an open interval $U_c\ni c$ (relative to $[0,1]$). Since $[0,1]$ is compact, finitely many $U_{c_1},\dots,U_{c_k}$ cover it. Then $g=f_{c_1}^2+\dots+f_{c_k}^2\in M$ (each $f_{c_j}\cdot f_{c_j}\in M$) and $g\gt0$ everywhere, so $1/g\in C[0,1]$ and $g$ is a unit — contradicting $M\ne C[0,1]$. Hence some $c$ has $f(c)=0$ for all $f\in M$, i.e. $M\subseteq M_c$. If $M$ is maximal, $M=M_c$. ∎

Compactness is essential: in $C(\mathbb{R})$ the functions with compact support form a proper ideal (it misses $1$) contained in no $M_c$, so by Krull's theorem $C(\mathbb{R})$ has maximal ideals that are not of the form $M_c$. The ideal $\{f\in C[0,1]:f(0)=f(1)=0\}=M_0\cap M_1$ is not prime: $x\cdot(1-x)$ lies in it, but neither $x$ nor $1-x$ does.

✏️ Example 1 — Prime, maximal, or neither?
Classify each ideal as maximal, prime but not maximal, or not prime: (a) $\langle x\rangle$ and $\langle2,x\rangle$ in $\mathbb{Z}[x]$; (b) $\langle x^2+1\rangle$ in $\mathbb{R}[x]$ and in $\mathbb{C}[x]$; (c) $\langle3,x^2+1\rangle$ and $\langle5,x^2+1\rangle$ in $\mathbb{Z}[x]$; (d) $\langle x^2+1\rangle$ in $\mathbb{Z}[x]$; (e) $\mathbb{Z}\times\{0\}$ and $2\mathbb{Z}\times\mathbb{Z}$ in $\mathbb{Z}\times\mathbb{Z}$; (f) $\langle x\rangle$ and $\langle x,y\rangle$ in $\mathbb{Q}[x,y]$.
(a) $f\mapsto f(0)$ maps $\mathbb{Z}[x]$ onto $\mathbb{Z}$ with kernel $\langle x\rangle$: the quotient $\mathbb{Z}$ is a domain, not a field — prime, not maximal. $\mathbb{Z}[x]/\langle2,x\rangle\cong\mathbb{Z}_2$ (§7.1): maximal. Note $\langle x\rangle\subsetneq\langle2,x\rangle$.
(b) $\mathbb{R}[x]/\langle x^2+1\rangle\cong\mathbb{C}$, a field: maximal. In $\mathbb{C}[x]$, $(x-i)(x+i)=x^2+1\in\langle x^2+1\rangle$ but neither factor is a multiple of $x^2+1$ (degree $1$): not prime.
(c) Reducing coefficients mod $3$ gives $\mathbb{Z}[x]/\langle3\rangle\cong\mathbb{Z}_3[x]$, and by the third isomorphism theorem $\mathbb{Z}[x]/\langle3,x^2+1\rangle\cong\mathbb{Z}_3[x]/\langle x^2+1\rangle$. Over $\mathbb{Z}_3$, $x^2+1$ has no root ($0,1,2\mapsto1,2,2$), and the quotient is the field of order $9$ built in §7.1: maximal. Over $\mathbb{Z}_5$, $x^2+1=(x-2)(x+2)$, so $\mathbb{Z}_5[x]/\langle x^2+1\rangle$ has zero divisors: $\langle5,x^2+1\rangle$ is not prime ($(x-2)(x+2)=x^2-4\equiv x^2+1-5$ lies in it, while $x\pm2$ do not).
(d) $\mathbb{Z}[x]/\langle x^2+1\rangle\cong\mathbb{Z}[i]$, a domain that is not a field: prime, not maximal — it lies inside the maximal ideal $\langle3,x^2+1\rangle$ of (c).
(e) $(\mathbb{Z}\times\mathbb{Z})/(\mathbb{Z}\times\{0\})\cong\mathbb{Z}$: prime, not maximal. $(\mathbb{Z}\times\mathbb{Z})/(2\mathbb{Z}\times\mathbb{Z})\cong\mathbb{Z}_2$: maximal. (Theorem 7.23(3).)
(f) $\mathbb{Q}[x,y]/\langle x\rangle\cong\mathbb{Q}[y]$ (substitute $x=0$), a domain but not a field: prime, not maximal. $\mathbb{Q}[x,y]/\langle x,y\rangle\cong\mathbb{Q}$ (evaluate at $(0,0)$): maximal.

Divisibility in an Integral Domain

📘 Definition 7.11 — Divisors, associates, irreducible and prime elements

Let $R$ be an integral domain and $a,b\in R$.

  • $a$ divides $b$, $a\mid b$, if $b=ac$ for some $c\in R$.
  • $a$ and $b$ are associates, $a\sim b$, if $a=ub$ for some unit $u$.
  • A nonzero non-unit $p$ is irreducible if $p=ab$ implies that $a$ or $b$ is a unit (the only factorisations are trivial).
  • A nonzero non-unit $p$ is prime if $p\mid ab$ implies $p\mid a$ or $p\mid b$.
📐 Theorem 7.25 — Divisibility in the language of ideals
Let $R$ be an integral domain and $a,b,p\in R$.
  1. $a\mid b\iff\langle b\rangle\subseteq\langle a\rangle$; and $u$ is a unit $\iff\langle u\rangle=R$.
  2. $a\sim b\iff\langle a\rangle=\langle b\rangle\iff$ ($a\mid b$ and $b\mid a$).
  3. For $p\ne0$: $p$ is prime $\iff\langle p\rangle$ is a nonzero prime ideal.
  4. Every prime element is irreducible.
  5. A nonzero non-unit $p$ is irreducible $\iff$ $\langle p\rangle$ is maximal among the proper principal ideals.

Proof. (1) $b=ac$ iff $b\in\langle a\rangle$ iff $\langle b\rangle\subseteq\langle a\rangle$; and $1\in\langle u\rangle$ iff $uv=1$ for some $v$. (2) If $a=ub$ and $b=u^{-1}a$, each divides the other. Conversely, if $b=ac$ and $a=bd$, then $a=acd$; if $a=0$ then $b=0$ and $a\sim b$; otherwise cancellation gives $cd=1$, so $d$ is a unit. (3) is the definition of prime ideal written with $p\mid x\iff x\in\langle p\rangle$; $\langle p\rangle$ is proper because $p$ is not a unit. (4) Let $p$ be prime and $p=ab$. Then $p\mid ab$, so say $p\mid a$: $a=pc$. Then $p=pcb$, and cancelling $p$ gives $cb=1$, so $b$ is a unit. (5) If $\langle p\rangle\subseteq\langle a\rangle\subsetneq R$ then $p=ab$ with $a$ a non-unit; $p$ irreducible forces $b$ to be a unit, so $\langle a\rangle=\langle p\rangle$. Conversely, if $p=ab$ with neither a unit, then $\langle p\rangle\subsetneq\langle a\rangle\subsetneq R$ ($\langle p\rangle=\langle a\rangle$ would make $b$ a unit by (2)). ∎

So "prime" is an ideal-theoretic property ($\langle p\rangle$ prime) and "irreducible" is a maximality property among principal ideals. They coincide when every ideal is principal — which is why PIDs will behave so well.

📐 Theorem 7.26 — Norm criteria in $\mathbb{Z}[\sqrt d]$
In $\mathbb{Z}[\sqrt d]$ ($d$ not a square) with $N(a+b\sqrt d)=a^2-db^2$:
  1. if $\alpha\mid\beta$ then $N(\alpha)\mid N(\beta)$ in $\mathbb{Z}$; associates have $|N(\alpha)|=|N(\beta)|$;
  2. if $|N(\alpha)|$ is a prime number, then $\alpha$ is irreducible;
  3. if $\alpha$ is a nonzero non-unit and no element has norm $\pm m$ for any proper divisor $m\gt1$ of $|N(\alpha)|$, then $\alpha$ is irreducible.

Proof. (1) $\beta=\alpha\gamma$ gives $N(\beta)=N(\alpha)N(\gamma)$; if $\alpha=u\beta$ with $N(u)=\pm1$, then $|N(\alpha)|=|N(\beta)|$. (2), (3) If $\alpha=\beta\gamma$ with neither factor a unit, then $|N(\beta)|,|N(\gamma)|\ne1$ (units have norm $\pm1$, §7.1), so $|N(\beta)|$ is a proper divisor $m\gt1$ of $|N(\alpha)|$. That is impossible when $|N(\alpha)|$ is prime, or under the hypothesis of (3). ∎

The converse of (2) is false: $3$ is irreducible in $\mathbb{Z}[i]$ although $N(3)=9$ is not prime (Example 4).

✏️ Example 2 — Irreducible but not prime in $\mathbb{Z}[\sqrt{-5}]$
In $R=\mathbb{Z}[\sqrt{-5}]$ show that $2$, $3$, $1+\sqrt{-5}$ and $1-\sqrt{-5}$ are irreducible, that no two of them are associates, and that $2$ is not prime. Deduce that $\langle2\rangle$ is not a prime ideal although $2$ is irreducible.
Norms $N(a+b\sqrt{-5})=a^2+5b^2$. $N(2)=4$, $N(3)=9$, $N(1\pm\sqrt{-5})=6$. The units are $\pm1$ (§7.1).
No small norms $a^2+5b^2=2$ or $3$ has no integer solutions ($b\ne0$ gives at least $5$, and $2,3$ are not squares). So no element has norm $2$ or $3$, and by Theorem 7.26(3) all four elements are irreducible — any proper factor would have norm $2$ or $3$.
Not associates Associates have equal norms and differ by $\pm1$: $2$ and $3$ have norms $4\ne9$; $1+\sqrt{-5}$ is not $\pm(1-\sqrt{-5})$; and neither has norm $4$ or $9$.
2 is not prime $2\mid6=(1+\sqrt{-5})(1-\sqrt{-5})$. If $2\mid1+\sqrt{-5}$ then $4=N(2)\mid N(1+\sqrt{-5})=6$, which is false; similarly $2\nmid1-\sqrt{-5}$. So $2$ is irreducible but not prime, and $\langle2\rangle$ is not a prime ideal (Theorem 7.25(3)): $R/\langle2\rangle$ has the zero divisors $\overline{1\pm\sqrt{-5}}$.
Conclusion $6=2\cdot3=(1+\sqrt{-5})(1-\sqrt{-5})$ are two factorisations of $6$ into irreducibles that do not match up to order and units: $\mathbb{Z}[\sqrt{-5}]$ is not a UFD. The same argument shows that $3$ and $1\pm\sqrt{-5}$ are not prime either.

Euclidean Domains and Principal Ideal Domains

Everything good about $\mathbb{Z}$ — gcds, Bézout's identity, Euclid's lemma, unique factorisation — flows from one property: division with a remainder smaller than the divisor. We now isolate that property.

📘 Definition 7.12 — Euclidean domain
An integral domain $R$ is a Euclidean domain (ED) if there is a function $\delta:R\setminus\{0\}\to\{0,1,2,\dots\}$ (a Euclidean function) such that for all $a,b\in R$ with $b\ne0$ there are $q,r\in R$ with $$a=qb+r,\qquad r=0\ \text{ or }\ \delta(r)\lt\delta(b).$$
$\mathbb{Z}$$\delta(n)=|n|$: the division algorithm of §5.2.
Fields$\delta\equiv0$: always take $q=ab^{-1}$, $r=0$.
$F[x]$, $F$ a field$\delta(f)=\deg f$: long division, which needs the leading coefficient of $b$ to be invertible (§7.3).
$\mathbb{Z}[i]$, $\mathbb{Z}[\sqrt{-2}]$, $\mathbb{Z}[\sqrt2]$$\delta=|N|$: divide in $\mathbb{C}$ (or $\mathbb{R}$) and round (Theorem 7.27).
📐 Theorem 7.27 — The Gaussian integers form a Euclidean domain
$\mathbb{Z}[i]$ is a Euclidean domain with $\delta=N$, $N(x+yi)=x^2+y^2$. More precisely, for $a,b\in\mathbb{Z}[i]$, $b\ne0$, there are $q,r$ with $a=qb+r$ and $N(r)\le\tfrac12N(b)$. The same rounding argument shows that $\mathbb{Z}[\sqrt{-2}]$ is Euclidean for $N(x+y\sqrt{-2})=x^2+2y^2$.

Proof. Compute the exact quotient in $\mathbb{C}$: $a/b=s+ti$ with $s,t\in\mathbb{Q}$ (multiply numerator and denominator by $\bar b$). Choose integers $m,n$ nearest to $s,t$, so $|s-m|\le\tfrac12$ and $|t-n|\le\tfrac12$, and put $q=m+ni$, $r=a-qb\in\mathbb{Z}[i]$. Then $$N(r)=|a-qb|^2=|b|^2\,\left|\tfrac ab-q\right|^2=N(b)\left((s-m)^2+(t-n)^2\right)\le N(b)\left(\tfrac14+\tfrac14\right).$$ So $N(r)\le\tfrac12N(b)\lt N(b)$ whenever $r\ne0$. For $\mathbb{Z}[\sqrt{-2}]$ the same computation gives $|a/b-q|^2\le\tfrac14+2\cdot\tfrac14=\tfrac34\lt1$. ∎

For $\mathbb{Z}[\sqrt{-5}]$ the rounding error can be as large as $\tfrac14+5\cdot\tfrac14=\tfrac32\ge1$, so the argument breaks down — and we shall see that no Euclidean function can exist there, because $\mathbb{Z}[\sqrt{-5}]$ is not even a UFD. (Failure of one proof is never a proof of failure; the non-UFD argument is.)

Interactive 2 — Euclid's Algorithm in $\mathbb{Z}[i]$

Each step divides $a$ by $b$ in $\mathbb{C}$. Left: the exact quotient $a/b$ (amber) lands in some unit square of the Gaussian lattice; the nearest lattice point is the quotient $q$ (blue), and the amber point is never farther than $\tfrac{\sqrt2}{2}$ from it. Right: the remainder $r=a-qb$ (red) always lies inside the green circle of radius $|b|/\sqrt2$, so $N(r)\le\tfrac12N(b)$ and the norms shrink until the remainder is $0$. The last nonzero remainder is a gcd. Press Play to run the algorithm.

step—
a ÷ b—
quotient q—
remainder r—
N(r) / N(b)—
✏️ Example 3 — A gcd and Bézout identity in $\mathbb{Z}[i]$
Find $d=\gcd(11+3i,\ 1+8i)$ in $\mathbb{Z}[i]$ and write it as $d=x(11+3i)+y(1+8i)$ with $x,y\in\mathbb{Z}[i]$. Check the answer with norms.
Step 1 $\dfrac{11+3i}{1+8i}=\dfrac{(11+3i)(1-8i)}{65}=\dfrac{35-85i}{65}\approx0.54-1.31i$, nearest Gaussian integer $q_1=1-i$. Then $r_1=(11+3i)-(1-i)(1+8i)=(11+3i)-(9+7i)=2-4i$, with $N(r_1)=20\lt65$.
Step 2 $\dfrac{1+8i}{2-4i}=\dfrac{(1+8i)(2+4i)}{20}=\dfrac{-30+20i}{20}=-1.5+i$. The real part is a tie between $-1$ and $-2$; either choice works. Take $q_2=-1+i$: $r_2=(1+8i)-(-1+i)(2-4i)=(1+8i)-(2+6i)=-1+2i$, with $N(r_2)=5\lt20$.
Step 3 $\dfrac{2-4i}{-1+2i}=-2$ exactly, so $r_3=0$ and $d=-1+2i$ (up to units: $\pm(1-2i)$, $\pm(2+i)$).
Bézout Back-substitute: $r_1=a-(1-i)b$ and $r_2=b-(-1+i)r_1=(1-i)a+\big(1+(-1+i)(1-i)\big)b=(1-i)a+(1+2i)b$, using $(-1+i)(1-i)=2i$. Check: $(1-i)(11+3i)=14-8i$ and $(1+2i)(1+8i)=-15+10i$; the sum is $-1+2i$ ✓.
Norm check $N(11+3i)=130=2\cdot5\cdot13$ and $N(1+8i)=65=5\cdot13$; $N(d)=5$. Indeed $11+3i=(2+i)(5-i)$ and $1+8i=(2+i)(2+3i)$, and $5-i$, $2+3i$ (norms $26$ and $13$) have no common factor, since $5-i=(1-i)(3+2i)$ and $3+2i\not\sim2+3i$.
📘 Definition 7.13 — Principal ideal domain
An integral domain in which every ideal is principal ($I=\langle a\rangle$ for some $a$) is a principal ideal domain (PID).
📐 Theorem 7.28 — Every Euclidean domain is a PID
If $R$ is a Euclidean domain, every ideal $I\ne\{0\}$ equals $\langle b\rangle$ for any nonzero $b\in I$ of least $\delta(b)$. Hence $\mathbb{Z}$, $F[x]$, $\mathbb{Z}[i]$ and $\mathbb{Z}[\sqrt{-2}]$ are PIDs.

Proof. $\{0\}=\langle0\rangle$. Let $I\ne\{0\}$ and choose $b\in I\setminus\{0\}$ with $\delta(b)$ least (well-ordering of $\{0,1,2,\dots\}$). Clearly $\langle b\rangle\subseteq I$. For $a\in I$ write $a=qb+r$ with $r=0$ or $\delta(r)\lt\delta(b)$; since $r=a-qb\in I$, minimality rules out the second case, so $r=0$ and $a\in\langle b\rangle$. ∎

📐 Theorem 7.29 — Arithmetic in a PID
Let $R$ be a PID and $a,b\in R$, not both $0$.
  1. Bézout. $a,b$ have a greatest common divisor $d$ (a common divisor divisible by every common divisor), $\langle a,b\rangle=\langle d\rangle$, and $d=xa+yb$ for some $x,y\in R$.
  2. An element is irreducible if and only if it is prime.
  3. For $p\ne0$: $\langle p\rangle$ is maximal $\iff$ $p$ is irreducible. Every nonzero prime ideal is maximal.

Proof. (1) $\langle a,b\rangle=\langle d\rangle$ for some $d$. Then $a,b\in\langle d\rangle$, so $d$ is a common divisor, and $d\in\langle a,b\rangle$ gives $d=xa+yb$; any common divisor $c$ of $a,b$ divides $xa+yb=d$. (2) Primes are irreducible in every domain (Theorem 7.25(4)). Let $p$ be irreducible and $p\mid ab$ with $p\nmid a$. A common divisor of $p$ and $a$ is a divisor of $p$, hence a unit or an associate of $p$; the latter is impossible as $p\nmid a$. So $\gcd(p,a)=1$ and $1=xp+ya$ by (1). Then $b=xpb+yab$ is divisible by $p$. (3) In a PID every proper ideal is principal, so "maximal among proper principal ideals" is "maximal": Theorem 7.25(5). A nonzero prime ideal is $\langle p\rangle$ with $p$ prime, hence irreducible by (2), hence $\langle p\rangle$ is maximal. ∎

📐 Theorem 7.30 — Ideals of $F[x]$, and when $R[x]$ is a PID
  1. For a field $F$, every ideal of $F[x]$ is $\langle f\rangle$ for a unique monic $f$ (or $f=0$). The ideal $\langle f\rangle$ ($\deg f\ge1$) is maximal $\iff$ it is prime $\iff$ $f$ is irreducible over $F$; equivalently, $F[x]/\langle f\rangle$ is a field iff $f$ is irreducible. The prime ideals are $\{0\}$ and these $\langle f\rangle$.
  2. For an integral domain $R$: $R[x]$ is a PID $\iff$ $R$ is a field. In particular $\mathbb{Z}[x]$ and $F[x,y]=(F[x])[y]$ are not PIDs.

Proof. (1) $F[x]$ is Euclidean with $\delta=\deg$ (§7.3), hence a PID; dividing a generator by its leading coefficient makes it monic, and two monic generators of the same ideal are associates, i.e. differ by a nonzero constant, so they are equal. The units of $F[x]$ are the nonzero constants, so the irreducible elements are the irreducible polynomials; Theorem 7.29(2), (3) give the rest.

(2) If $R$ is a field, use (1). Conversely let $R$ be a domain that is not a field, and $a\ne0$ a non-unit of $R$. Suppose $\langle a,x\rangle=\langle d\rangle$. Then $d\mid a$, so $\deg d=0$ (degrees add in $R[x]$ because $R$ is a domain): $d\in R$. Also $d\mid x$, say $x=d\,g(x)$; comparing leading coefficients, $d$ times the leading coefficient of $g$ is $1$, so $d$ is a unit and $\langle a,x\rangle=R[x]$. Then $1=a\,f(x)+x\,h(x)$, and putting $x=0$ gives $1=a\,f(0)$: $a$ is a unit — a contradiction. So $\langle a,x\rangle$ is not principal. For $\mathbb{Z}[x]$ take $a=2$. ∎

Part (2) gives a second proof that $\mathbb{Z}[x]$ is not a PID, and the ideal $\langle2,x\rangle$ is the standard witness: it is maximal (quotient $\mathbb{Z}_2$) but needs two generators. In $\mathbb{Z}[x]$ the prime ideals are known completely: $\{0\}$; $\langle p\rangle$ for a prime number $p$; $\langle f\rangle$ for $f$ irreducible in $\mathbb{Z}[x]$ of positive degree; and the maximal ideals $\langle p,f\rangle$ where $f$ is irreducible modulo $p$. We use only the examples, not the classification.

📐 Theorem 7.31 — The primes of $\mathbb{Z}[i]$ (and Fermat's two-squares theorem)
Up to multiplication by the units $\pm1,\pm i$, the prime elements of $\mathbb{Z}[i]$ are exactly
  1. $1+i$ (with $2=-i(1+i)^2$);
  2. the rational primes $q\equiv3\pmod4$;
  3. the elements $a+bi$ with $a^2+b^2=p$ a rational prime $p\equiv1\pmod4$; each such $p$ factors as $p=(a+bi)(a-bi)$ into two non-associate primes.
In particular an odd prime $p$ is a sum of two squares if and only if $p\equiv1\pmod4$.

Proof. Elements of prime norm are irreducible (Theorem 7.26(2)), hence prime ($\mathbb{Z}[i]$ is a PID). This covers $1+i$ and the elements in (3). A prime $q\equiv3\pmod4$ is irreducible: a proper factor would have norm $q=a^2+b^2$, but squares are $0$ or $1$ modulo $4$, so $a^2+b^2\not\equiv3$.

Now let $p\equiv1\pmod4$. Then $-1$ is a quadratic residue modulo $p$ (Euler's criterion, §5.3: $(-1)^{(p-1)/2}=1$), so $p\mid m^2+1=(m+i)(m-i)$ for some integer $m$. But $p$ divides neither factor, since $\tfrac mp\pm\tfrac1p\,i\notin\mathbb{Z}[i]$. So $p$ is not prime, hence (PID) not irreducible: $p=\alpha\beta$ with non-units, and $N(\alpha)N(\beta)=p^2$ forces $N(\alpha)=p$. Writing $\alpha=a+bi$ gives $p=a^2+b^2$ and $p=\alpha\bar\alpha$. The factors are not associates: the associates of $a+bi$ are $\pm(a+bi)$, $\pm(-b+ai)$, and $a-bi$ is among them only if $a=0$, $b=0$ or $a=\pm b$, which would make $p$ a square or even.

Finally every prime $\pi$ of $\mathbb{Z}[i]$ appears in the list: $\pi\mid\pi\bar\pi=N(\pi)$, and factoring $N(\pi)$ into rational primes, the prime $\pi$ divides one of them, $p$. Then $N(\pi)\mid N(p)=p^2$. If $p=2$, $\pi\sim1+i$; if $p\equiv3\pmod4$, $p$ is itself prime in $\mathbb{Z}[i]$ and $\pi\sim p$; if $p\equiv1\pmod4$, $\pi$ is an associate of $a+bi$ or $a-bi$, by unique factorisation (Theorem 7.33 below; $\mathbb{Z}[i]$ is a PID). ∎

✏️ Example 4 — Factorisation in $\mathbb{Z}[i]$
Factor $2$, $3$, $5$, $10$, $13$ and $7+i$ into Gaussian primes. Which of the integer primes $2,3,5,7,11,13$ remain prime in $\mathbb{Z}[i]$?
$2,3,5$ $2=(1+i)(1-i)=-i(1+i)^2$ (note $1-i=-i(1+i)$, so the two factors are associates: $2$ ramifies). $3$ is prime ($3\equiv3\pmod4$; no element has norm $3$). $5=(2+i)(2-i)$, two non-associate primes of norm $5$.
$10,13$ $10=2\cdot5=-i(1+i)^2(2+i)(2-i)$. $13=4+9=(3+2i)(3-2i)$.
$7+i$ $N(7+i)=50=2\cdot5^2$, so it is a product of one associate of $1+i$ and two primes of norm $5$. Divide: $\dfrac{7+i}{1+i}=\dfrac{(7+i)(1-i)}{2}=4-3i$, and $N(4-3i)=25$. Try $\dfrac{4-3i}{2+i}=\dfrac{(4-3i)(2-i)}{5}=\dfrac{5-10i}{5}=1-2i$. So $7+i=(1+i)(2+i)(1-2i)$; here $1-2i=-i(2+i)$, so $7+i=-i(1+i)(2+i)^2$.
Which stay prime $3,7,11$ ($\equiv3\pmod4$) remain prime; $5=(2+i)(2-i)$ and $13=(3+2i)(3-2i)$ split; $2$ ramifies. This three-way behaviour — inert, split, ramified — is the prototype of how primes behave in every ring of algebraic integers.
✏️ Example 5 — The rings $\mathbb{Z}[i]/\langle p\rangle$
Identify $\mathbb{Z}[i]/\langle p\rangle$ for $p=2,3,5$. Which of the ideals $\langle2\rangle,\langle3\rangle,\langle5\rangle$ are prime or maximal, and what are the maximal ideals of $\mathbb{Z}[i]$ containing $5$?
$p=3$ $3$ is prime in the PID $\mathbb{Z}[i]$, so $\langle3\rangle$ is maximal (Theorem 7.29(3)): $\mathbb{Z}[i]/\langle3\rangle$ is a field with $N(3)=9$ elements.
$p=5$ $5=(2+i)(2-i)$ with $\langle2+i\rangle+\langle2-i\rangle\ni(2+i)+(2-i)=4$ and $\ni5$, hence $\ni1$: the ideals are comaximal. By the Chinese remainder theorem (§7.1), $\mathbb{Z}[i]/\langle5\rangle\cong\mathbb{Z}[i]/\langle2+i\rangle\times\mathbb{Z}[i]/\langle2-i\rangle\cong\mathbb{Z}_5\times\mathbb{Z}_5$. Not a domain, so $\langle5\rangle$ is not prime. A maximal ideal containing $5$ contains $(2+i)(2-i)$, hence (being prime) one of the factors; as $\langle2\pm i\rangle$ are maximal, the answer is exactly $\langle2+i\rangle$ and $\langle2-i\rangle$.
$p=2$ $\mathbb{Z}[i]/\langle2\rangle$ has $4$ elements and the nonzero nilpotent $\overline{1+i}$ (§7.1); not a domain, so $\langle2\rangle$ is not prime. The only maximal ideal containing $2$ is $\langle1+i\rangle$, with quotient $\mathbb{Z}_2$.
Pattern inert $p$: quotient a field of order $p^2$; split $p$: $\mathbb{Z}_p\times\mathbb{Z}_p$; ramified $p$: a ring with a nonzero nilpotent.
Interactive 1 — Is This Ideal Principal? Lattices in $\mathbb{Z}[\sqrt{-d}]$

Draw $x+y\sqrt{-d}$ at the point $(x,\ y\sqrt d)$, so that $N(\gamma)=x^2+dy^2$ is the squared distance from $0$. An ideal $I$ is a sublattice (red); its index $[R:I]$ (the number of cosets) is the area of its basic parallelogram. If $I=\langle\gamma\rangle$, then $[R:I]=N(\gamma)$, so a generator must lie on the circle $N=[R:I]$. Press Play to grow the circle: if no red point appears on it, the ideal is not principal. Compare $\langle2,1+\sqrt{-5}\rangle$ with $\langle2,1+i\rangle$.

index [R : I]—
circle N =—
least norm in I∖{0}—
generators found—
principal?—

Why $[R:\langle\gamma\rangle]=N(\gamma)$: the ideal $\langle\gamma\rangle$ is spanned over $\mathbb{Z}$ by $\gamma=x+y\sqrt{-d}$ and $\gamma\sqrt{-d}=-dy+x\sqrt{-d}$, whose coordinate vectors $(x,y)$, $(-dy,x)$ have determinant $x^2+dy^2$; the index of a full sublattice of $\mathbb{Z}^2$ is the absolute value of this determinant (for $d=1$ this was proved directly in §7.1). Since $\langle2,1+\sqrt{-5}\rangle$ has index $2$ and no element of $\mathbb{Z}[\sqrt{-5}]$ has norm $2$, it is not principal: $\mathbb{Z}[\sqrt{-5}]$ is not a PID. The same argument shows that $\langle2,1+\sqrt{-3}\rangle$ is not principal in $\mathbb{Z}[\sqrt{-3}]$.

Unique Factorisation Domains

📘 Definition 7.14 — Unique factorisation domain
An integral domain $R$ is a unique factorisation domain (UFD) if
  1. every nonzero non-unit $a$ is a product $a=p_1p_2\cdots p_r$ of irreducible elements, and
  2. the factorisation is unique up to order and units: if $a=p_1\cdots p_r=q_1\cdots q_s$ with all $p_i,q_j$ irreducible, then $r=s$ and, after renumbering, $p_i\sim q_i$ for every $i$.
📐 Theorem 7.32 — Irreducible versus prime
  1. In a UFD, every irreducible element is prime.
  2. Conversely, an integral domain in which every nonzero non-unit is a product of irreducibles (condition 1) and every irreducible element is prime is a UFD.

Proof. (1) Let $p$ be irreducible and $p\mid ab$, say $ab=pc$. If $a$ or $b$ is $0$ or a unit the conclusion is immediate, so factor $a=a_1\cdots a_k$, $b=b_1\cdots b_l$ and (if $c$ is not a unit) $c=c_1\cdots c_m$ into irreducibles. Then $a_1\cdots a_kb_1\cdots b_l=p\,c_1\cdots c_m$ are two factorisations of $ab$ (if $c$ is a unit, absorb it into $p$). By uniqueness $p$ is an associate of some $a_i$ or some $b_j$, so $p\mid a$ or $p\mid b$.

(2) Suppose $p_1\cdots p_r=q_1\cdots q_s$ with all factors irreducible, hence prime; induct on $r$. Since $p_1$ is prime and divides the right side, it divides some $q_j$ (induction on the number of factors); renumber so $p_1\mid q_1$. As $q_1$ is irreducible and $p_1$ is not a unit, $q_1=up_1$ with $u$ a unit. Cancelling $p_1$: $p_2\cdots p_r=(uq_2)q_3\cdots q_s$. If $r=1$, the right side is $1$, which forces $s=1$ (a product of irreducibles is not a unit). Otherwise the induction hypothesis applies to the shorter products. ∎

📐 Theorem 7.33 — Every PID is a UFD
Let $R$ be a PID. Then (a) every ascending chain of ideals $I_1\subseteq I_2\subseteq\cdots$ is eventually constant, and (b) $R$ is a UFD. Consequently $\mathbb{Z}$, $F[x]$, $\mathbb{Z}[i]$ and $\mathbb{Z}[\sqrt{-2}]$ are UFDs.

Proof. (a) The union $I=\bigcup_nI_n$ of a chain of ideals is an ideal (any two elements lie in a common $I_n$). So $I=\langle a\rangle$, and $a\in I_N$ for some $N$. Then $I\subseteq I_N\subseteq I_n\subseteq I$ for all $n\ge N$.

(b) Existence. Suppose some nonzero non-unit $a_1$ is not a product of irreducibles. Then $a_1$ is not irreducible, so $a_1=a_2b_2$ with non-units $a_2,b_2$, and at least one of them — call it $a_2$ — is again not a product of irreducibles (otherwise $a_1$ would be). As $b_2$ is not a unit, $\langle a_1\rangle\subsetneq\langle a_2\rangle$. Repeating, we get a strictly increasing chain $\langle a_1\rangle\subsetneq\langle a_2\rangle\subsetneq\langle a_3\rangle\subsetneq\cdots$, contradicting (a). Uniqueness. In a PID irreducibles are prime (Theorem 7.29(2)); apply Theorem 7.32(2). ∎

📐 Theorem 7.34 — Gauss: polynomial rings over a UFD
If $R$ is a UFD, then $R[x]$ is a UFD. Hence $\mathbb{Z}[x]$, $\mathbb{Z}[x_1,\dots,x_n]$ and $F[x_1,\dots,x_n]$ ($F$ a field) are UFDs — none of them a PID when $n\ge2$ (or, for $\mathbb{Z}[x]$, already for $n=1$).

Proof (sketch). Let $K$ be the field of fractions of $R$ (for $R=\mathbb{Z}$, $K=\mathbb{Q}$). Call $f\in R[x]$ primitive if no prime of $R$ divides all its coefficients; every nonzero $f$ is $c(f)\,f_0$ with $c(f)\in R$ (the content, a gcd of the coefficients) and $f_0$ primitive. The key input is Gauss's lemma (§7.3): a product of primitive polynomials is primitive, and consequently a primitive polynomial that factors over $K$ factors over $R$ into primitive factors of the same degrees. Existence: factor $c(f)$ in the UFD $R$, and factor $f_0$ into irreducibles of $K[x]$ (a PID, hence a UFD); Gauss's lemma lets us rescale these factors to primitive polynomials in $R[x]$ whose product is $f_0$, and primitive polynomials irreducible in $K[x]$ are irreducible in $R[x]$. Uniqueness: the primitive factors are determined up to units of $K$ by uniqueness in $K[x]$, hence up to units of $R$ (being primitive); then the contents agree up to units, and uniqueness in $R$ finishes. For $F[x_1,\dots,x_n]$ induct, using $F[x_1,\dots,x_n]=F[x_1,\dots,x_{n-1}][x_n]$. ∎

📐 Theorem 7.35 — Greatest common divisors in a UFD
In a UFD any two elements $a,b$, not both zero, have a gcd: if $a=u\prod p_i^{\alpha_i}$ and $b=v\prod p_i^{\beta_i}$ over a common list of pairwise non-associate primes ($u,v$ units, exponents $\ge0$), then $\gcd(a,b)=\prod p_i^{\min(\alpha_i,\beta_i)}$. But the gcd need not be a linear combination of $a$ and $b$: in $\mathbb{Z}[x]$, $\gcd(2,x)=1$ while $1\notin\langle2,x\rangle$.

Proof. By uniqueness, $d\mid a$ iff $d=w\prod p_i^{\delta_i}$ with $w$ a unit and $\delta_i\le\alpha_i$ (any prime factor of $d$ is a prime factor of $a$, with no larger exponent). So the common divisors are those with $\delta_i\le\min(\alpha_i,\beta_i)$, and $\prod p_i^{\min(\alpha_i,\beta_i)}$ is a common divisor divisible by all of them. In $\mathbb{Z}[x]$ the only common divisors of the irreducibles $2$ and $x$ are the units $\pm1$, and $\langle2,x\rangle\ne\mathbb{Z}[x]$ (§7.1). ∎

The four classes of domains are nested, and every inclusion is strict:

Field ⊊ ED$\mathbb{Z}$ and $\mathbb{Z}[i]$ are Euclidean but not fields.
ED ⊊ PID$\mathbb{Z}\!\left[\tfrac{1+\sqrt{-19}}{2}\right]$ is a PID with no Euclidean function at all (Motzkin, 1949). We only quote this; exam questions use it as a known fact.
PID ⊊ UFD$\mathbb{Z}[x]$ ($\langle2,x\rangle$ not principal) and $F[x,y]$ ($\langle x,y\rangle$ not principal) are UFDs by Gauss's theorem.
UFD ⊊ domain$\mathbb{Z}[\sqrt{-5}]$: $6=2\cdot3=(1+\sqrt{-5})(1-\sqrt{-5})$. Also $\mathbb{Z}[\sqrt{-3}]$, $\mathbb{Z}[2i]$, $F[x^2,x^3]$ (Example 6).
🧭 Problem-solving strategy — is $R$ an ED, a PID, a UFD?
  1. Is it a domain? Zero divisors ($\mathbb{Z}_6$, $\mathbb{Z}\times\mathbb{Z}$, $\mathbb{R}[x]/\langle x^2\rangle$) end the question: none of the classes applies.
  2. Is it a field? Then it is all of them.
  3. Polynomials: $F[x]$ is an ED. $R[x]$ with $R$ not a field is never a PID (Theorem 7.30), but it is a UFD whenever $R$ is (Theorem 7.34): $\mathbb{Z}[x]$, $\mathbb{Z}[i][x]$, $F[x,y]$.
  4. Quadratic rings $\mathbb{Z}[\sqrt d]$: to show "not a UFD", find an element with two factorisations, proving irreducibility by norms (look for norms that no element can have, e.g. $a^2+5b^2\ne2,3$). To show "Euclidean", try the rounding argument with $|N|$: it works for $d=-1,-2,2,3$.
  5. To show "not a PID" exhibit a non-principal ideal: $\langle a,x\rangle$ in $R[x]$; or an ideal whose index is not the norm of any of its elements.
  6. Quotients and subrings inherit nothing: $\mathbb{Z}[x]/\langle x^2+5\rangle\cong\mathbb{Z}[\sqrt{-5}]$ is a quotient of a UFD that is not a UFD, and $\mathbb{Z}[2i]\subset\mathbb{Z}[i]$ is a subring of an ED that is not a UFD. Identify the ring first.
✏️ Example 6 — Three more domains without unique factorisation
Show that none of the following is a UFD: (a) $\mathbb{Z}[\sqrt{-3}]$; (b) $\mathbb{Z}[2i]=\{a+2bi:a,b\in\mathbb{Z}\}$; (c) $R=\mathbb{Q}[x^2,x^3]$, the polynomials over $\mathbb{Q}$ with no $x$-term.
(a) $4=2\cdot2=(1+\sqrt{-3})(1-\sqrt{-3})$. Norms $a^2+3b^2$: $N(2)=N(1\pm\sqrt{-3})=4$, and no element has norm $2$, so all three are irreducible. The units are $\pm1$, and $2\ne\pm(1\pm\sqrt{-3})$, so the factorisations differ. Equivalently, $2$ is irreducible but not prime: $2\mid(1+\sqrt{-3})(1-\sqrt{-3})$, but $\tfrac{1\pm\sqrt{-3}}{2}\notin\mathbb{Z}[\sqrt{-3}]$.
(b) $\mathbb{Z}[2i]$ is a subring of $\mathbb{Z}[i]$ with norm $a^2+4b^2$; its units are $\pm1$ (since $i\notin\mathbb{Z}[2i]$). $4=2\cdot2=(2i)(-2i)$; $2$ and $2i$ have norm $4$, and no element has norm $2$, so both are irreducible; and $2i\ne\pm2$. Two different factorisations — although in the bigger ring $\mathbb{Z}[i]$, $2$ and $2i$ are associates.
(c) The units of $R$ are the nonzero constants. Elements of $R$ of degree $1$ do not exist, so a factorisation $x^2=fg$ in $R$ must have degrees $(0,2)$ or $(2,0)$: $x^2$ is irreducible in $R$. Similarly $x^3=fg$ needs degrees $\{0,3\}$ (a degree-$1$ factor is impossible): $x^3$ is irreducible. Then $x^6=x^2\cdot x^2\cdot x^2=x^3\cdot x^3$ — different numbers of irreducible factors.
Diagnosis In each case the ring is a "bad" subring of a good one ($\mathbb{Z}[\omega]$ with $\omega=\tfrac{-1+\sqrt{-3}}{2}$, $\mathbb{Z}[i]$, $\mathbb{Q}[x]$): an element of the big ring that is missing ($\omega$, $i$, $x$) would have repaired the factorisation.
✏️ Example 7 — Prove or disprove
(a) Every subring of a UFD is a UFD. (b) If $R$ is a PID and $P\ne0$ is a prime ideal, then $R/P$ is a field. (c) If $R[x]$ is a PID, then $R$ is a field. (d) In $\mathbb{Z}[x]$ every nonzero prime ideal is maximal. (e) A UFD in which every maximal ideal is principal is a PID. (f) In a UFD, $\gcd(a,b)=1$ implies $\langle a,b\rangle=R$.
(a) False $\mathbb{Z}[2i]\subset\mathbb{Z}[i]$ (Example 6(b)); also $\mathbb{Z}[\sqrt{-5}]\subset\mathbb{C}$, a field.
(b) True $P=\langle p\rangle$ with $p$ prime, hence irreducible, hence $\langle p\rangle$ maximal (Theorem 7.29(3)); then $R/P$ is a field.
(c) True Theorem 7.30(2) (a PID is a domain, so $R\subseteq R[x]$ is a domain). Directly: $\langle x\rangle$ is a nonzero prime ideal ($R[x]/\langle x\rangle\cong R$ is a domain), hence maximal in the PID, so $R\cong R[x]/\langle x\rangle$ is a field.
(d) False $\langle x\rangle\subsetneq\langle2,x\rangle$; and $\langle2\rangle\subsetneq\langle2,x\rangle$, with $\mathbb{Z}[x]/\langle2\rangle\cong\mathbb{Z}_2[x]$ a domain that is not a field.
(e) True Let $I\ne0$ be a proper ideal. By Krull's theorem $I\subseteq M=\langle p_1\rangle$ with $M$ maximal; $p_1$ is a prime element (Theorem 7.25(3)). Every element of $I$ is divisible by $p_1$, so $I=p_1I_1$ with $I_1=\{a/p_1:a\in I\}$, an ideal containing $I$. If $I_1=R$, then $I=\langle p_1\rangle$. Otherwise repeat with $I_1$: $I_1=p_2I_2$, and so on. Fix $a\in I\setminus\{0\}$; after $k$ steps $a/(p_1\cdots p_k)\in I_k$, so $p_1\cdots p_k\mid a$, and $k$ cannot exceed the number of prime factors of $a$. Hence some $I_k=R$, and $I=\langle p_1\cdots p_k\rangle$ is principal.
(f) False $\gcd(2,x)=1$ in the UFD $\mathbb{Z}[x]$, but $\langle2,x\rangle\ne\mathbb{Z}[x]$. (True in a PID, by Bézout.)
⚠️ Counterexamples and pitfalls
  1. Prime does not imply maximal. $\{0\}\subset\mathbb{Z}$, $\langle x\rangle\subset\mathbb{Z}[x]$, $\langle2\rangle\subset\mathbb{Z}[x]$, $\langle x\rangle\subset\mathbb{Q}[x,y]$, $\mathbb{Z}\times\{0\}\subset\mathbb{Z}\times\mathbb{Z}$. The implication holds in finite rings and for nonzero primes in a PID.
  2. The quotient test needs an identity. $4\mathbb{Z}$ is a maximal ideal of the ring $2\mathbb{Z}$, but $2\mathbb{Z}/4\mathbb{Z}$ is not a field.
  3. Irreducible does not imply prime. $2$ in $\mathbb{Z}[\sqrt{-5}]$ and in $\mathbb{Z}[\sqrt{-3}]$; $x^2$ in $\mathbb{Q}[x^2,x^3]$. Prime always implies irreducible in a domain.
  4. Integer primes need not stay prime. In $\mathbb{Z}[i]$: $5=(2+i)(2-i)$, $2=-i(1+i)^2$; only $p\equiv3\pmod4$ remain prime.
  5. The norm test is one-way. Prime norm $\Rightarrow$ irreducible, but $3\in\mathbb{Z}[i]$ is irreducible with norm $9$.
  6. Associates are not "conjugates". In $\mathbb{Z}[i]$ the associates of $3+2i$ are $\pm(3+2i)$, $\pm(-2+3i)$; neither $3-2i$ nor $2+3i$ is one.
  7. UFD does not imply PID. $\mathbb{Z}[x]$ and $F[x,y]$. And $R$ a PID does not make $R[x]$ a PID ($\mathbb{Z}[x]$); $R[x]$ is a PID only for a field $R$.
  8. PID does not imply ED. $\mathbb{Z}[\tfrac{1+\sqrt{-19}}{2}]$. Failure of the rounding argument for one $\delta$ proves nothing; another function might work.
  9. gcd is not always Bézout. In a UFD gcds exist, but $\gcd(2,x)=1$ in $\mathbb{Z}[x]$ is not a combination of $2$ and $x$.
  10. Subrings and quotients of good rings can be bad. $\mathbb{Z}[2i]\subset\mathbb{Z}[i]$; $\mathbb{Z}[x]/\langle x^2+5\rangle\cong\mathbb{Z}[\sqrt{-5}]$; $\mathbb{Z}[x]/\langle x^2\rangle$ is not even a domain.
  11. Preimages keep primes, not maximals. Under $\mathbb{Z}\hookrightarrow\mathbb{Q}$ the preimage of the maximal ideal $\{0\}$ is $\{0\}$, which is prime but not maximal.
  12. Intersections of maximal ideals are not prime. $M_0\cap M_1\subset C[0,1]$ contains $x(1-x)$ but neither $x$ nor $1-x$; likewise $6\mathbb{Z}=2\mathbb{Z}\cap3\mathbb{Z}$.
  13. Maximal ideals of $C[0,1]$ are evaluations; of $C(\mathbb{R})$, not all are. The proof uses the compactness of $[0,1]$.

Exercises

I
Prime and maximal ideals.
  • 1 Find all prime ideals and all maximal ideals of $\mathbb{Z}_{36}$ and of $\mathbb{Z}_{30}$.
  • 2 Decide whether each is prime, maximal or neither: $\langle x,3\rangle$ in $\mathbb{Z}[x]$; $\langle x^2+x+1\rangle$ in $\mathbb{Z}_2[x]$; $\langle x^2+1\rangle$ in $\mathbb{Z}_2[x]$; $\langle x^2-2\rangle$ in $\mathbb{Q}[x]$ and in $\mathbb{R}[x]$.
  • 3 Show that $\langle x-a\rangle$ is maximal in $F[x]$ for every $a\in F$, and that $\langle x-1,\ y-2\rangle$ is maximal in $\mathbb{R}[x,y]$.
  • 4 Prove that in a Boolean ring ($a^2=a$ for all $a$) every prime ideal is maximal.
  • 5 Prove directly (without Theorem 7.21) that in a finite commutative ring with $1$ every prime ideal is maximal.
  • 6 Let $\phi:\mathbb{Z}[x]\to\mathbb{Z}_7$, $f\mapsto\overline{f(3)}$. Find $\ker\phi$ and decide whether it is prime or maximal.
  • 7 In $\mathbb{Z}[\sqrt{-5}]$ show that $I=\langle2,1+\sqrt{-5}\rangle=\{a+b\sqrt{-5}:a\equiv b\pmod2\}$, and deduce that $I$ is maximal with quotient $\mathbb{Z}_2$.
  • 8 Find all maximal ideals of $\mathbb{Z}\times\mathbb{Z}$, and all prime ideals of $\mathbb{Z}_4\times\mathbb{Z}_9$.
  • 9 Show that $\{f\in C[0,1]:f(0)=f(1)=0\}$ is an ideal that is not prime, and find all maximal ideals containing it.
1 Theorem 7.23(2): $\mathbb{Z}_{36}$: $\langle2\rangle$, $\langle3\rangle$ (prime $=$ maximal). $\mathbb{Z}_{30}$: $\langle2\rangle,\langle3\rangle,\langle5\rangle$.
2 $\mathbb{Z}[x]/\langle x,3\rangle\cong\mathbb{Z}_3$: maximal. $x^2+x+1$ has no root in $\mathbb{Z}_2$ ($1$ at both points), so being of degree $2$ it is irreducible: maximal (Theorem 7.30). $x^2+1=(x+1)^2$ in $\mathbb{Z}_2[x]$: not prime. $x^2-2$ is irreducible over $\mathbb{Q}$ ($\sqrt2\notin\mathbb{Q}$): maximal in $\mathbb{Q}[x]$; over $\mathbb{R}$ it is $(x-\sqrt2)(x+\sqrt2)$: not prime.
3 Evaluation $f\mapsto f(a)$ maps $F[x]$ onto the field $F$ with kernel $\langle x-a\rangle$ (factor theorem). For $\mathbb{R}[x,y]$, $f\mapsto f(1,2)$ is onto $\mathbb{R}$; its kernel contains $x-1,y-2$, and writing $f(x,y)=f(1+(x-1),2+(y-2))$ and expanding in powers of $x-1$, $y-2$ shows every $f$ with $f(1,2)=0$ lies in $\langle x-1,y-2\rangle$. Quotient $\mathbb{R}$: maximal.
4 $R/P$ is a Boolean integral domain. In it $a(a-1)=a^2-a=0$, so every element is $0$ or $1$: $R/P\cong\mathbb{Z}_2$, a field.
5 $R/P$ is a finite integral domain. For $\bar a\ne0$ the map $\bar x\mapsto\bar a\bar x$ is injective (cancellation), hence onto, so $\bar a\bar x=\bar1$ for some $\bar x$: $R/P$ is a field.
6 $\phi$ is onto (constants). $\ker\phi=\{f:f(3)\equiv0\pmod7\}$, which contains $7$ and $x-3$; dividing by the monic $x-3$, $f=(x-3)q+f(3)$, so $\ker\phi=\langle7,x-3\rangle$. Since $\mathbb{Z}[x]/\ker\phi\cong\mathbb{Z}_7$ is a field, it is maximal.
7 A typical element $2(x+y\sqrt{-5})+(1+\sqrt{-5})(u+v\sqrt{-5})=(2x+u-5v)+(2y+u+v)\sqrt{-5}$ has $a-b=2x-2y-6v$ even. Conversely, if $a\equiv b\pmod2$ then $a+b\sqrt{-5}=b(1+\sqrt{-5})+(a-b)\in I$. So $I$ has two cosets, $I$ and $1+I$; $R/I$ is a ring with $2$ elements, i.e. $\mathbb{Z}_2$, a field.
8 $p\mathbb{Z}\times\mathbb{Z}$ and $\mathbb{Z}\times p\mathbb{Z}$, $p$ prime. For $\mathbb{Z}_4\times\mathbb{Z}_9$: $\langle2\rangle\times\mathbb{Z}_9$ and $\mathbb{Z}_4\times\langle3\rangle$ — two prime ideals, both maximal (Theorem 7.23(2), (3)).
9 It is $M_0\cap M_1$, an intersection of ideals. $x(1-x)$ lies in it, but $x\notin$ it ($x(1)=1$) and $1-x\notin$ it. A maximal ideal $M_c\supseteq M_0\cap M_1$ must contain $x(1-x)$; being prime it contains $x$ or $1-x$, so $c=0$ or $c=1$. The answer is $M_0$ and $M_1$.
II
Divisibility, norms, irreducible and prime elements.
  • 1 Show that $3$ is irreducible in $\mathbb{Z}[i]$, and deduce from the structure of $\mathbb{Z}[i]/\langle3\rangle$ that it is prime.
  • 2 In $\mathbb{Z}[\sqrt{-5}]$ show that $9=3\cdot3=(2+\sqrt{-5})(2-\sqrt{-5})$ are two factorisations into irreducibles.
  • 3 Show that $1+\sqrt{-3}$ is irreducible but not prime in $\mathbb{Z}[\sqrt{-3}]$.
  • 4 List the associates of $3+2i$ in $\mathbb{Z}[i]$. Is $2+3i$ one of them? Is $3-2i$?
  • 5 In $\mathbb{Z}[\sqrt2]$ show that $7=(3+\sqrt2)(3-\sqrt2)$ and that $3+\sqrt2$ is irreducible. Is $7$ irreducible in $\mathbb{Z}[\sqrt2]$?
  • 6 In $\mathbb{Z}[x]$, show that $2x+2$ is not irreducible while $2$ and $x+1$ are. Is $x+1$ prime in $\mathbb{Z}[x]$?
  • 7 Let $R$ be an integral domain. Show that "is an associate of" is an equivalence relation, and that $a\sim b$ iff $a\mid b$ and $b\mid a$.
  • 8 Show that $10=2\cdot5=(2+\sqrt{-6})(2-\sqrt{-6})$ in $\mathbb{Z}[\sqrt{-6}]$ and that all four factors are irreducible. Conclude that $\mathbb{Z}[\sqrt{-6}]$ is not a UFD.
1 A proper factor would have norm $3=a^2+b^2$, impossible. $\mathbb{Z}[i]/\langle3\rangle=\{a+bi:a,b\in\mathbb{Z}_3\}$ is a field of order $9$ (§7.1), in particular a domain, so $\langle3\rangle$ is a prime ideal and $3$ is prime (Theorem 7.25(3)).
2 $(2+\sqrt{-5})(2-\sqrt{-5})=4+5=9$. Norms: $N(3)=N(2\pm\sqrt{-5})=9$; a proper factor would have norm $3$, and $a^2+5b^2=3$ has no solution. Since the units are $\pm1$, $3\not\sim2\pm\sqrt{-5}$.
3 $N(1+\sqrt{-3})=4$ and no element has norm $2$ ($a^2+3b^2=2$ is impossible), so it is irreducible. It divides $(1+\sqrt{-3})(1-\sqrt{-3})=4=2\cdot2$, but not $2$: $\dfrac{2}{1+\sqrt{-3}}=\dfrac{1-\sqrt{-3}}{2}\notin\mathbb{Z}[\sqrt{-3}]$. So it is not prime.
4 $u(3+2i)$ for $u=1,-1,i,-i$: $3+2i$, $-3-2i$, $-2+3i$, $2-3i$. Neither $2+3i$ nor $3-2i$ is among them ($2+3i=i(3-2i)$ is an associate of the conjugate $3-2i$).
5 $(3+\sqrt2)(3-\sqrt2)=9-2=7$. $N(3+\sqrt2)=7$ is prime, so $3+\sqrt2$ is irreducible (Theorem 7.26(2)). $7$ is not irreducible: it is a product of two non-units ($N(3\pm\sqrt2)=7\ne\pm1$).
6 $2x+2=2\cdot(x+1)$ with neither factor a unit ($\mathbb{Z}[x]^\times=\{\pm1\}$). $2$: a factorisation $2=fg$ forces $\deg f=\deg g=0$, and then one of $f,g$ is $\pm1$. $x+1=fg$ forces one factor to be a constant $c$ dividing both coefficients $1,1$, so $c=\pm1$. $x+1$ is prime: $\mathbb{Z}[x]/\langle x+1\rangle\cong\mathbb{Z}$ (evaluate at $-1$) is a domain.
7 $a=1\cdot a$; if $a=ub$ then $b=u^{-1}a$; if $a=ub$, $b=vc$ then $a=(uv)c$. The second statement is Theorem 7.25(2).
8 $(2+\sqrt{-6})(2-\sqrt{-6})=4+6=10$. Norms $a^2+6b^2$: $N(2)=4$, $N(5)=25$, $N(2\pm\sqrt{-6})=10$. Proper factors would need norm $2$ or $5$, and $a^2+6b^2\in\{2,5\}$ has no solutions ($b=0$ gives squares; $|b|\ge1$ gives at least $6$). So all four are irreducible, and the units are $\pm1$, so the factorisations differ.
III
Euclidean domains, PIDs and the Gaussian integers.
  • 1 Use the Euclidean algorithm in $\mathbb{Z}[i]$ to find $\gcd(7+11i,\ 3+5i)$.
  • 2 Factor $13$, $65$ and $6$ into Gaussian primes.
  • 3 Which primes $p\lt30$ are sums of two squares? Write each one as such a sum.
  • 4 Prove that $\mathbb{Z}[\sqrt{-2}]$ is a Euclidean domain with $\delta(a+b\sqrt{-2})=a^2+2b^2$, and find $q,r$ when $a=5+\sqrt{-2}$, $b=1+\sqrt{-2}$.
  • 5 Show directly that $\langle3,x\rangle$ is not a principal ideal of $\mathbb{Z}[x]$.
  • 6 Show that $\langle x,y\rangle$ is not a principal ideal of $\mathbb{Q}[x,y]$.
  • 7 Let $R$ be a PID and $a$ a nonzero non-unit. Show that $R/\langle a\rangle$ is a field iff $a$ is irreducible, and deduce that $\mathbb{Q}[x]/\langle x^3-2\rangle$ is a field.
  • 8 Find a single generator of the ideal $\langle4+2i,\ 3+i\rangle$ of $\mathbb{Z}[i]$ and identify the quotient ring.
1 $\dfrac{7+11i}{3+5i}=\dfrac{(7+11i)(3-5i)}{34}=\dfrac{76-2i}{34}\approx2.24-0.06i$, so $q=2$ and $r=(7+11i)-(6+10i)=1+i$. Next $\dfrac{3+5i}{1+i}=\dfrac{(3+5i)(1-i)}{2}=4+i$ exactly. So $\gcd=1+i$ (up to units). Check: $N(7+11i)=170=2\cdot5\cdot17$ and $N(3+5i)=34=2\cdot17$, and $\gcd$ of norm $2$ is consistent.
2 $13=(3+2i)(3-2i)$; $65=5\cdot13=(2+i)(2-i)(3+2i)(3-2i)$; $6=2\cdot3=-i(1+i)^2\cdot3$.
3 $2=1+1$, $5=1+4$, $13=4+9$, $17=1+16$, $29=4+25$. The others ($3,7,11,19,23$) are $\equiv3\pmod4$ and are not sums of two squares (Theorem 7.31).
4 Divide in $\mathbb{C}$ and round each coordinate: the error $\varepsilon=s+t\sqrt{-2}$ with $|s|,|t|\le\tfrac12$ has $|\varepsilon|^2=s^2+2t^2\le\tfrac34\lt1$, so $N(r)=N(b)|\varepsilon|^2\lt N(b)$. Example: $\dfrac{5+\sqrt{-2}}{1+\sqrt{-2}}=\dfrac{(5+\sqrt{-2})(1-\sqrt{-2})}{3}=\dfrac{7-4\sqrt{-2}}{3}\approx2.33-1.33\sqrt{-2}$; take $q=2-\sqrt{-2}$. Then $qb=(2-\sqrt{-2})(1+\sqrt{-2})=4+\sqrt{-2}$ and $r=1$, with $N(r)=1\lt N(b)=3$.
5 If $\langle3,x\rangle=\langle d\rangle$, then $d\mid3$ gives $d\in\{\pm1,\pm3\}$ (degree $0$, divisor of $3$), and $d\mid x$ rules out $\pm3$ (the coefficient $1$ of $x$ is not a multiple of $3$). So $d=\pm1$ and $1=3f+xg$; at $x=0$, $1=3f(0)$, impossible in $\mathbb{Z}$.
6 If $\langle x,y\rangle=\langle d\rangle$, then $d\mid x$ and $d\mid y$; the only common divisors of $x$ and $y$ in the UFD $\mathbb{Q}[x,y]$ are nonzero constants, so $\langle x,y\rangle=\mathbb{Q}[x,y]$. But every element of $\langle x,y\rangle$ vanishes at $(0,0)$, and $1$ does not.
7 Theorem 7.29(3) and Theorem 7.20(2). $x^3-2$ has no rational root (a root $p/q$ in lowest terms would need $p\mid2$, $q\mid1$, and $\pm1,\pm2$ fail), and a reducible cubic has a linear factor, hence a root. So it is irreducible over $\mathbb{Q}$ and the quotient is a field.
8 $4+2i=-i(1+i)^2(2+i)$ and $3+i=(1+i)(2-i)$; the common prime factor is $1+i$ ($2+i\not\sim2-i$). In the PID $\mathbb{Z}[i]$ the ideal is generated by the gcd: $\langle4+2i,3+i\rangle=\langle1+i\rangle$ (Euclid: $4+2i=1\cdot(3+i)+(1+i)$, $3+i=(2-i)(1+i)$). The quotient is $\mathbb{Z}[i]/\langle1+i\rangle\cong\mathbb{Z}_2$.
IV
Unique factorisation: proofs and applications.
  • 1 Compute $\gcd(x^2-1,\ x^2+2x+1)$ in $\mathbb{Z}[x]$, and explain why $\gcd(2,x)=1$ there although $1\notin\langle2,x\rangle$.
  • 2 Prove that every nonzero prime ideal of a UFD contains a prime element.
  • 3 Show that in a UFD every irreducible element generates a prime ideal, and give an example showing that the ideal need not be maximal.
  • 4 Let $R=\mathbb{Z}+x\mathbb{Q}[x]$ (polynomials with rational coefficients and integer constant term). Show that $\langle x\rangle\subsetneq\langle x/2\rangle\subsetneq\langle x/4\rangle\subsetneq\cdots$ in $R$, and deduce that $R$ is not a UFD.
  • 5 Classify each ring as a field, ED (not a field), PID (not known to be ED), UFD (not PID), domain (not UFD) or not a domain: $\mathbb{Z}[x]$, $\mathbb{Q}[x]$, $\mathbb{Z}[i]$, $\mathbb{Z}[\sqrt{-5}]$, $\mathbb{Z}_6$, $\mathbb{Q}[x,y]$, $\mathbb{Z}[\sqrt{-3}]$, $\mathbb{R}[x]/\langle x^2+1\rangle$.
  • 6 Show that $\mathbb{Z}[x]/\langle x^2+5\rangle$ is not a UFD although $\mathbb{Z}[x]$ is.
  • 7 Prove that in a PID, $\langle a\rangle\cap\langle b\rangle=\langle\operatorname{lcm}(a,b)\rangle$ and $\langle a\rangle+\langle b\rangle=\langle\gcd(a,b)\rangle$. Illustrate with $a=x^2-1$, $b=x^2-3x+2$ in $\mathbb{Q}[x]$.
  • 8 Pythagorean triples. Using unique factorisation in $\mathbb{Z}[i]$, find all ways of writing $65$ as a sum of two squares, and from $(a+bi)^2$ produce two primitive Pythagorean triples with hypotenuse $65$.
1 $x^2-1=(x-1)(x+1)$, $x^2+2x+1=(x+1)^2$: $\gcd=x+1$ (Theorem 7.35). $2$ and $x$ are non-associate irreducibles, so their only common divisors are $\pm1$; but every element of $\langle2,x\rangle$ has even constant term. A UFD need not satisfy Bézout.
2 Take $a\in P$, $a\ne0$; $a$ is not a unit since $P\ne R$. Factor $a=p_1\cdots p_r$ into irreducibles, which are prime (Theorem 7.32). As $P$ is prime and contains the product, it contains some $p_i$.
3 Irreducible $\Rightarrow$ prime (Theorem 7.32), and $\langle p\rangle$ is then a prime ideal. In $\mathbb{Z}[x]$, $x$ is irreducible and $\langle x\rangle\subsetneq\langle2,x\rangle$ is not maximal.
4 The units of $R$ are $\pm1$: if $fg=1$ then both have degree $0$, i.e. are integers. Now $x/2^k=2\cdot x/2^{k+1}$ with $2$ a non-unit, so $\langle x/2^k\rangle\subseteq\langle x/2^{k+1}\rangle$, strictly because $x/2^{k+1}=(x/2^k)\cdot\tfrac12$ and $\tfrac12\notin R$ (a multiple $g\cdot x/2^k$ equal to $x/2^{k+1}$ forces $g=\tfrac12$). In a UFD such a chain cannot exist: each step $\langle a_k\rangle\subsetneq\langle a_{k+1}\rangle$ with $a_k=a_{k+1}\cdot(\text{non-unit})$ lowers the number of irreducible factors, which is finite. (Directly: $x$ has no factorisation into irreducibles, since $x=2^k\cdot x/2^k$ for every $k$ and any factor of positive degree can be split again.)
5 $\mathbb{Z}[x]$: UFD, not PID. $\mathbb{Q}[x]$: ED. $\mathbb{Z}[i]$: ED. $\mathbb{Z}[\sqrt{-5}]$: domain, not UFD. $\mathbb{Z}_6$: not a domain. $\mathbb{Q}[x,y]$: UFD, not PID. $\mathbb{Z}[\sqrt{-3}]$: domain, not UFD (Example 6(a)). $\mathbb{R}[x]/\langle x^2+1\rangle\cong\mathbb{C}$: field.
6 $f\mapsto f(\sqrt{-5})$ maps $\mathbb{Z}[x]$ onto $\mathbb{Z}[\sqrt{-5}]$ with kernel $\langle x^2+5\rangle$ (divide by the monic $x^2+5$), so the quotient is $\mathbb{Z}[\sqrt{-5}]$, not a UFD (Example 2).
7 $c\in\langle a\rangle\cap\langle b\rangle$ iff $c$ is a common multiple; the intersection is $\langle m\rangle$, and $m$ divides every common multiple, so $m=\operatorname{lcm}(a,b)$. The sum is Theorem 7.29(1). Example: $a=(x-1)(x+1)$, $b=(x-1)(x-2)$: $\langle a\rangle+\langle b\rangle=\langle x-1\rangle$ and $\langle a\rangle\cap\langle b\rangle=\langle(x-1)(x+1)(x-2)\rangle$.
8 $65=5\cdot13=(2+i)(2-i)(3+2i)(3-2i)$. Writing $65=\alpha\bar\alpha$ means choosing one of each conjugate pair: $(2+i)(3+2i)=4+7i$ and $(2+i)(3-2i)=8-i$ (other choices give associates or conjugates). So $65=4^2+7^2=8^2+1^2$, and these are the only ways. Squaring: $(8+i)^2=63+16i$ and $(7+4i)^2=33+56i$ give the primitive triples $(16,63,65)$ and $(33,56,65)$; check $16^2+63^2=256+3969=4225=65^2$ and $33^2+56^2=1089+3136=4225$.
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B GATE MA Which of the following ideals of $\mathbb{Z}[x]$ is maximal? (A) $\langle x\rangle$; (B) $\langle x^2+1\rangle$; (C) $\langle5,x^2+1\rangle$; (D) $\langle7,x^2+1\rangle$.

Idea Identify each quotient and use Theorem 7.20.
Options (A) quotient $\mathbb{Z}$, not a field. (B) quotient $\mathbb{Z}[i]$, not a field. (C) quotient $\mathbb{Z}_5[x]/\langle x^2+1\rangle$, and $x^2+1=(x-2)(x+2)$ over $\mathbb{Z}_5$: not even a domain. (D) quotient $\mathbb{Z}_7[x]/\langle x^2+1\rangle$; the squares mod $7$ are $0,1,2,4$, so $x^2+1$ has no root and (being quadratic) is irreducible over $\mathbb{Z}_7$: a field with $49$ elements.
Answer (D).

E2. CSIR Part B The number of ideals of $\mathbb{Z}_{72}$ that are not prime ideals is (A) $2$; (B) $9$; (C) $10$; (D) $12$.

Count $\mathbb{Z}_{72}$ has $\tau(72)=\tau(2^3\cdot3^2)=4\cdot3=12$ ideals, one for each divisor (§7.1). The prime ideals are $\langle2\rangle$ and $\langle3\rangle$ (Theorem 7.23(2)); the whole ring is not prime by definition, and $\{0\}$ is not prime as $\mathbb{Z}_{72}$ is not a domain.
Answer (C) $12-2=10$.

E3. CSIR Part B Up to associates, the number of distinct prime elements of $\mathbb{Z}[i]$ that divide $130$ is (A) $3$; (B) $4$; (C) $5$; (D) $6$.

Factor $130=2\cdot5\cdot13=-i(1+i)^2\,(2+i)(2-i)\,(3+2i)(3-2i)$. The prime $2$ contributes one Gaussian prime ($1-i\sim1+i$), while $5$ and $13$ split into two non-associate primes each (Theorem 7.31).
Answer (C): $1+i,\ 2\pm i,\ 3\pm2i$. (D) would wrongly count $1+i$ and $1-i$ separately; (A) counts rational primes.

E4. CSIR Part C Which of the following rings are unique factorisation domains? (One or more options may be correct.) (A) $\mathbb{Z}[x]$; (B) $\mathbb{Z}[\sqrt{-5}]$; (C) $\mathbb{Q}[x,y]$; (D) $\mathbb{Z}[\sqrt{-3}]$.

(A) Yes Gauss's theorem with $R=\mathbb{Z}$ (Theorem 7.34) — although it is not a PID.
(B) No $6=2\cdot3=(1+\sqrt{-5})(1-\sqrt{-5})$ (Example 2).
(C) Yes $\mathbb{Q}[x,y]=(\mathbb{Q}[x])[y]$ and $\mathbb{Q}[x]$ is a UFD (Theorem 7.34); not a PID ($\langle x,y\rangle$).
(D) No $4=2\cdot2=(1+\sqrt{-3})(1-\sqrt{-3})$ (Example 6(a)).
Answer (A) and (C).

E5. CSIR Part C Let $R$ be a principal ideal domain that is not a field. Which of the following are necessarily true? (A) Every nonzero prime ideal of $R$ is maximal. (B) $R[x]$ is a principal ideal domain. (C) $R$ is a unique factorisation domain. (D) Every subring of $R$ containing $1$ is a principal ideal domain.

(A) True Theorem 7.29(3).
(B) False $R[x]$ is a PID only when $R$ is a field (Theorem 7.30(2)); e.g. $\mathbb{Z}[x]$.
(C) True Theorem 7.33.
(D) False $R=\mathbb{Z}[i]$ is a PID, but its subring $\mathbb{Z}[2i]$ is not even a UFD (Example 6(b)).
Answer (A) and (C).

E6. CSIR Part C In the ring $R=\mathbb{Z}[\sqrt{-5}]$, which of the following are true? (A) $2$ is irreducible. (B) $2$ is prime. (C) The ideal $\langle2,1+\sqrt{-5}\rangle$ is principal. (D) $R/\langle2,1+\sqrt{-5}\rangle\cong\mathbb{Z}_2$.

(A) True No element has norm $2$ (Example 2).
(B) False $2\mid(1+\sqrt{-5})(1-\sqrt{-5})$ but divides neither factor ($4\nmid6$).
(C) False Its index is $2$ (Exercise I.7), so a generator would have norm $2$ — none exists (Interactive 1).
(D) True Exercise I.7: the quotient has two elements, so it is $\mathbb{Z}_2$; the ideal is maximal although not principal.
Answer (A) and (D).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Prime and maximal ideals. Definition 7.10 and the quotient test (Theorem 7.20) with both proofs; Theorems 7.21–7.23; Example 1 done as a class exercise, one part per row of students. Ten minutes on Theorem 7.24 ($C[0,1]$) as a showcase of compactness; mention Krull's theorem without belabouring Zorn.
  2. Divisibility and Euclidean domains. Definition 7.11 and Theorem 7.25 (the dictionary between elements and ideals); norms (Theorem 7.26) and Example 2 — let students discover that no element of $\mathbb{Z}[\sqrt{-5}]$ has norm $2$ or $3$. Theorem 7.27 with Interactive 2 projected (the pair $13$, $5+i$ shows the worst case); Example 3 on the board; Theorems 7.28–7.30.
  3. Gaussian primes and UFDs. Theorem 7.31 and Examples 4–5; Interactive 1 (start with $\langle2,1+i\rangle$, then $\langle2,1+\sqrt{-5}\rangle$). UFDs: Theorems 7.32–7.35, the hierarchy grid with its four counterexamples, the strategy box, Example 6, and Exam-corner E4–E6 to finish.

Discussion questions. (1) Why does the definition of a prime ideal exclude $R$ itself, and what would break in Theorem 7.20 if it did not? (2) In $\mathbb{Z}[i]$, $5$ splits but $3$ does not; in $\mathbb{Z}[\sqrt{-2}]$, which of $3,5,7,11$ split? Can you guess the rule? (3) The rounding argument proves that $\mathbb{Z}[i]$ is Euclidean. Where exactly does it fail for $\mathbb{Z}[\sqrt{-5}]$, and why does that failure not, by itself, prove anything?

Misconceptions to watch for. "Prime ideals are maximal"; "irreducible means prime"; "a UFD is a PID"; "a subring/quotient of a UFD is a UFD"; treating $3-2i$ as an associate of $3+2i$; forgetting that $\{0\}$ is a prime ideal of every domain; believing that $\gcd(a,b)=1$ always gives $xa+yb=1$; applying the quotient test in rings without $1$.

Suggested homework. I(1, 2, 6, 7, 9), II(1, 3, 4, 8), III(1, 3, 5, 8), IV(1, 4, 5, 8); Exam corner E1, E3, E5.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. For which square-free $d\gt0$ does the ring of integers of $\mathbb{Q}(\sqrt{-d})$ have unique factorisation — and why does Euler's polynomial $n^2+n+41$ produce primes for $n=0,1,\dots,39$?

Why it matters. Gauss conjectured in 1801 that only finitely many imaginary quadratic rings have unique factorisation. The answer — exactly nine — was found by Kurt Heegner, a German schoolteacher, in 1952; his proof was dismissed at first and accepted only after Alan Baker (UK) and Harold Stark (USA) settled the problem independently in 1966–67. The "class number" that measures the failure of unique factorisation now appears in public-key cryptography based on class groups of imaginary quadratic fields, studied as an alternative to schemes broken by quantum computers.

What to do.

  1. The ring of integers $\mathcal{O}_d$ is $\mathbb{Z}[\sqrt{-d}]$ when $d\equiv1,2\pmod4$ and $\mathbb{Z}\big[\tfrac{1+\sqrt{-d}}{2}\big]$ when $d\equiv3\pmod4$; its discriminant is $D=-4d$ or $-d$ respectively. Its class number $h(D)$ equals the number of reduced forms $ax^2+bxy+cy^2$ with $b^2-4ac=D$, $\gcd(a,b,c)=1$, $|b|\le a\le c$, and $b\ge0$ whenever $|b|=a$ or $a=c$; and $\mathcal{O}_d$ is a UFD iff $h(D)=1$.
  2. Write a short program that lists the reduced forms for a given $D$ (note $a\le\sqrt{|D|/3}$), and compute $h(D)$ for all square-free $d\le200$.
  3. Check that $h=2$ for $d=5$ and list the two forms. Relate the second form to the non-principal ideal $\langle2,1+\sqrt{-5}\rangle$ of Interactive 1.
  4. For each $d\equiv3\pmod4$ with $h=1$, test whether $n^2+n+\tfrac{d+1}{4}$ is prime for $0\le n\le\tfrac{d-7}{4}$. What do you observe for $d=163$?

Tools: Python (or a spreadsheet for small $D$); sympy.isprime.

Hand in: A table of $d$ and $h$, the list of $d$ with $h=1$, and a paragraph on the prime-producing polynomials.

Going further. Read about the Rabinowitsch criterion: for $d\equiv3\pmod4$, $h(-d)=1$ iff $n^2+n+\tfrac{d+1}{4}$ is prime for all $0\le n\le\tfrac{d-7}{4}$; and about the almost-integer $e^{\pi\sqrt{163}}$.

Instructor note: up to $200$ the students should find $h=1$ exactly for $d=1,2,3,7,11,19,43,67,163$ (the Heegner–Baker–Stark list is complete). For $d=5$ the reduced forms of discriminant $-20$ are $x^2+5y^2$ and $2x^2+2xy+3y^2$; the second takes the values $2,3,7,\dots$ — the norms of the non-principal ideals divided out, e.g. $N(\alpha)/2$ for $\alpha\in\langle2,1+\sqrt{-5}\rangle$. Euler's $n^2+n+41$ is prime for $0\le n\le39$ and fails at $n=40$ ($1681=41^2$). Remind students that for $d\equiv3\pmod4$ the ring $\mathbb{Z}[\sqrt{-d}]$ is not the full ring of integers: $\mathbb{Z}[\sqrt{-3}]$ fails unique factorisation (Example 6) while $\mathbb{Z}\big[\tfrac{1+\sqrt{-3}}{2}\big]$ is Euclidean.

🧪 Self-check quiz

0/5 correct

Q1. In a commutative ring with $1$, the quotient $R/M$ is a field exactly when $M$ is

Q2. Which ring is a principal ideal domain but not a field?

Q3. In $\mathbb{Z}[x]$, the ideal $\langle x\rangle$ is

Q4. Which element is irreducible but not prime in its ring?

Q5. Which rational prime remains prime in $\mathbb{Z}[i]$?