Ring of Integers Modulo Prime is Field

Theorem
Let $$\left({\mathbb{Z}_m, +, \times}\right)$$‎ be the ring of integers modulo $m$.

Then $$m$$ is prime iff $$\left({\mathbb{Z}_m, +, \times}\right)$$‎ is a field.

Proof
$$\left({\mathbb{Z}_m, +, \times}\right)$$‎ is a commutative ring with unity by definition.


 * Suppose $$m \in \mathbb{Z}$$ is prime.

A field is by definition a commutative division ring.

A division ring is a ring in which all the non-zero elements have product inverses.

For $$\left({\mathbb{Z}_m, +, \times}\right)$$ to be a field, we only need to show that all elements of $$\mathbb{Z}_m - \left\{{\left[\!\left[{0}\right]\!\right]_m}\right\}$$ have product inverses, as $$\left({\mathbb{Z}_m, \times}\right)$$ is already commutative.

Let $$\mathbb{Z}'_m$$ be the set of integers coprime to $$m$$ in $$\mathbb{Z}_m$$.

From Multiplicative Group of Integers Modulo m, $$\left({\mathbb{Z}'_m, \times}\right)$$ is an abelian group, and thus all its elements have product inverses.

As $$m$$ is prime, $$\mathbb{Z}'_m$$ becomes $$\left\{{\left[\!\left[{1}\right]\!\right]_m, \left[\!\left[{2}\right]\!\right]_m, \ldots, \left[\!\left[{m-1}\right]\!\right]_m}\right\}$$.

This is precisely $$\mathbb{Z}_m - \left\{{\left[\!\left[{0}\right]\!\right]_m}\right\}$$ which is what we wanted to show.


 * Alternatively, suppose $$m \in \mathbb{Z}: m \ge 2$$ is composite.

Then $$\exists k, l \in \mathbb{N}^*: 1 < k, l < m: m = k l$$.

Thus $$\left[\!\left[{0}\right]\!\right]_m = \left[\!\left[{m}\right]\!\right]_m = \left[\!\left[{k l}\right]\!\right]_m = \left[\!\left[{k}\right]\!\right]_m \times \left[\!\left[{l}\right]\!\right]_m$$.

Thus $$\left({\mathbb{Z}_m, +, \times}\right)$$‎ is a ring with zero divisors.

Therefore $$\left({\mathbb{Z}_m, +, \times}\right)$$ is not a division ring and therefore not a field.