MathLabs

Algebra

Rings and fields

Algebraic structures with two operations, addition and multiplication, generalizing the integers and rationals.

IntuitionWhen you can add, subtract, and multiply — and when you can also divide

In the integers Z\mathbb{Z}, you can add, subtract, and multiply without ever leaving Z\mathbb{Z}, and multiplication distributes over addition via a(b+c)=ab+aca(b + c) = ab + ac — that two-operation package is what algebraists call a ring. Division, however, fails in Z\mathbb{Z}: 1/21/2 is not an integer. Moving to the rationals Q\mathbb{Q} (or to clock arithmetic Z/pZ\mathbb{Z}/p\mathbb{Z} modulo a prime pp) restores division by every nonzero element via a⋅a−1=1a \cdot a^{-1} = 1, turning the ring into a field.

Interactive unit circle illustrating cyclic rotation of residues.
In the ring Z/9Z\mathbb{Z}/9\mathbb{Z} (m=9m=9), multiplying by a=3a=3 sends 33 and 66 to 00 (zero divisors!), whereas when mm is prime every nonzero aa is invertible and Z/mZ\mathbb{Z}/m\mathbb{Z} is a field.

SchoolAxioms of rings, integral domains, and fields

Definition: Ring, integral domain, and field

A ring (R,+,⋅)(R,+ ,\cdot) is a set where (R,+)(R,+) is an abelian group (with zero element 00 and negatives −a-a), multiplication ⋅\cdot is associative with identity 11, and multiplication distributes over addition: a(b+c)=ab+aca(b + c) = ab + ac and (a+b)c=ac+bc(a+b)c = ac + bc. A commutative ring (ab=baab=ba) with 1≠01 \neq 0 is an integral domain if it has no zero divisors (ab=0  ⟹  a=0ab=0 \implies a=0 or b=0b=0), and is a field if every a≠0a \neq 0 has a multiplicative inverse a−1a^{-1} satisfying a⋅a−1=1a \cdot a^{-1} = 1.

a(b+c)=ab+ac,(a+b)c=ac+bca(b + c) = ab + ac, \qquad (a + b)c = ac + bc

Inside any commutative ring RR, an ideal I⊆RI \subseteq R is a subgroup under addition that absorbs multiplication by arbitrary ring elements (r∈R,x∈I  ⟹  rx∈Ir \in R, x \in I \implies rx \in I). Quotienting by the principal ideal nZn\mathbb{Z} inside Z\mathbb{Z} produces the residue ring Z/nZ\mathbb{Z}/n\mathbb{Z}, whose arithmetic is ordinary addition and multiplication modulo nn.

Z/nZ={0ˉ,1ˉ,…,n−1‾},aˉ bˉ=ab mod n‾\mathbb{Z}/n\mathbb{Z} = \{\bar{0}, \bar{1}, \dots, \overline{n-1}\}, \qquad \bar{a}\,\bar{b} = \overline{ab \bmod n}
Comparison of standard rings and fields
StructureKey multiplicative property
Integers Z\mathbb{Z}Integral domain, not a field: only ±1\pm 1 have multiplicative inverses
Rationals Q\mathbb{Q}, reals R\mathbb{R}, complexes C\mathbb{C}Infinite fields: every nonzero element has an inverse
Z/nZ\mathbb{Z}/n\mathbb{Z} with nn composite (e.g. n=6n=6)Commutative ring with zero divisors (2ˉ⋅3ˉ=0ˉ\bar{2}\cdot\bar{3}=\bar{0} in Z/6Z\mathbb{Z}/6\mathbb{Z}); not a field
Z/pZ\mathbb{Z}/p\mathbb{Z} with pp primeFinite field of pp elements: every aˉ≠0ˉ\bar{a} \neq \bar{0} is invertible

UndergraduateWhen a ring becomes a field

If DD is a finite integral domain, then every nonzero element of DD has a multiplicative inverse, so DD is a field.

Why is it true?

