Let $p$ be an odd prime and $k$ a positive integer such that $\gcd(p,k)=1$. Show $x^2\equiv k \bmod p$ has zero or two incongruent solutions.
I think we are supposed to assume that $x$ is a solution, and that $y$ is also a solution where $y$ does not equal $x$. Then show $y \equiv -x \bmod p$
Any help? Thanks!
If $\;a\;$ is a solution, then also $\;-a\;$ is, and
$$a=-a\pmod p\iff 2a=0\pmod p$$
But $\;p\neq 2\;$ and also $\;a\neq 0\pmod p\;$ , otherwise $\;a^2=0=k\pmod p\;$ , contradicting $\;(k,p)=1\;$ .