Math 2.0

Number theory Proof

Proof of the number of invertible residues modulo n

Builds on Integers modulo nResidue classUnit of a ringCongruence modulo nModular multiplicative inverseExistence of inverses modulo nEuler's totient functionCoprime integers

Proof

  1. Let nn be a positive integer. For an integer aa, write a‾\overline{a} for its residue class modulo nn. Then a‾=b‾\overline{a} = \overline{b} if and only if a≡b(modn)a \equiv b \pmod n.
  2. The classes 1‾,2‾,…,n‾\overline{1}, \overline{2}, \dots, \overline{n} are distinct. Indeed, two different integers in {1,…,n}\{ 1, \dots, n \} differ by a number between 11 and n−1n - 1, which nn does not divide.
  3. Since n≡0(modn)n \equiv 0 \pmod n, we have n‾=0‾\overline{n} = \overline{0}. So by the definition of integers modulo n, ℤ/nℤ={1‾,2‾,…,n‾}\mathbb{Z}/n\mathbb{Z} = \{ \overline{1}, \overline{2}, \dots, \overline{n} \}.
  4. Let aa be an integer. The class a‾\overline{a} is a unit if there is an integer xx with a‾⋅x‾=1‾\overline{a} \cdot \overline{x} = \overline{1}. The ring is commutative, so one side suffices.
  5. Since a‾⋅x‾=ax‾\overline{a} \cdot \overline{x} = \overline{a x}, step 1 shows that a‾⋅x‾=1‾\overline{a} \cdot \overline{x} = \overline{1} if and only if ax≡1(modn)a x \equiv 1 \pmod n.
  6. So a‾\overline{a} is invertible if and only if aa has a modular multiplicative inverse modulo nn.
  7. By the existence of inverses modulo n, this holds if and only if aa and nn are coprime.
  8. By steps 3 and 7, the invertible elements are the classes a‾\overline{a} with 1≤a≤n1 \le a \le n and aa coprime to nn. By step 2, these classes are distinct.
  9. By the definition of Euler's totient function, there are φ(n)\varphi(n) such integers aa. Hence ℤ/nℤ\mathbb{Z}/n\mathbb{Z} has exactly φ(n)\varphi(n) invertible elements.

Idea

Each class modulo nn has exactly one representative among 1,…,n1, \dots, n. A class is invertible exactly when its representative is coprime to nn, so counting the invertible classes is counting the integers that φ(n)\varphi(n) counts.

Reading path

To understand this page from the ground up, read these 37 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, Proof of the existence of inverses modulo n.

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…definitionRing, definition, no evidence levelRingdefinitionSuccessor function, definition, no evidence levelSuccessor functiondefinitionModular multiplicative inverse, definition, no evidence levelModular multiplicativ…definitionResidue 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…proofCoprime integers, definition, no evidence levelCoprime integersdefinitionUnit of a ring, definition, no evidence levelUnit of a ringdefinitionAddition of natural numbers, definition, no evidence levelAddition of natural n…definitionThe 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…statementEuler's totient function, definition, no evidence levelEuler's totient funct…definitionProof 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 …definitionIntegers 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 of the existence of inverses modulo n, proof, no evidence levelProof of the existenc…proofExistence of inverses modulo n, statement, no evidence levelExistence of inverses…statementProof of the number of invertible residues modulo n, proof, no evidence levelProof of the number o…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. Ring definition
  10. Successor function definition
  11. Modular multiplicative inverse definition
  12. Residue class definition
  13. Proof that congruence is compatible with addition proof
  14. Proof that congruence is compatible with multiplication proof
  15. Coprime integers definition
  16. Unit of a ring definition
  17. Addition of natural numbers definition
  18. The successor function is injective statement
  19. Zero is not a successor statement
  20. Congruence is compatible with addition statement
  21. Congruence is compatible with multiplication statement
  22. Euler's totient function definition
  23. Proof of the commutativity of addition by induction proof
  24. Order on the natural numbers definition
  25. Integers modulo n definition
  26. Commutativity of addition statement
  27. Proof of strong induction from ordinary induction proof
  28. Strong induction statement
  29. Proof of the well-ordering principle from strong induction proof
  30. Well-ordering principle statement
  31. Proof of the division algorithm proof
  32. Division algorithm statement
  33. Proof of Bézout's identity proof
  34. Bézout's identity statement
  35. Proof of the existence of inverses modulo n proof
  36. Existence of inverses modulo n statement
  37. Proof of the number of invertible residues modulo n proof

Where this leads

1 page builds on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Modular_multiplicative_inverse, Integers modulo m
About this page
TagX5KJ580184
URIm2://X5KJ580184
Kindproof
WritingW0 stub
MSC11A07
ProvesNumber of invertible residues modulo n
UsesIntegers modulo n, Residue class, Unit of a ring, Congruence modulo n, Modular multiplicative inverse, Existence of inverses modulo n, Euler's totient function, Coprime integers
MethodsDirect proof
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)

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.