On a finite set, a map that never sends two different inputs to the same output is forced by the pigeonhole principle to hit every possible output — including 11.

Proof

Let a∈Da \in D be any nonzero element, and consider the left-multiplication map La:D→DL_a : D \to D defined by La(x)=axL_a(x) = ax.

We first show LaL_a is injective. Suppose La(x)=La(y)L_a(x) = L_a(y), so ax=ayax = ay, i.e. a(x−y)=0a(x - y) = 0. Since DD is an integral domain and a≠0a \neq 0, there are no zero divisors, which forces x−y=0x - y = 0 and hence x=yx = y.

Because DD is a finite set, any injective map D→DD \to D is automatically surjective (by the pigeonhole principle: ∣La(D)∣=∣D∣|L_a(D)| = |D|). In particular, the multiplicative identity 1∈D1 \in D must lie in the image of LaL_a, so there exists b∈Db \in D with La(b)=ab=1L_a(b) = ab = 1. Thus b=a−1b = a^{-1}, and since a≠0a \neq 0 was arbitrary, DD is a field.

For an integer p≥2p \ge 2, the residue ring Z/pZ\mathbb{Z}/p\mathbb{Z} is a field if and only if pp is a prime number.

Why is it true?

When pp is prime, no nonzero number smaller than pp shares a factor with pp, so Bézout's identity always manufactures an inverse modulo pp; when pp is composite, its factors multiply to p≡0p \equiv 0 and destroy invertibility.

Proof

(⇐\Leftarrow) Suppose pp is prime, and let aˉ∈Z/pZ\bar{a} \in \mathbb{Z}/p\mathbb{Z} be any nonzero residue class, represented by an integer aa with 1≤a≤p−11 \le a \le p - 1. Since pp is prime and p∤ap \nmid a, the greatest common divisor of aa and pp is gcd⁡(a,p)=1\gcd(a,p) = 1.

By Bézout's identity, there exist integers u,v∈Zu, v \in \mathbb{Z} such that au+pv=1au + pv = 1. Reducing both sides modulo pp kills the multiple pvpv, leaving aˉ uˉ=1ˉ\bar{a}\,\bar{u} = \bar{1} in Z/pZ\mathbb{Z}/p\mathbb{Z}. Thus uˉ=aˉ−1\bar{u} = \bar{a}^{-1} is the multiplicative inverse of aˉ\bar{a}, and since every nonzero element is invertible, Z/pZ\mathbb{Z}/p\mathbb{Z} is a field.

(⇒\Rightarrow) Conversely, suppose pp is composite, so p=bcp = bc for integers 1<b,c<p1 < b, c < p. Because bb and cc are strictly between 00 and pp, their residue classes bˉ\bar{b} and cˉ\bar{c} are both nonzero in Z/pZ\mathbb{Z}/p\mathbb{Z}, yet their product is bˉ cˉ=bc‾=pˉ=0ˉ\bar{b}\,\bar{c} = \overline{bc} = \bar{p} = \bar{0}.

Thus bˉ\bar{b} is a zero divisor, and no zero divisor can have a multiplicative inverse: if bˉ\bar{b} had an inverse bˉ−1\bar{b}^{-1}, multiplying bˉ cˉ=0ˉ\bar{b}\,\bar{c} = \bar{0} on the left by bˉ−1\bar{b}^{-1} would force cˉ=0ˉ\bar{c} = \bar{0}, a contradiction. Hence Z/pZ\mathbb{Z}/p\mathbb{Z} is not a field when pp is composite.

UndergraduateReal-World Applications and Worked Examples

Finite fields and residue rings are the working engine of modern public-key cryptography, digital signatures, and the Reed-Solomon error-correcting codes inside QR codes and solid-state drives.

Example: Computing a modular inverse via Bézout's identity

In the prime field Z/17Z\mathbb{Z}/17\mathbb{Z}, find the multiplicative inverse of 5ˉ\bar{5}, and use it to solve the linear congruence 5x≡3(mod17)5x \equiv 3 \pmod{17}.

