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, you can add, subtract, and multiply without ever leaving Z, and multiplication distributes over addition via a(b+c)=ab+ac — that two-operation package is what algebraists call a ring. Division, however, fails in Z: 1/2 is not an integer. Moving to the rationals Q (or to clock arithmetic Z/pZ modulo a prime p) restores division by every nonzero element via a⋅a−1=1, turning the ring into a field.
Interactive unit circle illustrating cyclic rotation of residues.
In the ring Z/9Z (m=9), multiplying by a=3 sends 3 and 6 to 0 (zero divisors!), whereas when m is prime every nonzero a is invertible and Z/mZ is a field.
SchoolAxioms of rings, integral domains, and fields
Definition: Ring, integral domain, and field
A ring (R,+,⋅) is a set where (R,+) is an abelian group (with zero element 0 and negatives −a), multiplication ⋅ is associative with identity 1, and multiplication distributes over addition: a(b+c)=ab+ac and (a+b)c=ac+bc. A commutative ring (ab=ba) with 1=0 is an integral domain if it has no zero divisors (ab=0⟹a=0 or b=0), and is a field if every a=0 has a multiplicative inverse a−1 satisfying a⋅a−1=1.
a(b+c)=ab+ac,(a+b)c=ac+bc
Inside any commutative ring R, an ideal I⊆R is a subgroup under addition that absorbs multiplication by arbitrary ring elements (r∈R,x∈I⟹rx∈I). Quotienting by the principal ideal nZ inside Z produces the residue ring Z/nZ, whose arithmetic is ordinary addition and multiplication modulo n.
Z/nZ={0ˉ,1ˉ,…,n−1},aˉbˉ=abmodn
Comparison of standard rings and fields
Structure
Key multiplicative property
Integers Z
Integral domain, not a field: only ±1 have multiplicative inverses
Rationals Q, reals R, complexes C
Infinite fields: every nonzero element has an inverse
Z/nZ with n composite (e.g. n=6)
Commutative ring with zero divisors (2ˉ⋅3ˉ=0ˉ in Z/6Z); not a field
Z/pZ with p prime
Finite field of p elements: every aˉ=0ˉ is invertible
If D is a finite integral domain, then every nonzero element of D has a multiplicative inverse, so D 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 1.
Proof
Let a∈D be any nonzero element, and consider the left-multiplication map La:D→D defined by La(x)=ax.
We first show La is injective. Suppose La(x)=La(y), so ax=ay, i.e. a(x−y)=0. Since D is an integral domain and a=0, there are no zero divisors, which forces x−y=0 and hence x=y.
Because D is a finite set, any injective map D→D is automatically surjective (by the pigeonhole principle: ∣La(D)∣=∣D∣). In particular, the multiplicative identity 1∈D must lie in the image of La, so there exists b∈D with La(b)=ab=1. Thus b=a−1, and since a=0 was arbitrary, D is a field.
For an integer p≥2, the residue ring Z/pZ is a field if and only if p is a prime number.
Why is it true?
When p is prime, no nonzero number smaller than p shares a factor with p, so Bézout's identity always manufactures an inverse modulo p; when p is composite, its factors multiply to p≡0 and destroy invertibility.
Proof
(⇐) Suppose p is prime, and let aˉ∈Z/pZ be any nonzero residue class, represented by an integer a with 1≤a≤p−1. Since p is prime and p∤a, the greatest common divisor of a and p is gcd(a,p)=1.
By Bézout's identity, there exist integers u,v∈Z such that au+pv=1. Reducing both sides modulo p kills the multiple pv, leaving aˉuˉ=1ˉ in Z/pZ. Thus uˉ=aˉ−1 is the multiplicative inverse of aˉ, and since every nonzero element is invertible, Z/pZ is a field.
(⇒) Conversely, suppose p is composite, so p=bc for integers 1<b,c<p. Because b and c are strictly between 0 and p, their residue classes bˉ and cˉ are both nonzero in Z/pZ, yet their product is bˉcˉ=bc=pˉ=0ˉ.
Thus bˉ is a zero divisor, and no zero divisor can have a multiplicative inverse: if bˉ had an inverse bˉ−1, multiplying bˉcˉ=0ˉ on the left by bˉ−1 would force cˉ=0ˉ, a contradiction. Hence Z/pZ is not a field when p 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, find the multiplicative inverse of 5ˉ, and use it to solve the linear congruence 5x≡3(mod17).
Solution
Apply the Euclidean algorithm to 17 and 5: 17=3⋅5+2, then 5=2⋅2+1. Back-substituting 2=17−3⋅5 gives 1=5−2(17−3⋅5)=7⋅5−2⋅17.
Reducing this Bézout identity modulo 17 yields 7ˉ⋅5ˉ=1ˉ in Z/17Z, so 5ˉ−1=7ˉ (indeed 5⋅7=35=2⋅17+1≡1(mod17)).
Multiplying 5x≡3(mod17) on both sides by 7 immediately isolates x: x≡7⋅3=21≡4(mod17). Checking: 5⋅4=20≡3(mod17).
Example: Erasure recovery over a prime field (Reed-Solomon idea)
Two data symbols m0=2,m1=5∈Z/7Z are encoded as the line P(t)=m0+m1t(mod7) and sent as the four evaluations (P(0),P(1),P(2),P(3))=(2,0,5,3). During transmission the first two values are lost, leaving only P(2)=5 and P(3)=3. Recover m0 and m1.
Solution
In the field Z/7Z we have the two linear equations m0+2m1≡5(mod7) and m0+3m1≡3(mod7).
Subtracting the first equation from the second eliminates m0 directly: (3−2)m1≡3−5=−2≡5(mod7), so m1=5. (Even if the step difference had been k≡0 rather than 1, we could always divide by k because Z/7Z is a field.)
Substituting m1=5 back into m0+2m1≡5(mod7) gives m0≡5−10=−5≡2(mod7), recovering (m0,m1)=(2,5) exactly from any two surviving packets — the core principle of Reed-Solomon erasure coding.
What is the multiplicative inverse of 4ˉ in the prime field Z/11Z?
Why is the ring Z/9Z not a field, even though 9=32 is a prime power?
Which number-theoretic tool directly produces the multiplicative inverse of aˉ=0ˉ in Z/pZ when p is prime?
Why is the ring of integers Z an integral domain even though it is not a field?