Ring of Integers Modulo Prime is Field/Proof 3

Proof
Let $m$ be prime.

From Ring of Integers Modulo Prime is Integral Domain, $\struct {\Z_m, +, \times}$ is an integral domain.

Let $\eqclass a m \ne \eqclass 0 m$ be a residue class modulo $m$.

We need to find a residue class modulo $m$ $\eqclass x m$ such that $\eqclass a m \eqclass x m = \eqclass 1 m$.

Because $m$ is prime and $m \nmid a$, we have:
 * $\gcd \set {a, m} = 1$

Hence from Bézout's Lemma:
 * $1 = x a + y m$

for some $x, y \in \Z$.

Thus we have:

So every non-zero residue class modulo $m$ has an inverse.

So by definition $\struct {\Z_m, +, \times}$ is a field.

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

From Ring of Integers Modulo Composite is not Integral Domain, $\struct {\Z_m, +, \times}$ is not an integral domain.

From Field is Integral Domain $\struct {\Z_m, +, \times}$ is not a field.