Prove that an element $\bar{x}$ is its own inverse iff $\bar{x} = 1,-1$ Show that in $\mathbb{Z_p^\star}$ (where p is prime under the binary operiation multiplication), an element $\bar{x}$ is its own inverse if and only if $\bar{x} = \bar{1},\overline{p-1}$
This question was in my last homework, and my solution was as follows:
$\overline{x^2} = \bar{1}$
$\iff \overline{x^2-1} = \bar{0} \iff \overline{(x-1)(x+1)} = \bar{0}$ 
I then concluded that either $\overline{x-1}$ or $\overline{x+1}$ is $\overline{0}$ however, the marker stated I needed more justification from the of:
$\iff \overline{(x-1)(x+1)} = \bar{0}$ 
to
either $\overline{x-1}$ or $\overline{x+1}$ is $\overline{0}$
I asked my lecturer at the end of one lecture and he said that you need to justify that either $p$ divides $\overline{x-1}$ or p divides $\overline{x+1}$, but I don't understand how p divides either, or how that justifies anything. Could someone please explain?
 A: Assume that $ \overline{(x-1)(x+1)} = \bar{0}$ and by definition of $\mathbb Z_p^*$, we have $p\,|\,(x-1)(x+1)$. Thus, either  $p\,|x+1$ or $p\,|\,x-1$ and it implies that $\bar{x} = \bar{1},\overline{p-1}$.
The converse is clear.
Note that $\overline 1=\{\ldots,-p+1,p+1,2p+1\ldots\}$ or $\overline 0=\{,\ldots,-p,0,p,2p,\ldots\}$. When we write $ \overline{(x-1)(x+1)} = \bar{0}$, we mean $(x-1)(x+1)=kp$ where $k\in \mathbb Z$.
A: You're considering integers modulo $p$ under multiplication - so they're refering to an integer being equivalent to 0 mod $p$ if it is a multiple of $p$. 
Then since $(x+1)(x-1) = 0$ in $\mathbb{Z}_p^*$, have that (in $\mathbb{Z}$) $p$ divides $(x+1)(x-1)$. Then either $p$ divides $(x+1)$ or $p$ divides $(x-1)$ - since it's a standard property that for $p$ prime, $p \vert ab \Rightarrow p \vert a \ or \ p \vert b$.
Alternatively you could quote that $\mathbb{Z}_p$ in an integral domain, but if they were expecting you to do that I think what they'd said about justifying it would've been different (so you may not have done that sort of thing yet?).
