Congruence Modulo an Ideal and Quotient Rings

Working modulo any ideal of any ring. Congruence modulo an ideal as an equivalence relation that respects sums and products, its classes as cosets a + I, and the quotient ring R/I with its natural homomorphism, which include Z_n and F[x]/(p(x)) as special cases. A quotient of Z[x] computed by hand, a field with 25 elements beside a ring of the same size with zero divisors; prime ideals, whose quotients are integral domains, and maximal ideals, whose quotients are fields, with the prime and maximal ideals of Z, F[x], Z_n and any principal ideal domain.

In $\mathbb{Z}[x]$, the previous article studied the ideal

$$J = (2, \, x^2 + x + 1) = \{\, f(x) : x^2 + x + 1 \text{ divides } \bar f(x) \text{ in } \mathbb{Z}_2[x] \,\},$$

where $\bar f$ is $f$ with its coefficients reduced modulo 2. Call two polynomials congruent modulo $J$ when their difference lies in $J$. Since reduction respects subtraction, this happens exactly when $\bar f$ and $\bar g$ leave the same remainder on division by $x^2 + x + 1$ in $\mathbb{Z}_2[x]$. So $x^2$ is congruent to $x + 1$, and $x^3$ to 1, since $x^3 - 1 = (x - 1)(x^2 + x + 1)$. The polynomial $x^4 + 3x$ is congruent to 0: it equals $(x^2 + x + 1)(x^2 - x) + 4x$. Every polynomial is congruent to exactly one of $0, 1, x, 1 + x$. Congruent polynomials stay congruent when they are added or multiplied, because reduction and remainders respect both operations. The classes therefore form a ring with four elements, which behaves exactly like the four-element field $\mathbb{Z}_2[x]/(x^2 + x + 1)$ of Building Fields from Irreducible Polynomials. Does the same construction work for every ideal of every ring, and what decides whether the ring of classes is a field?

It does, and the ring of classes is the quotient ring $R/I$. First we show that the classes, the cosets of the ideal, can be added and multiplied, and build $R/I$, with $\mathbb{Z}_n$ and $F[x]/(p(x))$ as cases. Next we compute two quotients of $\mathbb{Z}[x]$ with 25 elements by hand: one is a field, the other has zero divisors. Finally we name the difference: the quotient is an integral domain exactly when the ideal is prime, and a field exactly when it is maximal.

This is the second article of Ideals and Quotient Rings. It covers §6.1 (congruence), the first half of §6.2 (quotient rings) and §6.3 (prime and maximal ideals) of the course text (Hungerford, 2014), with Judson (2026, §§16.3 and 16.4) as a free companion. Its proofs are those of the integers modulo $n$ and congruence-class arithmetic in $F[x]$, with "multiple of $n$" replaced by "element of $I$". Throughout, $R$ is a ring and $I$ an ideal of $R$.

Congruence modulo an ideal

Definition. For $a, b \in R$, $a$ is congruent to $b$ modulo $I$, written $a \equiv b \pmod I$, if $a - b \in I$.

With $R = \mathbb{Z}$ and $I = (n)$ this is congruence modulo $n$, and with $R = F[x]$ and $I = (p(x))$ it is congruence modulo $p(x)$.

Theorem. Congruence modulo $I$ is an equivalence relation on $R$. More precisely, write $a + I = \{a + i : i \in I\}$ for the set of elements reached from $a$ by adding an element of $I$. Then $a \equiv b \pmod I$ if and only if $a + I = b + I$.

The idea: give each element the label $a + I$. Congruence turns out to mean "same label", and "same label" is an equivalence relation, as equality always is.

Proof. Suppose $a - b = j \in I$. Each element $a + i$ of $a + I$ equals $b + (j + i)$, which lies in $b + I$ because $I$ is closed under addition. So $a + I \subseteq b + I$. Also $b - a = -j \in I$, because a subring contains the negative of each of its elements, and the same argument gives $b + I \subseteq a + I$. Conversely, suppose $a + I = b + I$. Since $0 \in I$, $a = a + 0$ lies in $a + I = b + I$, so $a = b + i$ for some $i \in I$, and $a - b \in I$.

So $a \equiv b$ means $a + I = b + I$. Equality of sets is reflexive, symmetric and transitive, and therefore so is congruence modulo $I$. $\blacksquare$

Only the subring properties of $I$ were used: it contains 0, negatives and sums. Absorption enters with the operations.

