I need help proving the following:
Let p be an odd prime and a be any integer which is not congruent to 0 modulo p. Prove that the congruence $x^2 ≡ -a^2 (\mod p)$ has solutions if and only if $p ≡ 1 (\mod 4)$.
I am not really sure where to start.
Thanks in advance!
Well, since you know what I asked in the comments, then
$$x^2=-a^2\pmod p\stackrel{\text{divide in both sides by}\;a}\iff \left(\frac xa\right)^2=-1\pmod p$$
and now complete the argument. (In the above, we certainly assume $\;a\neq0\pmod p\;$, as given... ptherwise it is trivial)