<s>[INST] Suppose $n$ is prime and $x \in Z$ satisfies $x^2 \equiv 1 \mod n.$ Prove that $x \equiv 1 \mod n$ or $x \equiv -1 \mod n$. Suppose $n$ is prime and $x \in Z$ satisfies $x^2 \equiv 1 \mod n.$ Prove that $x \equiv 1 \mod n$ or $x \equiv -1 \mod n$. 
So far I have done the following proof, but I am unsure how to complete it: 
We will begin by explaining why $x^2 \equiv 1 \mod n$ iff $n|(x^2 - 1)$. Then use this to prove that $x \equiv 1 \mod n$ or $x \equiv -1 \mod n$.
If $x^2 \equiv 1 \mbox{ mod } n$, then $x^2 = nk +1 $, for some $k \in Z$. Therefore $nk = x^2 -1$, and $n|(x^2 -1)$. 
On the other hand, if $n|(x^2 -1)$, then $nk = x^2 -1$ for some $k \in Z$, and then we can say $x^2 = nk +1$, and thus $x^2 \equiv 1 \mod n$. 
From here, however I am not sure how to demonstrate that this shows $x \equiv 1 \mod n$ or $x \equiv -1 \mod n$. 
 [/INST] An essential property of primes is the following:

If $p \mid ab$ then $p \mid a$ or $p \mid b$.

In your case, $n \mid (x+1)(x-1)$, so $n \mid (x+1)$ or $n \mid (x-1)$.
</s>