Theorem. If $a \equiv b \pmod I$ and $c \equiv d \pmod I$, then

$$a + c \equiv b + d \pmod I \qquad \text{and} \qquad ac \equiv bd \pmod I.$$

The idea: change one factor at a time. Each change is an element of $I$ times something, and absorption keeps it in $I$.

Proof. Write $a - b = i$ and $c - d = j$ with $i, j \in I$. Then $(a + c) - (b + d) = i + j \in I$. For products, add and subtract $bc$:

$$ac - bd = (a - b)c + b(c - d) = ic + bj.$$

By absorption $ic \in I$ and $bj \in I$, whatever $c$ and $b$ are, and so their sum is in $I$. $\blacksquare$

These are the course text's Theorems 6.4 and 6.5. The second proof is where a subring that is not an ideal fails. Modulo the subring $\mathbb{Z}$ of $\mathbb{Q}$, $\tfrac12 \equiv \tfrac32$. But the term $ic$ with $i = -1$ and $c = \tfrac12$ is $-\tfrac12$, not an integer, and the products $\tfrac14$ and $\tfrac34$ are not congruent. Modulo $J$, $x^2 + 1 \equiv x$ and $x^2 + x \equiv 1$, so their product is congruent to $x$. Multiplying out first gives the same answer: the script reduces $x^4 + x^3 + x^2 + x$ to $x$.

Check your understanding. Which of $0, 1, x, 1 + x$ is $x^5 + x$ congruent to modulo $J$?

To 1. Since $x^3 \equiv 1$ and $x^2 \equiv x + 1$, the theorem gives $x^5 = x^3 \cdot x^2 \equiv x + 1$, so $x^5 + x \equiv 2x + 1 \equiv 1$, because $2x \in J$. The script agrees.

Cosets

What does a single class look like? The class of $a$ under congruence modulo $I$ consists of the elements $b$ with $b - a \in I$, that is, the elements $b = a + i$ with $i \in I$. It is written

$$a + I = \{\, a + i : i \in I \,\}$$

and called the coset of $I$ containing $a$. The notation $[a]$, used for $\mathbb{Z}_n$ and $F[x]/(p(x))$, means the same thing when the ideal is clear.

Theorem. $a + I = b + I$ if and only if $a \equiv b \pmod I$, that is, if and only if $a - b \in I$. Two cosets of $I$ are either equal or disjoint, and the cosets partition $R$.

Proof. The first statement was proved with the previous theorem. So the cosets are the classes of an equivalence relation, and the classes of any equivalence relation are equal or disjoint and partition the set (Equivalence Relations and Partitions). $\blacksquare$

This is the course text's Theorem 6.6 and Corollary 6.7. In particular $a + I = 0 + I$ exactly when $a \in I$: the coset of 0 is $I$ itself, and the elements of $I$ are those that become 0. An element can be replaced by any other element of its coset; the choice of representative is free.

Examples.

  • In $\mathbb{Z}$, the cosets of $(n)$ are the congruence classes $[0], [1], \ldots, [n - 1]$; for instance $2 + (7) = \{\ldots, -5, 2, 9, 16, \ldots\}$.
  • In $\mathbb{Z}_n$, let $d$ be a positive divisor of $n$. Since $d \mid n$, the difference $[a] - [b]$ lies in $([d])$ exactly when $d \mid a - b$. So the cosets of $([d])$ are the sets of elements with the same remainder on division by $d$: there are $d$ of them, each with $n/d$ elements. In the running ring $\mathbb{Z}_{45}$, for example, $4 + (9) = \{4, 13, 22, 31, 40\}$ is one of the nine cosets of $(9) = \{0, 9, 18, 27, 36\}$.
  • In $\mathbb{Z}[x]$, the cosets of $J = (2, x^2 + x + 1)$ are the four sets $r + J$ for $r = 0, 1, x, 1 + x$. The coset $r + J$ consists of the polynomials whose reduction modulo 2 leaves the remainder $\bar r$ on division by $x^2 + x + 1$.

Check your understanding. Which of $x^2$, $x^4 + x$ and $3x + 1$ lies in the same coset of $J$ as $1 + x$?

The first and the third. Reduce modulo 2 and divide by $x^2 + x + 1$. Then $x^2$ leaves $x + 1$, and $3x + 1$ becomes $x + 1$ at once. But $x^4 + x$ leaves 0, since $x^4 \equiv x$, so it lies in $J$ itself. The script confirms all three.

