Math 2.0

Number theory Proof

Proof that Z/nZ is a field if and only if n is prime

Builds on Integers modulo nFieldPrime numberComposite numberGreatest common divisorBézout's identityCommutative ring

Proof

  1. Let n≥2n \ge 2 be an integer. Write a‾\overline{a} for the class of an integer aa in the ring ℤ/nℤ\Z/n\Z of integers modulo n.
  2. The ring ℤ/nℤ\Z/n\Z is a commutative ring, because the operations on classes come from the commutative operations on ℤ\Z.
  3. We have a‾=0‾\overline{a} = \overline{0} if and only if n∣an \mid a. In particular, 1‾≠0‾\overline{1} \neq \overline{0}, since n≥2n \ge 2 does not divide 11.
  4. First suppose that nn is not a prime number. Since n≥2n \ge 2, nn is composite. So nn has a positive divisor aa with a≠1a \neq 1 and a≠na \neq n. Put b=n/ab = n / a. Then 1<a<n1 < a < n, and so 1<b<n1 < b < n.
  5. By step 3, a‾≠0‾\overline{a} \neq \overline{0} and b‾≠0‾\overline{b} \neq \overline{0}, since 0<a,b<n0 < a, b < n. But a‾⋅b‾=n‾=0‾\overline{a} \cdot \overline{b} = \overline{n} = \overline{0}.
  6. Suppose that a‾\overline{a} had an inverse c‾\overline{c}, so that c‾⋅a‾=1‾\overline{c} \cdot \overline{a} = \overline{1}. Then b‾=c‾⋅a‾⋅b‾=c‾⋅0‾=0‾\overline{b} = \overline{c} \cdot \overline{a} \cdot \overline{b} = \overline{c} \cdot \overline{0} = \overline{0}.
  7. This contradicts step 5. So a‾\overline{a} is a nonzero element without inverse, and ℤ/nℤ\Z/n\Z is not a field.
  8. Now suppose that n=pn = p is a prime number. By steps 2 and 3, it remains to show that every nonzero class has an inverse.
  9. Let a‾≠0‾\overline{a} \neq \overline{0}, so p∤ap \nmid a by step 3. Let d=gcd⁡(a,p)d = \gcd(a, p) be the greatest common divisor.
  10. Since dd is a positive divisor of the prime pp, d=1d = 1 or d=pd = p. Since d∣ad \mid a and p∤ap \nmid a, d≠pd \neq p. So d=1d = 1.
  11. By Bézout's identity, there are integers x,yx, y with ax+py=1a x + p y = 1.
  12. Passing to classes, a‾⋅x‾+p‾⋅y‾=1‾\overline{a} \cdot \overline{x} + \overline{p} \cdot \overline{y} = \overline{1}. Since p‾=0‾\overline{p} = \overline{0}, this gives a‾⋅x‾=1‾\overline{a} \cdot \overline{x} = \overline{1}.
  13. So x‾\overline{x} is an inverse of a‾\overline{a}, and ℤ/pℤ\Z/p\Z is a field.
  14. By steps 7 and 13, ℤ/nℤ\Z/n\Z is a field if and only if nn is prime.

Idea

A factorization n=abn = a b gives two nonzero classes with product zero, and such a class cannot be invertible. For a prime pp, any aa not divisible by pp is coprime to pp. Bézout's identity then writes 11 as axa x plus a multiple of pp, so xx inverts aa modulo pp.

Reading path

To understand this page from the ground up, read these 36 pages in order. The foundations come first. The path takes the proofs Proof of Bézout's identity, Proof of the commutativity of addition by induction, Proof of strong induction from ordinary induction, Proof that congruence is compatible with addition, Proof that congruence is compatible with multiplication, Proof of the well-ordering principle from strong induction, Proof of the division algorithm.

