Division is not always possible!

Definition

An element a Z/nZ distinct from 0 is called invertible if there is an element b such that

ab = 1.

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.

Theorem

Let n > 1 and a 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.

An arithmetical system such as Z/pZ with p prime, in which every element not equal to 0 has a multiplicative inverse, is called a field. The precise definition of this notion is given in Chapter 7.