The quotient ring

Do the cosets form a ring?

Definition. $R/I$ is the set of cosets of $I$ in $R$, with

$$(a + I) + (b + I) = (a + b) + I, \qquad (a + I)(b + I) = ab + I.$$

The rules say: pick a representative of each coset, combine them in $R$, and take the coset of the result. By the theorem on congruences, a different choice of representatives gives congruent results, hence the same coset. So the operations are well defined, which is the course text's Theorem 6.8. The name quotient ring is justified by the next theorem; Judson calls it the factor ring.

Theorem. $R/I$ is a ring, with zero element $0 + I = I$ and with $-(a + I) = (-a) + I$. If $R$ is commutative, so is $R/I$. If $R$ has an identity, then $1_R + I$ is an identity of $R/I$.

The idea: every equation in $R/I$ is an equation in $R$ seen through the map $a \mapsto a + I$, so the axioms of $R$ carry over.

Proof. Let $\pi: R \to R/I$ be the function $\pi(a) = a + I$. The definitions of the operations say exactly that

$$\pi(a + b) = \pi(a) + \pi(b), \qquad \pi(ab) = \pi(a)\pi(b),$$

and $\pi$ is onto, since every coset is the coset of one of its elements. Each ring axiom is an equation between expressions built with sums and products, such as $(a + I)\big((b + I) + (c + I)\big) = (a + I)(b + I) + (a + I)(c + I)$. Write every coset as $\pi$ of a representative and apply the two rules from the inside out. Each side becomes $\pi$ of the corresponding expression in $R$, here $\pi(a(b + c))$ and $\pi(ab + ac)$, and these are equal because the axiom holds in $R$. The same argument gives commutativity when $R$ is commutative. The element $\pi(0) = I$ is a zero because $\pi(a) + \pi(0) = \pi(a + 0) = \pi(a)$. Negatives are $\pi(-a)$ because $\pi(a) + \pi(-a) = \pi(0)$. And $\pi(1_R)$ is an identity because $\pi(1_R)\pi(a) = \pi(a) = \pi(a)\pi(1_R)$. $\blacksquare$

This is the course text's Theorem 6.9 and Judson's Theorem 16.3.10, and it is the argument already given for $\mathbb{Z}_n$ and for $F[x]/(p(x))$. The proof established a fact worth naming.

Theorem. The map $\pi: R \to R/I$, $\pi(a) = a + I$, is a homomorphism of $R$ onto $R/I$, and the elements it sends to 0 are exactly the elements of $I$.

This is the natural homomorphism (course text, Theorem 6.12; Judson, Theorem 16.3.11). It is the map $\mathbb{Z} \to \mathbb{Z}_n$ that reduces an integer modulo $n$, and the map $F[x] \to F[x]/(p(x))$ that takes a remainder. Its second statement says that every ideal is the set of elements some homomorphism sends to 0, which the next article turns around.

Two extreme cases: $R/R$ has a single coset and is the zero ring, in which $0 = 1$; and $R/\{0\}$ has one coset $\{a\}$ for each element $a$, so it is $R$ under new names. When $R$ has an identity and $I$ is proper, $1_R \notin I$, so $1_R + I \neq 0 + I$ and the quotient has $1 \neq 0$.

Check your understanding. In $\mathbb{Z}[x]/J$, the coset $x + J$ is nonzero. Does it have an inverse, and if so, which of $0, 1, x, 1 + x$ represents it?

Yes, $(1 + x) + J$. Since $x^2 \equiv x + 1$, the product $x(1 + x) = x^2 + x$ is congruent to $2x + 1 \equiv 1$. Equivalently, $x^3 \equiv 1$, so the inverse of $x$ is $x^2 \equiv 1 + x$.

The earlier constructions

The notation $\mathbb{Z}/(n)$, read "$\mathbb{Z}$ modulo $n$", names the ring $\mathbb{Z}_n$: same cosets, same operations. The ring $F[x]/(p(x))$ of Congruence-Class Arithmetic in Polynomial Rings is the quotient of $F[x]$ by the principal ideal $(p(x))$. The parentheses in its name, introduced there as shorthand for "the multiples of $p(x)$", now have their official meaning. What the earlier units knew and the general construction does not is a convenient set of representatives: the remainders $0, \ldots, n - 1$, or the polynomials of degree less than $\deg p$. In a general quotient, finding good representatives is part of the work.

