Confused as to why $x^2 \equiv 1 \pmod p$ has at most 2 solutions when $p$ is an odd prime

61 Views Asked by At

I'm sure this is a syntactic thing, but I've been reading on elementary number theory and don't understand(need clarification) on why my book says that there are only 2 solutions to $x^2 \equiv 1 \pmod p$. It follows that: $$x^2 \equiv 1 \pmod p \implies x \equiv \pm 1 \pmod p$$ But are there are not infinitely many $x$ that satisfy this property? Or is it standard practice to only care about solutions in the domain $0 \leq x < p$?

1

There are 1 best solutions below

1
On BEST ANSWER

There are only $2$ equivalence classes modulo $p$ that produce the result.

$$x^2\equiv 1\pmod p\to x^2-1\equiv 0 \pmod p\to (x+1)(x-1)\equiv0 \pmod p$$

So solutions belong to the $2$ equivalence classes:

$$ 1+kp, (p-1)+kp$$

for $k\in\mathbb{Z}$.