Skip to content

Integral Domains and Fields

In this lesson you’ll learn what an integral domain is, why zero divisors break cancellation, exactly when Zn\mathbb{Z}_n is a field, and the theorem that every finite integral domain is automatically a field.

An integral domain is a commutative ring with unity 101 \ne 0 and no zero divisors:

ab=0    a=0 or b=0ab = 0 \implies a = 0 \text{ or } b = 0

The name comes from Z\mathbb{Z}, the prototype. The condition is exactly what you assume every time you solve an equation by factoring: from (x2)(x3)=0(x-2)(x-3) = 0 you conclude x=2x = 2 or x=3x = 3, and that step is only valid in an integral domain.

In an integral domain, if a0a \ne 0 and ab=acab = ac, then b=cb = c.

Proof: abac=0ab - ac = 0, so a(bc)=0a(b - c) = 0. Since a0a \ne 0 and there are no zero divisors, bc=0b - c = 0. ∎

This is the practical payoff. Cancellation is so familiar that its failure is genuinely disorienting.

Multiplication in ℤ₆ - not an integral domain
× 0 1 2 3 4 5
0 0 0 0 0 0 0
1 0 1 2 3 4 5
2 0 2 4 0 2 4
3 0 3 0 3 0 3
4 0 4 2 0 4 2
5 0 5 4 3 2 1

Zeros appear off the top row and left column: 2 × 3 = 0 and 3 × 4 = 0. Row 2 reads 0, 2, 4, 0, 2, 4, repeating, so 2x = 2y does not force x = y.

Identity: 1. Cells holding it mark inverse pairs.

Look at row 2: it reads 0,2,4,0,2,40, 2, 4, 0, 2, 4. The value 2 appears twice, at 212 \cdot 1 and 242 \cdot 4. So 21=242 \cdot 1 = 2 \cdot 4 while 141 \ne 4: cancellation fails outright.

Compare a prime modulus.

Multiplication in ℤ₅ - a field
× 0 1 2 3 4
0 0 0 0 0 0
1 0 1 2 3 4
2 0 2 4 1 3
3 0 3 1 4 2
4 0 4 3 2 1

The only zeros sit in row 0 and column 0. Every other row is a rearrangement of 1, 2, 3, 4, so every nonzero element has an inverse.

Identity: 1. Cells holding it mark inverse pairs.

No stray zeros, and every nonzero row contains a 1. That’s a field.

A field is a commutative ring with unity in which every nonzero element has a multiplicative inverse.

Equivalently: (F,+)(F, +) is an abelian group, (F{0},×)(F \setminus \{0\}, \times) is an abelian group, and multiplication distributes over addition. Two groups sharing a set, glued by distributivity.

Every field is an integral domain. If ab=0ab = 0 with a0a \ne 0, multiply by a1a^{-1}:

b=a1(ab)=a10=0b = a^{-1}(ab) = a^{-1} \cdot 0 = 0

So no zero divisors exist. The converse fails: Z\mathbb{Z} is an integral domain and not a field, since 2 has no integer reciprocal.

Zn\mathbb{Z}_n is a field     \iff nn is prime.

Both directions are short.

If nn is composite, write n=abn = ab with 1<a,b<n1 < a, b < n. Then aa and bb are nonzero in Zn\mathbb{Z}_n but ab=n0ab = n \equiv 0. Zero divisors exist, so it isn’t even an integral domain.

If n=pn = p is prime and a≢0a \not\equiv 0, then gcd(a,p)=1\gcd(a,p) = 1, so Bézout gives integers x,yx, y with ax+py=1ax + py = 1. Reducing mod pp: ax1ax \equiv 1, so x=a1x = a^{-1}.

Because these fields are so important they get a name: Fp\mathbb{F}_p, or GF(p)GF(p) for “Galois field.”

Here’s a result with no analogue for infinite rings.

A finite integral domain is a field.

Proof: let DD be a finite integral domain and a0a \ne 0. Consider the map xaxx \mapsto ax from DD to DD. It’s injective, because ax=ayax = ay implies x=yx = y by cancellation. An injective map from a finite set to itself is surjective, so something maps to 1: there is an xx with ax=1ax = 1. ∎