A quotient computed by hand

How much work is it? The ring $\mathbb{Z}[x]/(5, \, x^2 - 3)$ combines the two earlier constructions: the coefficients are reduced modulo 5, and $x^2$ is replaced by 3. Write $I = (5, x^2 - 3)$.

Representatives. Every polynomial is congruent modulo $I$ to exactly one polynomial $a + bx$ with $a, b \in \{0, 1, 2, 3, 4\}$.

The idea: divide by $x^2 - 3$, then reduce coefficients modulo 5. Uniqueness holds because modulo 5 every element of $I$ becomes a multiple of $x^2 - 3$.

Proof. Existence. Divide $f(x)$ by the monic polynomial $x^2 - 3$ in $\mathbb{Z}[x]$: $f = (x^2 - 3)q + (c + dx)$ with integers $c$ and $d$. The term $(x^2 - 3)q$ lies in $I$. Replacing $c$ and $d$ by their remainders $a$ and $b$ modulo 5 changes $c + dx$ by $5(\cdot)$, which also lies in $I$.

Uniqueness. Suppose two representatives $a + bx$ and $a' + b'x$ in the allowed range are congruent. Their difference $c + dx$ lies in $I$, with $c = a - a'$ and $d = b - b'$ between $-4$ and 4. It suffices to show that every element $c + dx$ of $I$ with integer $c, d$ has $5 \mid c$ and $5 \mid d$, for then $c = d = 0$. Elements of $I$ have the form $5g + (x^2 - 3)h$. Reducing all coefficients modulo 5 respects sums and products (reduction modulo a prime). So it sends $5g + (x^2 - 3)h$ to $(x^2 - 3)\bar h$, a multiple of $x^2 - 3$ in $\mathbb{Z}_5[x]$. A nonzero multiple of $x^2 - 3$ has degree at least 2, because degrees add in $\mathbb{Z}_5[x]$. So the reduction $\bar c + \bar d x$ of $c + dx$, of degree at most 1, is zero, which means 5 divides $c$ and $d$. $\blacksquare$

So the quotient has $5^2 = 25$ elements. To reduce a polynomial, reduce its coefficients and use $x^2 \equiv 3$, $x^3 \equiv 3x$. The script reduces $7x^3 + 6x^2 - 9$ to $2x^3 + x^2 + 1$ and then to $6x + 3 + 1 \equiv x + 4$. Products of representatives follow one rule,

$$(a + bx)(c + dx) = ac + (ad + bc)x + bd\,x^2 \equiv (ac + 3bd) + (ad + bc)x,$$

with the coefficients taken modulo 5. For example $(1 + x)(2 + x) = 2 + 3x + x^2 \equiv 5 + 3x \equiv 3x$, and $(1 + x)(2 + 3x) = 2 + 5x + 3x^2 \equiv 11 + 5x \equiv 1$.

Every nonzero element is a unit. The last product says that $1 + x$ has inverse $2 + 3x$. In general, as when rationalizing a denominator, multiply by $a - bx$ to get a constant: $(a + bx)(a - bx) = a^2 - b^2x^2 \equiv a^2 - 3b^2$. Suppose $a^2 - 3b^2 \equiv 0 \pmod 5$ with $(a, b) \neq (0, 0)$. Then $b \not\equiv 0$ (otherwise $a^2 \equiv 0$ and $a \equiv 0$), and $(ab^{-1})^2 \equiv 3$ in $\mathbb{Z}_5$. But the squares in $\mathbb{Z}_5$ are 0, 1 and 4. So $a^2 - 3b^2$ is a nonzero element of the field $\mathbb{Z}_5$, and

$$(a + bx)^{-1} = (a^2 - 3b^2)^{-1}(a - bx).$$

For $1 + x$, $a^2 - 3b^2 = -2 \equiv 3$, whose inverse modulo 5 is 2, giving $2(1 - x) = 2 - 2x \equiv 2 + 3x$. For $2 + x$, $4 - 3 = 1$, so the inverse is $2 - x \equiv 2 + 4x$. The script confirms that all 24 nonzero elements are units and that the inverse of $2 + x$ is $2 + 4x$.

