Question:
Show the equation $x^2+y^2 \equiv1\pmod p$ has $p-1$ solutions if $p \equiv1\pmod4$, and $p+1$ solutions if $p \equiv 3\pmod4$
I'm really stuck on this one. Any help would be highly appreciated.
Question:
Show the equation $x^2+y^2 \equiv1\pmod p$ has $p-1$ solutions if $p \equiv1\pmod4$, and $p+1$ solutions if $p \equiv 3\pmod4$
I'm really stuck on this one. Any help would be highly appreciated.
If $p$ is a prime of the form $4k+1$,
Let $r$ be a primitive root mod $p$ (which can be proven by various means)
Let $i = r^k$
$i^2 = r^{2k} = -1$ (mod $p$) because $(i^2)^2 = r^{p-1} = 1$ (mod $p$)
If $1 = x^2-(iy)^2 = (x+iy)(x-iy)$,
Let $a = x+iy$
$x = (a+a^{-1})2^{-1}$
$y = (a-a^{-1})(2i)^{-1}$
Therefore there is a bijection between $\{ (x,y) : x^2+y^2 = 1 \space(\text{mod } p)\}$ and $\{ a : a \in [1..p-1] \}$
If $p$ is a prime of the form $4k+3$,
I can't prove it.