Show the path as a graph
Definition by recursion, concept, no evidence levelDefinition by recursi…conceptDivisibility, definition, no evidence levelDivisibilitydefinitionGroup, concept, no evidence levelGroupconceptMathematical induction, concept, no evidence levelMathematical inductionconceptNatural numbers, object, no evidence levelNatural numbersobjectPeano axioms, concept, no evidence levelPeano axiomsconceptCongruence modulo n, definition, no evidence levelCongruence modulo ndefinitionGreatest common divisor, definition, no evidence levelGreatest common divis…definitionPrime number, definition, no evidence levelPrime numberdefinitionRing, definition, no evidence levelRingdefinitionSuccessor function, definition, no evidence levelSuccessor functiondefinitionResidue class, definition, no evidence levelResidue classdefinitionProof that congruence is compatible with addition, proof, no evidence levelProof that congruence…proofProof that congruence is compatible with multiplication, proof, no evidence levelProof that congruence…proofComposite number, definition, no evidence levelComposite numberdefinitionAddition of natural numbers, definition, no evidence levelAddition of natural n…definitionCommutative ring, definition, no evidence levelCommutative ringdefinitionUnit of a ring, definition, no evidence levelUnit of a ringdefinitionThe successor function is injective, statement, no evidence levelThe successor functio…statementZero is not a successor, statement, no evidence levelZero is not a success…statementCongruence is compatible with addition, statement, no evidence levelCongruence is compati…statementCongruence is compatible with multiplication, statement, no evidence levelCongruence is compati…statementProof of the commutativity of addition by induction, proof, no evidence levelProof of the commutat…proofOrder on the natural numbers, definition, no evidence levelOrder on the natural …definitionField, definition, no evidence levelFielddefinitionIntegers modulo n, definition, no evidence levelIntegers modulo ndefinitionCommutativity of addition, statement, no evidence levelCommutativity of addi…statementProof of strong induction from ordinary induction, proof, no evidence levelProof of strong induc…proofStrong induction, statement, no evidence levelStrong inductionstatementProof of the well-ordering principle from strong induction, proof, no evidence levelProof of the well-ord…proofWell-ordering principle, statement, no evidence levelWell-ordering princip…statementProof of the division algorithm, proof, no evidence levelProof of the division…proofDivision algorithm, statement, no evidence levelDivision algorithmstatementProof of Bézout's identity, proof, no evidence levelProof of Bézout's ide…proofBézout's identity, statement, no evidence levelBézout's identitystatementProof that Z/nZ is a field if and only if n is prime, proof, no evidence levelProof that Z/nZ is a …proof
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Definition by recursion concept
  2. Divisibility definition
  3. Group concept
  4. Mathematical induction concept
  5. Natural numbers object
  6. Peano axioms concept
  7. Congruence modulo n definition
  8. Greatest common divisor definition
  9. Prime number definition
  10. Ring definition
  11. Successor function definition
  12. Residue class definition
  13. Proof that congruence is compatible with addition proof
  14. Proof that congruence is compatible with multiplication proof
  15. Composite number definition
  16. Addition of natural numbers definition
  17. Commutative ring definition
  18. Unit of a ring definition
  19. The successor function is injective statement
  20. Zero is not a successor statement
  21. Congruence is compatible with addition statement
  22. Congruence is compatible with multiplication statement
  23. Proof of the commutativity of addition by induction proof
  24. Order on the natural numbers definition
  25. Field definition
  26. Integers modulo n definition
  27. Commutativity of addition statement
  28. Proof of strong induction from ordinary induction proof
  29. Strong induction statement
  30. Proof of the well-ordering principle from strong induction proof
  31. Well-ordering principle statement
  32. Proof of the division algorithm proof
  33. Division algorithm statement
  34. Proof of Bézout's identity proof
  35. Bézout's identity statement
  36. Proof that Z/nZ is a field if and only if n is prime proof

Where this leads

10 pages build on this one.

Further reading

  1. Web https://proofwiki.org/wiki/Ring_of_Integers_Modulo_Prime_is_Field
  2. Web https://proofwiki.org/wiki/Ring_of_Integers_Modulo_Composite_is_not_Integral_Domain
About this page
Tag5MWBX5QWGJ
URIm2://5MWBX5QWGJ
Kindproof
WritingW0 stub
MSC11A07
ProvesZ/pZ is a field for p prime
UsesIntegers modulo n, Field, Prime number, Composite number, Greatest common divisor, Bézout's identity, Commutative ring
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.