The quotient is a field with 25 elements in which $x$ is a square root of 3. It is the same idea as $\mathbb{Q}(\sqrt 2)$ and as the nine-element field of Building Fields from Irreducible Polynomials, here reached in one step from the integers. Its 24 nonzero elements include eight whose powers run through all of them. The script finds the orders of the units: 1, 2, 3, 4, 6, 8, 12 and 24. In particular $1 + x$ has order 24, $x$ has order 8 and $2 + x$ has order 3.

Check your understanding. Predict the inverse of $x$ in $\mathbb{Z}[x]/(5, x^2 - 3)$ from the formula, then check it.

With $a = 0$ and $b = 1$, $a^2 - 3b^2 = -3 \equiv 2$, whose inverse is 3, so $x^{-1} = -3x \equiv 2x$. Check: $x \cdot 2x = 2x^2 \equiv 6 \equiv 1$, as the script confirms.

The same construction with $x^2 - 4$. Replace 3 by 4, which is a square modulo 5. The ring $\mathbb{Z}[x]/(5, x^2 - 4)$ again has the 25 representatives $a + bx$, by the same proof, and products obey the rule with $4bd$ in place of $3bd$. Now

$$(x - 2)(x + 2) = x^2 - 4 \equiv 0,$$

while neither $x - 2$ nor $x + 2$ is congruent to 0. The script counts 16 units and 8 zero divisors among the 24 nonzero elements. It also finds four solutions of $y^2 = 4$, namely $2, 3, x$ and $4x$. A quadratic equation with four roots can happen only in a ring that is not an integral domain (a polynomial over a field has at most as many roots as its degree). The difference between the two quotients lies entirely in the ideals, and the next two sections name it.

Prime ideals

The second quotient is not an integral domain because a product landed in the ideal while neither factor did.

Definition. An ideal $P$ of a commutative ring $R$ is prime if $P \neq R$ and, whenever $ab \in P$, then $a \in P$ or $b \in P$.

Theorem. Let $R$ be a commutative ring with identity and $P$ an ideal of $R$. Then $P$ is a prime ideal if and only if $R/P$ is an integral domain.

The idea: "a coset is zero" means "a representative lies in $P$", so the definition of a prime ideal is the absence of zero divisors, read through cosets.

Proof. $R/P$ is commutative with identity $1 + P$, and $1 + P \neq 0 + P$ exactly when $1 \notin P$, that is, when $P \neq R$. It remains to match the other condition. The product $(a + P)(b + P) = ab + P$ is zero exactly when $ab \in P$, and a coset $a + P$ is zero exactly when $a \in P$. So "$ab \in P$ implies $a \in P$ or $b \in P$" says, word for word, "$(a + P)(b + P) = 0$ implies $a + P = 0$ or $b + P = 0$". That is the absence of zero divisors. $\blacksquare$

This is the course text's Theorem 6.14 and Judson's Proposition 16.4.4. The definition copies Euclid's lemma. With $P = (p)$ in $\mathbb{Z}$, "$ab \in (p)$ implies $a \in (p)$ or $b \in (p)$" is "$p \mid ab$ implies $p \mid a$ or $p \mid b$". More generally, in an integral domain a nonzero nonunit $p$ is a prime element exactly when $(p)$ is a prime ideal.

Examples.

  • In $\mathbb{Z}$ the prime ideals are $(0)$ and $(p)$ for the primes $p$. For $n \ge 2$, $\mathbb{Z}/(n) = \mathbb{Z}_n$ is an integral domain exactly when $n$ is prime (Units and Zero Divisors in the Integers Modulo n); $\mathbb{Z}/(1)$ is the zero ring, and $\mathbb{Z}/(0)$ is a copy of $\mathbb{Z}$. Since every ideal is $(n)$ for some $n \ge 0$, that is the complete list.
  • In any integral domain $D$, the zero ideal is prime, since $D/(0)$ is a copy of $D$.
  • $(5, x^2 - 4)$ is not a prime ideal of $\mathbb{Z}[x]$: it contains $(x - 2)(x + 2)$ but neither factor. The quotient's zero divisors say the same thing.
  • In $\mathbb{Z}_{45}$, $(15) = \{0, 15, 30\}$ is not prime, since $3 \cdot 5 = 15$ lies in it and neither 3 nor 5 does.

Check your understanding. Is $(3, x^2 + x + 1)$ a prime ideal of $\mathbb{Z}[x]$? Look for a square.

