Prove that if $p$ divides $a^2+b^2$ , then $ p \equiv \ 1 \pmod 4$.
I know that both $a$ and $b$ are coprimes with $p$ but i dont know what to do next.
Prove that if $p$ divides $a^2+b^2$ , then $ p \equiv \ 1 \pmod 4$.
I know that both $a$ and $b$ are coprimes with $p$ but i dont know what to do next.
$b$ is invertible $\bmod p$, i.e., there is $c$ with $bc\equiv 1\pmod p$. Then $(ac)^2+1=c^2(a^2+b^2)\equiv 0\pmod 4$. Can you take it from here?