If $p>3$ what are two solutions of $x^2 ≡ 4 \pmod p$?

70 Views Asked by At

Theorem used: "Suppose that $p$ is an odd prime. If $p \nmid a$, then $x^2 ≡ a \pmod p$ has exactly two solutions or no solutions."

Question: If $p>3$ what are two solutions of $x^2 ≡ 4 \pmod p$?

Solution given in back: $2$ and $p-2$.

I am unable to figure out how we get this answer?

So far what I can think of is that: as $p>3$ and $p$ is a prime so $p$ must be $5$ or $7$ or $11$ something. So all of them are greater than $4$. So $x^2 ≡ 4 \pmod p$ must have solutions like $4$ and $p-4$. How can we get $2$ there?

3

There are 3 best solutions below

2
On BEST ANSWER

Since $2^2=4$, it's sure that $2^2\equiv 4\pmod p$ for any $p$.

Thus, by the theorem you're citing, there must be another solution; since $$ (-2)^2=4 $$ also $-2\equiv p-2\pmod p$ is a solution.

Note that $p-2\not\equiv 2\pmod{p}$. The condition $p>3$ is irrelevant, just that it's an odd prime suffices.

1
On

It means that p divides $x^{2}-4=(x-2)(x+2)$ since p is prime then $x-2 \equiv 0$ or $x+2 \equiv 0$ mod p. The result follows.

0
On

Hints

  • For the first equation if the $x^2\equiv a\mod p$ equation has a solution $x_1$ then any other solution must verify $x^2\equiv x_1^2 \mod p$ which implies $p$ divides $x^2-x_1^2=(x-x_1)(x+x_1)$ and hence $x=x_1$ or $-x=x_1$. finally if the equation have one solution then it has exactly two solutions.
  • For the second , observe that $x^2\equiv 4\mod p$ iff $p$ divides $x^2-4=(x-2)(x+2)$