Ring of Integers Modulo Prime is Field

Theorem
Let $$m \in \Z: m \ge 2$$.

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

Then:
 * $$m$$ is prime

iff:
 * $$\left({\Z_m, +, \times}\right)$$‎ is a field.

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

Prime Modulus
Suppose $$m \in \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({\Z_m, +, \times}\right)$$ to be a field, we only need to show that all elements of $$\Z_m - \left\{{\left[\!\left[{0}\right]\!\right]_m}\right\}$$ have product inverses, as $$\left({\Z_m, \times}\right)$$ is already commutative.

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

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

As $$m$$ is prime, $$\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 $$\Z_m - \left\{{\left[\!\left[{0}\right]\!\right]_m}\right\}$$ which is what we wanted to show. {{qed|lemma}

Composite Modulus
Now suppose $$m \in \Z: m \ge 2$$ is composite.

Then $$\exists k, l \in \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({\Z_m, +, \times}\right)$$‎ is a ring with zero divisors.

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