This is the second part of an assignment in which the first part was the following:
Show, if $n \in \mathbb{N}$ is not prime, then there exists $[a],[b] \in \mathbb{Z}_n$ such that $[a] \neq [0] \neq [b]$ , but $[a] \cdot [b] = 0$.
Now, I solved this pretty easily by letting $n = ab$ and moving on from there. But I really have no idea how to approach the problem in the title, namely: Show that the product of nonzero elements of $\mathbb Z_p$ ($p$ prime) is nonzero. I know that $p$ can only be an odd number or 2, but I'm not sure if that's relevant here. Should I prove it in two cases, one where $p$ is odd $(p = 2k + 1)$ and one where $p = 2$?
I know that the statement is clearly true, and it is especially obvious when you draw out a multiplication table of $\mathbb{Z}_p$. But I just don't know how to translate that into a formal argument here. Any help is appreciated, thank you!
You do not have to consider separate cases for $2$ and odd primes.
According to Euclid's lemma, if a prime integer $p$ divides the product of integers $a$ and $b,$
then $p$ divides $a$ or $b$ (or both). In symbols, $p|ab\implies p|a \lor p|b.$
(This is not necessarily the case for a composite integer;
for example, if $a,b>1$ and $n=ab,$ then $n$ divides $ab,$ but $n$ divides neither $a$ nor $b$.)
Stated in modular arithmetic, if $ab\equiv0 \pmod p,$ then $a$ or $b\equiv0 \pmod p.$
The contrapositive also holds: if $a\not\equiv0$ and $b\not\equiv0\pmod p$, then $ab\not\equiv0 \pmod p.$
That is, $\mathbb Z/p\mathbb Z$ is an integral domain (has no non-zero zero divisors; has the cancellation property).