# Math Help - quadratic congruence

If p is an odd prime, what are the two solutions to x^2 == 4 (mod p) in the set {1, 2, 3, ..., p-1}?

2. Originally Posted by tarheelborn
If p is an odd prime, what are the two solutions to x^2 == 4 (mod p) in the set {1, 2, 3, ..., p-1}?
If $p$ is odd, then $2^2 \equiv 4 \mod{p}$ and $(-2)^2\equiv(p-2)^2\equiv4\mod{p}$.

So our solutions are $x=2,p-2$.

3. What if p=3? Isn't that different?

4. Originally Posted by tarheelborn
What if p=3? Isn't that different?
Nope, $2,3-2=1$ are solutions.