Solution

Apply the Euclidean algorithm to 1717 and 55: 17=3⋅5+217 = 3 \cdot 5 + 2, then 5=2⋅2+15 = 2 \cdot 2 + 1. Back-substituting 2=17−3⋅52 = 17 - 3 \cdot 5 gives 1=5−2(17−3⋅5)=7⋅5−2⋅171 = 5 - 2(17 - 3 \cdot 5) = 7 \cdot 5 - 2 \cdot 17.

Reducing this Bézout identity modulo 1717 yields 7ˉ⋅5ˉ=1ˉ\bar{7} \cdot \bar{5} = \bar{1} in Z/17Z\mathbb{Z}/17\mathbb{Z}, so 5ˉ−1=7ˉ\bar{5}^{-1} = \bar{7} (indeed 5⋅7=35=2⋅17+1≡1(mod17)5 \cdot 7 = 35 = 2 \cdot 17 + 1 \equiv 1 \pmod{17}).

Multiplying 5x≡3(mod17)5x \equiv 3 \pmod{17} on both sides by 77 immediately isolates xx: x≡7⋅3=21≡4(mod17)x \equiv 7 \cdot 3 = 21 \equiv 4 \pmod{17}. Checking: 5⋅4=20≡3(mod17)5 \cdot 4 = 20 \equiv 3 \pmod{17}.

Example: Erasure recovery over a prime field (Reed-Solomon idea)

Two data symbols m0=2,m1=5∈Z/7Zm_0 = 2, m_1 = 5 \in \mathbb{Z}/7\mathbb{Z} are encoded as the line P(t)=m0+m1t(mod7)P(t) = m_0 + m_1 t \pmod{7} and sent as the four evaluations (P(0),P(1),P(2),P(3))=(2,0,5,3)(P(0), P(1), P(2), P(3)) = (2, 0, 5, 3). During transmission the first two values are lost, leaving only P(2)=5P(2)=5 and P(3)=3P(3)=3. Recover m0m_0 and m1m_1.

Solution

In the field Z/7Z\mathbb{Z}/7\mathbb{Z} we have the two linear equations m0+2m1≡5(mod7)m_0 + 2m_1 \equiv 5 \pmod{7} and m0+3m1≡3(mod7)m_0 + 3m_1 \equiv 3 \pmod{7}.

Subtracting the first equation from the second eliminates m0m_0 directly: (3−2)m1≡3−5=−2≡5(mod7)(3 - 2)m_1 \equiv 3 - 5 = -2 \equiv 5 \pmod{7}, so m1=5m_1 = 5. (Even if the step difference had been k≢0k \not\equiv 0 rather than 11, we could always divide by kk because Z/7Z\mathbb{Z}/7\mathbb{Z} is a field.)

Substituting m1=5m_1 = 5 back into m0+2m1≡5(mod7)m_0 + 2m_1 \equiv 5 \pmod{7} gives m0≡5−10=−5≡2(mod7)m_0 \equiv 5 - 10 = -5 \equiv 2 \pmod{7}, recovering (m0,m1)=(2,5)(m_0, m_1) = (2, 5) exactly from any two surviving packets — the core principle of Reed-Solomon erasure coding.

What is the multiplicative inverse of 4ˉ\bar{4} in the prime field Z/11Z\mathbb{Z}/11\mathbb{Z}?

Why is the ring Z/9Z\mathbb{Z}/9\mathbb{Z} not a field, even though 9=329 = 3^2 is a prime power?

Which number-theoretic tool directly produces the multiplicative inverse of aˉ≠0ˉ\bar{a} \neq \bar{0} in Z/pZ\mathbb{Z}/p\mathbb{Z} when pp is prime?

Why is the ring of integers Z\mathbb{Z} an integral domain even though it is not a field?

References

  1. David S. Dummit, Richard M. Foote (2004). Abstract Algebra (3rd ed.)
  2. Michael F. Atiyah, Ian G. Macdonald (1969). Introduction to Commutative Algebra