Division is not always possible!
Z/nZ
distinct from 0
is called invertible if there is an element b such that
The element b is called the (multiplicative) inverse of a.
An integer a will also be called invertible modulo n if the class a (mod n) is invertible.
The following theorem tells us which elements of Z/nZ have an inverse.
Z.
The class of a in
Z/nZ
has a multiplicative inverse if and only if gcd(a,n) = 1.
In particular, every class not equal to 0 (mod n) has an inverse if and only if n is prime.