Prove $\{x \mid x^2 \equiv 1 \pmod p\}=\{1, -1\}$ for all primes $p$ One way to prove that $\{x \mid x^2 \equiv 1 \pmod p\}=\{1, -1\}$ is to use the fact that $\{1, -1\}$ is the only subgroup of the cyclic group of primitive residue classes modulo $p$ that has the order 2. Is there a more basic way to prove this?

$$x^2\equiv1\mod p\iff p\text{ divides }(x-1)(x+1)$$
But a prime divides a product if and only if it divides one of the two factors.