No. $(x - 1)^2 = (x^2 + x + 1) - 3x$ lies in the ideal, but $x - 1$ does not: the representatives argument above, with 3 for 5 and $x^2 + x + 1$ for $x^2 - 3$, shows that an element $c + dx$ of the ideal has $3 \mid c$ and $3 \mid d$. The quotient even has nonzero elements with square 0; the script finds $x + 2$ and $2x + 1$.

Maximal ideals

When is the quotient a field? It depends on how the ideal sits among the others.

Definition. An ideal $M$ of a ring $R$ is maximal if $M \neq R$ and the only ideals containing $M$ are $M$ and $R$.

In the figure of the ideals of $\mathbb{Z}_{45}$, the maximal ideals are $(3)$ and $(5)$, the two ideals directly below the top.

Theorem. Let $R$ be a commutative ring with identity and $M$ an ideal of $R$. Then $M$ is a maximal ideal if and only if $R/M$ is a field.

The idea: an element $a$ outside $M$ generates, together with $M$, an ideal containing 1. Writing $1 = m + ra$ exhibits the inverse $r + M$ of $a + M$.

Proof. Suppose $M$ is maximal. Then $M \neq R$, so $R/M$ is a commutative ring with $1 + M \neq 0 + M$. Let $a + M$ be a nonzero coset, so $a \notin M$. Consider

$$K = \{\, m + ra : m \in M, \; r \in R \,\}.$$

It is an ideal: it contains $0 = 0 + 0a$; the difference $(m + ra) - (m' + r'a) = (m - m') + (r - r')a$ is in $K$; and $t(m + ra) = tm + (tr)a$ is in $K$ because $tm \in M$. It contains $M$ (take $r = 0$) and $a$ (take $m = 0$, $r = 1$), so it is strictly larger than $M$. By maximality $K = R$, so $1 = m + ra$ for some $m \in M$ and $r \in R$. Then $1 - ra = m \in M$, which says $(r + M)(a + M) = ra + M = 1 + M$. So every nonzero coset is a unit, and $R/M$ is a field.

Conversely, suppose $R/M$ is a field. Then $1 + M \neq 0 + M$, so $1 \notin M$ and $M \neq R$. Let $K$ be an ideal with $M \subsetneq K$, and choose $a \in K$ with $a \notin M$. The coset $a + M$ is nonzero, so it has an inverse $b + M$: $ab + M = 1 + M$, that is, $1 - ab \in M$. Now $1 - ab \in M \subseteq K$ and $ab \in K$ by absorption, so $1 = (1 - ab) + ab \in K$, and $K = R$. So $M$ is maximal. $\blacksquare$

This is the course text's Theorem 6.15 and Judson's Theorem 16.4.1. In the field with 25 elements, take $a = 1 + x$. The proof's equation $1 = m + ra$ holds with $r = 2 + 3x$ and $m = 1 - (1 + x)(2 + 3x) = -3x^2 - 5x - 1$, which the script writes as $-3(x^2 - 3) - 5(x + 2)$, an element of $(5, x^2 - 3)$. Since every field is an integral domain, the theorem has an immediate consequence.

Corollary. In a commutative ring with identity, every maximal ideal is prime.

This is the course text's Corollary 6.16. The converse fails: in $\mathbb{Z}$, the zero ideal is prime but not maximal, since $(0) \subsetneq (2) \subsetneq \mathbb{Z}$, matching the fact that $\mathbb{Z}$ is an integral domain but not a field.

The maximal ideals of $\mathbb{Z}$ and $F[x]$

Corollary. An ideal $(n)$ of $\mathbb{Z}$ with $n \ge 0$ is maximal if and only if $n$ is prime. If $F$ is a field, an ideal $(p(x))$ of $F[x]$ is maximal if and only if $p(x)$ is irreducible.

Proof. Both quotients were classified in earlier units. $\mathbb{Z}/(n) = \mathbb{Z}_n$ is a field exactly when $n$ is prime (Units and Zero Divisors in the Integers Modulo n), and $\mathbb{Z}/(0)$, a copy of $\mathbb{Z}$, is not a field. The quotient $F[x]/(p(x))$ is a field exactly when $p(x)$ is irreducible (Building Fields from Irreducible Polynomials). For $p = 0$ the quotient is a copy of $F[x]$, which is not a field, and for a nonzero constant $p$ the ideal is all of $F[x]$, which is not maximal by definition. $\blacksquare$