So aa is invertible. Finiteness is what forces it - the same argument fails for Z\mathbb{Z}, where x2xx \mapsto 2x is injective but misses 1 because the set is infinite.

This is why the distinction between domain and field, which matters a great deal for Z\mathbb{Z} and R[x]\mathbb{R}[x], evaporates in the finite world.

The characteristic of a ring with unity is the smallest positive nn with

1+1++1n times=0\underbrace{1 + 1 + \dots + 1}_{n \text{ times}} = 0

and 00 if no such nn exists.

Z\mathbb{Z}, Q\mathbb{Q}, R\mathbb{R}, C\mathbb{C} all have characteristic 0. Zn\mathbb{Z}_n has characteristic nn.

The characteristic of an integral domain is 0 or prime. Suppose it were composite, n=abn = ab with 1<a,b<n1 < a,b < n. Then in the ring, (a1)(b1)=n1=0(a \cdot 1)(b \cdot 1) = n \cdot 1 = 0, and neither factor is 0 because nn is the smallest such value. That’s a zero divisor, contradiction. ∎

In characteristic pp, the identity (x+y)p=xp+yp(x+y)^p = x^p + y^p holds, because all the middle binomial coefficients are divisible by pp. Sometimes called the “freshman’s dream,” it’s false over R\mathbb{R} and true in characteristic pp, and it underlies a good deal of finite field theory.

Example 1: Is Z15\mathbb{Z}_{15} an integral domain?

Solution. 15=3515 = 3 \cdot 5, so 33 and 55 are nonzero in Z15\mathbb{Z}_{15} but 35=1503 \cdot 5 = 15 \equiv 0.

No. Zero divisors exist, so not a domain and certainly not a field.

The units are U(15)={1,2,4,7,8,11,13,14}U(15) = \{1,2,4,7,8,11,13,14\}, of size φ(15)=8\varphi(15) = 8, and the other six nonzero elements are zero divisors.

Example 2: Solve x2=1x^2 = 1 in Z8\mathbb{Z}_8.

Solution. Test all eight:

02=0, 12=1, 22=4, 32=1, 42=0, 52=1, 62=4, 72=10^2=0,\ 1^2=1,\ 2^2=4,\ 3^2=1,\ 4^2=0,\ 5^2=1,\ 6^2=4,\ 7^2=1

Solutions: x{1,3,5,7}x \in \{1, 3, 5, 7\} - four of them.

Over a field, x2=1x^2 = 1 factors as (x1)(x+1)=0(x-1)(x+1) = 0 and has at most two solutions. Here Z8\mathbb{Z}_8 has zero divisors, the factoring argument fails, and a quadratic gets four roots.

A polynomial of degree nn over a field has at most nn roots. That familiar fact needs the field hypothesis, and this example is what goes wrong without it.

Example 3: Find 717^{-1} in Z11\mathbb{Z}_{11}.

Solution. 1111 is prime, so the inverse exists. Look for xx with 7x1(mod11)7x \equiv 1 \pmod{11}.

71=7,72=143,73=2110,74=286,75=352,78=5617 \cdot 1 = 7, \quad 7 \cdot 2 = 14 \equiv 3, \quad 7 \cdot 3 = 21 \equiv 10, \quad 7 \cdot 4 = 28 \equiv 6, \quad 7 \cdot 5 = 35 \equiv 2, \quad 7 \cdot 8 = 56 \equiv 1 71=87^{-1} = 8

For larger moduli, use the extended Euclidean algorithm rather than trial: it finds x,yx, y with 7x+11y=17x + 11y = 1 in a handful of steps regardless of size.

Example 4: Is Z[x]\mathbb{Z}[x] an integral domain?

Solution. Commutative ✓, unity is the constant polynomial 1 ✓.

Zero divisors: if ff and gg are nonzero with leading terms amxma_mx^m and bnxnb_nx^n, then fgfg has leading term ambnxm+na_mb_nx^{m+n}. Since Z\mathbb{Z} has no zero divisors, ambn0a_mb_n \ne 0, so fg0fg \ne 0.

