For integers and , a modular multiplicative inverse is a congruence class satisfying . It exists exactly when . Necessity follows because every common divisor of would divide . Conversely, Bézout's identity gives for coprime integers, making an inverse. This is the basic bridge from greatest common divisor calculations to reversible modular arithmetic.
For example, , so . The modular congruence therefore has the unique solution class . Multiplication by sends all seventeen residue classes to different classes; multiplying by reverses it. The inverse criterion and its algorithmic construction are presented in Ankur Moitra, MIT 18.200, 2024, modular inverses and Euclid's algorithm.
By contrast, has no modular inverse modulo . Its products have only residues . Consequently has no solution, while has five solution classes, . Dividing by a noninvertible residue would discard this distinction. In a prime field , every nonzero residue is invertible; a general integer modulus instead gives a quotient ring that can have zero divisors.
Figure 1.
Multiplication by five is reversible modulo seventeen but collapses classes modulo fifteen
. Details.

Articles by others on the same topic (2)

The modular multiplicative inverse of an integer \( a \) with respect to a modulus \( m \) is another integer \( x \) such that the product \( ax \equiv 1 \mod m \). In other words, when \( a \) is multiplied by \( x \) and then divided by \( m \), the remainder is 1.