Cancellation law and the existence of modular inverses
Statement
If , then . Equivalently, has a multiplicative inverse modulo : an integer with .
Why is it true?
Ordinary "division" is really multiplication by an inverse, and this theorem tells us exactly when that inverse exists modulo : precisely when shares no common factor with . Without this condition cancellation genuinely fails (see the last row of the table above), which is why every later result about powers modulo — Fermat's little theorem, Euler's theorem, the Chinese remainder theorem — is built on top of this single algebraic fact.
Proof sketch
Since , Bézout's identity (a consequence of the Euclidean algorithm) guarantees : there exist integers with .
Multiply both sides of by : . Now substitute : the left side becomes , and since is a multiple of , ; likewise the right side . Hence , proving cancellation.
Moreover, taking is not needed — directly, by the same substitution, so itself is the multiplicative inverse of modulo : this is exactly the object whose existence Theorem statement claims.
The hypothesis is essential: take (so ). Then and , so , yet — cancellation genuinely fails once the coprimality hypothesis is dropped.
Topics that use this theorem
Step-by-step proofs
No step-by-step proof yet for this theorem.
References
- Carl Friedrich Gauss (1801). Disquisitiones Arithmeticae
- Jung Hee Cheon, Andrey Kim, Miran Kim, Yongsoo Song (2017). Homomorphic Encryption for Arithmetic of Approximate Numbers · DOI:10.1007/978-3-319-70694-8_15