Yes, an integral domain. Not a field, since xx has no inverse: any fg=1fg = 1 forces degf+degg=0\deg f + \deg g = 0, so both are constants, and xx is not.

Generally, R[x]R[x] is an integral domain exactly when RR is. The degree argument above is where the hypothesis gets used.

Example 5: A finite domain must be a field.

Verify the theorem on Z7\mathbb{Z}_7 by exhibiting the inverses.

Solution. Z7\mathbb{Z}_7 is a finite integral domain, so the theorem promises a field.

11=1,21=4,31=5,41=2,51=3,61=61^{-1}=1, \quad 2^{-1}=4, \quad 3^{-1}=5, \quad 4^{-1}=2, \quad 5^{-1}=3, \quad 6^{-1}=6

Check a couple: 24=812 \cdot 4 = 8 \equiv 1 ✓, 35=1513 \cdot 5 = 15 \equiv 1 ✓.

Every nonzero element inverted, as promised.

Example 6: Characteristic of a product.

Find the characteristic of Z4×Z6\mathbb{Z}_4 \times \mathbb{Z}_6.

Solution. The unity is (1,1)(1,1). Adding it to itself nn times gives (nmod4,nmod6)(n \bmod 4, n \bmod 6), which is (0,0)(0,0) exactly when 4n4 \mid n and 6n6 \mid n.

char=lcm(4,6)=12\text{char} = \operatorname{lcm}(4,6) = 12

Since 12 is composite, this ring cannot be an integral domain - and indeed (2,0)(0,3)=(0,0)(2,0)(0,3) = (0,0) with both factors nonzero.

Example 7: The freshman’s dream.

Verify (x+y)3=x3+y3(x+y)^3 = x^3 + y^3 in Z3\mathbb{Z}_3.

Solution. Expand normally:

(x+y)3=x3+3x2y+3xy2+y3(x+y)^3 = x^3 + 3x^2y + 3xy^2 + y^3

In characteristic 3, 3=03 = 0, so both middle terms vanish:

(x+y)3=x3+y3(x+y)^3 = x^3 + y^3

Check with x=y=1x = y = 1: left side (1+1)3=23=82(1+1)^3 = 2^3 = 8 \equiv 2; right side 1+1=21 + 1 = 2 ✓.

This map xxpx \mapsto x^p is the Frobenius endomorphism, and it is the engine of finite field theory.

Cryptography. Elliptic-curve cryptography works over Fp\mathbb{F}_p for a large prime pp, and needing a field rather than just a ring is essential: the group law on the curve involves dividing by coordinate differences. Over Zn\mathbb{Z}_n with composite nn that division can fail, and the failure leaks a factor of nn - the basis of Lenstra’s elliptic-curve factoring method.

Reed–Solomon codes. QR codes, CDs, DVDs and spacecraft telemetry use codes over finite fields. Decoding solves linear systems, which requires inverting elements, which requires a field. The field is usually GF(256)GF(256), so one field element is exactly one byte.

Hash tables and pseudorandom generators. Choosing a prime modulus makes the arithmetic happen in a field, so every nonzero multiplier is invertible and no probe sequence gets trapped in a short cycle. Composite moduli create zero divisors and, with them, degenerate behaviour.

Computer algebra. Whether an algorithm applies depends on the ring type: Gaussian elimination needs a field, the Euclidean algorithm needs a Euclidean domain, factoring behaves differently over Z\mathbb{Z} and Q\mathbb{Q}. Systems like SageMath dispatch on exactly the distinctions in this lesson.

Fixed-width integer bugs. 32-bit arithmetic is Z232\mathbb{Z}_{2^{32}}, which is riddled with zero divisors. Code assuming that a * b == a * c implies b == c is assuming an integral domain it does not have, and this is a genuine source of security vulnerabilities.

For which n is ℤₙ a field?
How many solutions does x² = 1 have in ℤ₈?
What is true of every finite integral domain?
Which ring is an integral domain but NOT a field?
What can the characteristic of an integral domain be?
In ℤ₆, why can you not cancel the 2 in the equation 2x = 2y?