$x^2+1=0$ in $\mathbb{Z}_7$

146 Views Asked by At

$x^2+1=0$ in $\mathbb{Z}_7$

By trying each number, I see that there is no solution, is this correct?

And could you help me with a more direct solution, since this method is not going to work for $\mathbb{Z}_p$ when $p$ is a large prime number .

Thank you very much!

2

There are 2 best solutions below

3
On BEST ANSWER

It is a standard theorem proved early in the study of quadratic congruences that the congruence $x^2+1\equiv 0\pmod{p}$ has a solution if the prime $p$ is of the form $4k+1$, and has no solution if $p$ is of the form $4k+3$.

0
On

Maybe a more general solution: Euler gave the characterization that $a$ is a "square" mod $p$ with $p$ prime if and only if $a^\frac{p-1}{2} \equiv 1\ \text{mod}\ p$. In your example you'd see that $(-1)^\frac{7-1}{2} = (-1)^3 = -1 \not\equiv 1\ \text{mod}\ 7$.

Of course, working out this power isn't as easy for much larger $p$: for that, you should check out quadratic reciprocity.