1

In $ \mathbb{Z}_p $ where $ p $ is prime, what is the number of roots of $ x^2+1\equiv 0 \mod p $?

Since $ x^2\equiv -1 \mod p $, then $ x^4\equiv 1 \mod p $ and we have $ 4 | \phi(p) $. If $ p=5 $, then $ 2,3 $ are two roots of $ x^2+1\equiv 0 \mod 5 $, but what are the situations for other prime $ p $ like $ p=13 $? we can't check that all by hand right? Or does it just depend without a generous law?

Bach
  • 5,730
  • 2
  • 20
  • 41

3 Answers3

4

$p=2$, one solution.

$p\equiv1\pmod 4$, two solutions.

$p\equiv3\pmod 4$, no solutions.

All introductory texts in number theory will give the proofs.

Angina Seng
  • 158,341
0

Supplement for L.S.t.U's answer:

Since $ x^2+1\equiv 0 \mod p $ for $ p>2 $ has at least one solution if and only if $ -1 $ is a quadratic residue mod $ p $, if and only if the Legendre symbol $ \left(\frac {-1}p \right )=1 $, if and only if $ p\equiv 1\mod 4 $.

$ x^2+1\equiv 0 \mod p $ for $ p>2 $ has no solution if and only if $ -1 $ is an non-quadratic residue mod $ p $, if and only if $ \left( \frac {-1} p\right)=-1 $, if and only if $ p\equiv -1 \mod p $.

For $ p=2 $, there is one solution $ x\equiv 1 \mod 2$.

Bach
  • 5,730
  • 2
  • 20
  • 41
0

Explicitly, when $p \equiv 1 \bmod 4$, the solutions of $x^2 \equiv 1 \bmod p$ are $\pm \left(\frac{p-1}{2}\right)!$. See here.

lhf
  • 216,483