Field Properties of Z_m Under Addition and Multiplication Modulo m – Prime Number Proof

abstract-algebralinear algebranumber theory

I am looking for ways to prove that $\mathbb{Z}_m=\{0,1,2,\dots,m-1\}$ is a field under addition and multiplication $\bmod\ m$ iff $m$ is a prime.

I tried it this way:
If $m$ is a prime $p$,it is obvious that most importantly, we need to prove that every non-zero element in $\mathbb{Z_p}$ has an inverse in $\mathbb{Z_p}$.We note that if $a,b\in \mathbb{Z_p}$, then $a\cdot b\in \mathbb{Z_p} \dots \boxed{*}$. Next, $a^p\equiv a \bmod p$ for prime $p$(the proof follows by induction on $a$).As $\displaystyle 0\leq a\leq p-1$,$a\not =p$. Thus $$a^{p-1}\equiv 1 \bmod p$$ for prime $p$ which,together with $\boxed{*}$ guarantees the existence of an inverse in $\mathbb{Z_p}$.Proving the other properties is simple.

Conversely,if $\mathbb{Z_m}$ is a field,then every non-zero element of $\mathbb{Z_m}$ has an inverse.Note that inverse of an element is unique.For if $a\cdot b\equiv a\cdot c\equiv 1 \bmod m$,then $(a\cdot b)\cdot c\equiv c\equiv (a\cdot c)\cdot b\equiv b \bmod m$ i.e $m|(b-c)\implies b-c=0(0\leq a\leq m-1,a\in \mathbb{Z_m})$.So, inverses must be unique and every element is either an inverse of itself or has in inverse in the field.That allows us to conclude that $[(m-1)!]^2\equiv 1 \bmod m$ which can only mean that either
$(m-1)!\equiv 1 \bmod m$ or $(m-1)!\equiv -1 \bmod m$. If $m$ is not a prime, it has a prime factor, say $p$. $ 0\leq p\leq m-1\implies p|(m-1)!\implies p|1$or $-1$ which is absurd, a contradiction.Thus $m$ is prime.

I feel that this method is too involved and complicated. Can anyone please suggest some other method?(Some context: This is a problem from Finite Dimensional Vector Spaces by Paul Halmos. I am learning linear algebra for the first time.It seems some of the comments have been posted on the assumption that I know rings and fields; I don't. )

Best Answer

Since $\mathbb{Z}_m$ is a ring, it follows that $\mathbb{Z}_m$ is a field if and only if every nonzero element of $\mathbb{Z}_m$ is invertible.

I think the following proof is straightforward, and it is the most common one I have seen in algebra/number theory textbooks.

If $m$ is not prime, then $m = ab$, where $1 < a < m$ and $1 < b < m$. I claim that $a$ does not have an inverse in $\mathbb{Z}_m$. If $ax = 1 \mod{m}$, then $abx = b \mod{m}$. But $ab = 0$ modulo $m$, which implies $b = 0 \mod{m}$, a contradiction.

Suppose that $m$ is a prime, and let $1 \leq a < m$. Now $\gcd(a,m) = 1$, so by Bezout's theorem $ax + my = 1$ for some integers $x$ and $y$. Hence $ax = 1 \mod{m}$ and $a$ is invertible modulo $m$.

Related Question