Math 2.0

Number theory Proof

Proof of the existence of inverses modulo n

Builds on Modular multiplicative inverseCoprime integersGreatest common divisorBézout's identityCongruence modulo nDivisibility

Proof

  1. Let nn be a positive integer and let aa be an integer. Let d=gcd⁡(a,n)d = \gcd(a, n) be their greatest common divisor.
  2. Since n≠0n \ne 0, the integers aa and nn are not both 00. So dd is a positive common divisor of aa and nn.
  3. First assume that aa and nn are coprime, so d=1d = 1.
  4. By Bézout's identity, there are integers xx and yy with ax+ny=1a x + n y = 1.
  5. Then ax−1=n(−y)a x - 1 = n (-y), so nn divides ax−1a x - 1. By the definition of congruence, ax≡1(modn)a x \equiv 1 \pmod n.
  6. So xx is a modular multiplicative inverse of aa modulo nn.
  7. Conversely, assume that aa has an inverse xx modulo nn, so ax≡1(modn)a x \equiv 1 \pmod n.
  8. Then nn divides ax−1a x - 1, so there is an integer yy with ax−1=nya x - 1 = n y. That is, ax−ny=1a x - n y = 1.
  9. The integer dd divides aa and nn, so it divides ax−ny=1a x - n y = 1.
  10. Since dd is positive by step 2 and divides 11, we get d=1d = 1. So aa and nn are coprime.
  11. By steps 3 to 10, aa has an inverse modulo nn if and only if aa and nn are coprime.

Idea

An inverse xx of aa is the same thing as a way to write 1=ax+ny1 = a x + n y. Bézout's identity gives such a way when gcd⁡(a,n)=1\gcd(a, n) = 1. Conversely, any common divisor of aa and nn divides ax+ny=1a x + n y = 1.

Reading path

To understand this page from the ground up, read these 25 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 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 levelDivisibilitydefinitionMathematical 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…definitionSuccessor function, definition, no evidence levelSuccessor functiondefinitionModular multiplicative inverse, definition, no evidence levelModular multiplicativ…definitionCoprime integers, definition, no evidence levelCoprime integersdefinitionAddition 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…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 …definitionCommutativity 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…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. Mathematical induction concept
  4. Natural numbers object
  5. Peano axioms concept
  6. Congruence modulo n definition
  7. Greatest common divisor definition
  8. Successor function definition
  9. Modular multiplicative inverse definition
  10. Coprime integers definition
  11. Addition of natural numbers definition
  12. The successor function is injective statement
  13. Zero is not a successor statement
  14. Proof of the commutativity of addition by induction proof
  15. Order on the natural numbers definition
  16. Commutativity of addition statement
  17. Proof of strong induction from ordinary induction proof
  18. Strong induction statement
  19. Proof of the well-ordering principle from strong induction proof
  20. Well-ordering principle statement
  21. Proof of the division algorithm proof
  22. Division algorithm statement
  23. Proof of Bézout's identity proof
  24. Bézout's identity statement
  25. Proof of the existence of inverses modulo n proof

Where this leads

24 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Modular_multiplicative_inverse, Integers modulo m
About this page
TagSC1CEH0NHE
URIm2://SC1CEH0NHE
Kindproof
WritingW0 stub
MSC11A07
ProvesExistence of inverses modulo n
UsesModular multiplicative inverse, Coprime integers, Greatest common divisor, Bézout's identity, Congruence modulo n, Divisibility
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.