So the theorem that built finite fields, "$F[x]/(p(x))$ is a field exactly when $p(x)$ is irreducible", is a case of the theorem on maximal ideals, as the article on building fields anticipated. The construction of fields from irreducible polynomials is the construction $R/M$ for a maximal ideal $M$. The ring $\mathbb{Z}[x]/(5, x^2 - 3)$ above is a field, so $(5, x^2 - 3)$ is a maximal ideal of $\mathbb{Z}[x]$. It is not principal, by the count of leftovers used for $J$ in the previous article: every polynomial is congruent to one of 25 representatives, while a principal ideal other than $\mathbb{Z}[x]$ leaves infinitely many polynomials pairwise incongruent. So maximal ideals of $\mathbb{Z}[x]$ need not have the form $(p)$ or $(p(x))$.

Check your understanding. Which of the ideals $(5, x^2 - c)$ of $\mathbb{Z}[x]$, for $c = 1, 2, 3, 4$, are maximal?

Those with $c = 2$ and $c = 3$. The argument for $c = 3$ used only that 3 is not a square modulo 5, and neither is 2. The squares $c = 1$ and $c = 4$ give the zero divisors $(x - 1)(x + 1)$ and $(x - 2)(x + 2)$. The script counts 24 units for $c = 2, 3$ and 16 for $c = 1, 4$.

Principal ideal domains

In $\mathbb{Z}$ and in $F[x]$, the prime ideals other than $(0)$ turned out to be maximal. That is a property of every principal ideal domain.

Proposition. In a principal ideal domain, every nonzero prime ideal is maximal.

The idea: a larger ideal $(a)$ has $a \mid p$, and primeness leaves only $(a) = (p)$ or $a$ a unit.

Proof. Let $D$ be a principal ideal domain and $P = (p)$ a nonzero prime ideal, so $p \neq 0$. Let $K$ be an ideal with $P \subseteq K$; it is principal, $K = (a)$. Since $p \in (a)$, $p = ab$ for some $b$. Then $ab \in P$, so $a \in P$ or $b \in P$. If $a \in P$, then $K = (a) \subseteq P$, so $K = P$. If $b \in P$, write $b = pc$; then $p = apc$, and canceling $p \neq 0$ in the integral domain gives $ac = 1$, so $a$ is a unit and $K = D$. Since $P$ is prime it is proper, so $P$ is maximal. $\blacksquare$

In $\mathbb{Z}$, an ideal $(a)$ containing 7 has $a = \pm 1$ or $\pm 7$, so it is $\mathbb{Z}$ or $(7)$. In rings that are not principal ideal domains, prime ideals can sit strictly inside other proper ideals. The next article shows that $\mathbb{Z}[x]/(x^2 + 1)$ is the ring of Gaussian integers, an integral domain but not a field. So $(x^2 + 1)$ is a nonzero prime ideal of $\mathbb{Z}[x]$ that is not maximal; it lies inside the maximal ideal $(7, x^2 + 1)$.

Finite rings

Proposition. In a finite commutative ring with identity, every prime ideal is maximal.

Proof. If $P$ is prime, $R/P$ is an integral domain, and it is finite because it has at most as many elements as $R$. Every finite integral domain is a field, so $P$ is maximal. $\blacksquare$

The list of ideals of $\mathbb{Z}_n$ decides which of them are maximal. For positive divisors $d$ and $e$ of $n$, $([e]) \subseteq ([d])$ exactly when $d \mid e$. Indeed, if $[e] \in ([d])$ then $e \equiv kd \pmod n$ for some $k$, and since $d \mid n$, $d \mid e$; the converse is clear. So the ideals containing $([d])$ are the $([e])$ with $e \mid d$. The ideal $([d])$ is proper when $d \neq 1$, and then it is maximal exactly when 1 and $d$ are the only positive divisors of $d$, that is, when $d$ is a prime. Since $\mathbb{Z}_n$ is finite, the proposition says these are also its only prime ideals. For the running ring $\mathbb{Z}_{45}$ they are $(3)$ and $(5)$, and the script confirms that among the quotients by the six ideals, only those by $(3)$ and $(5)$, with 3 and 5 cosets, are integral domains.

Ideals of a quotient

Why did the ideals of $\mathbb{Z}_{45} = \mathbb{Z}/(45)$ match the ideals of $\mathbb{Z}$ that contain $(45)$, divisor for divisor? This is an instance of the correspondence theorem. For an ideal $I$ of $R$, the map $K \mapsto K/I = \{a + I : a \in K\}$ is a one-to-one correspondence between the ideals of $R$ that contain $I$ and the ideals of $R/I$, and it preserves inclusion (Judson, 2026, Theorem 16.3.15). Under it, maximal ideals correspond to maximal ideals. That is another way to see that the maximal ideals of $\mathbb{Z}_{45}$ come from the primes 3 and 5 dividing 45. The theorem is not proved here; it is the ring version of a statement about subgroups proved later in the course.

Summary

Ideal $I$ of $R$ $R/I$ prime? maximal?
$(p)$ in $\mathbb{Z}$, $p$ prime $\mathbb{Z}_p$, a field yes yes
$(0)$ in $\mathbb{Z}$ a copy of $\mathbb{Z}$ yes no
$(n)$ in $\mathbb{Z}$, $n$ composite $\mathbb{Z}_n$, with zero divisors no no
$(p(x))$ in $F[x]$, $p$ irreducible a field yes yes
$(2, x^2 + x + 1)$ in $\mathbb{Z}[x]$ four cosets, like the field $\mathbb{Z}_2[x]/(x^2 + x + 1)$ yes yes
$(5, x^2 - 3)$ in $\mathbb{Z}[x]$ a field with 25 elements yes yes
$(5, x^2 - 4)$ in $\mathbb{Z}[x]$ 25 elements, 8 zero divisors no no
$(3)$ and $(5)$ in $\mathbb{Z}_{45}$ $\mathbb{Z}_{45}/(3)$, $\mathbb{Z}_{45}/(5)$, fields yes yes

That the quotient by $(2, x^2 + x + 1)$ is a copy of the four-element field, claimed informally in the opening, and that $\mathbb{Z}_{45}/(d)$ is a copy of $\mathbb{Z}_d$ are proved in Kernels and the First Isomorphism Theorem for Rings.

Where it leads

  • Groups have the same construction: the cosets of a normal subgroup form a quotient group, and normality plays the part that absorption plays here. The equal sizes of cosets lead to Lagrange's theorem.
  • Fields built as $R/M$ for a maximal ideal $M$ include every finite field and every field obtained by adjoining a root of an irreducible polynomial (Building Fields from Irreducible Polynomials).

What we have learned

Absorption is exactly what makes congruence modulo an ideal respect products. The cosets $a + I$ form the quotient ring $R/I$, and the natural homomorphism sends exactly $I$ to 0. The quotient is an integral domain exactly when $I$ is prime and a field exactly when $I$ is maximal: $(5, x^2 - 3)$ gives a field with 25 elements, $(5, x^2 - 4)$ zero divisors.

One step stayed informal. The cosets of $J = (2, x^2 + x + 1)$ "behave like" the four-element field because reduction modulo 2 followed by the remainder on division by $x^2 + x + 1$ sends exactly $J$ to 0. Is every quotient recognized this way? The next article, Kernels and the First Isomorphism Theorem for Rings, proves that it is, and identifies $\mathbb{Z}[x]/J$ with $\mathbb{Z}_2[x]/(x^2 + x + 1)$ and $\mathbb{Z}[x]/(x^2 + 1)$ with $\mathbb{Z}[i]$.

References

  • Hungerford, T. W. (2014). Abstract Algebra: An Introduction (3rd ed.), §§6.1 to 6.3. Brooks/Cole, Cengage Learning. The course text: congruence modulo an ideal is an equivalence relation (Theorem 6.4) compatible with sums and products (Theorem 6.5); cosets (Theorem 6.6, Corollary 6.7); well-defined coset operations (Theorem 6.8) and the quotient ring (Theorem 6.9); the natural homomorphism (Theorem 6.12); prime ideals and integral domains (Theorem 6.14), maximal ideals and fields (Theorem 6.15), maximal ideals are prime (Corollary 6.16). record · 44 pages
  • Judson, T. W. (2026). Abstract Algebra: Theory and Applications (annual edition, August 2026). Free online at judsonbooks.org. §16.3: the quotient or factor ring (Theorem 16.3.10), the natural homomorphism (Theorem 16.3.11), the correspondence theorem (Theorem 16.3.15); §16.4: maximal ideals and fields (Theorem 16.4.1), prime ideals and integral domains (Proposition 16.4.4), the prime ideals of $\mathbb{Z}$ (Example 16.4.5), maximal ideals are prime (Corollary 16.4.6). record · 44 pages