Prove $\left( \dfrac{-1}{p}\right) = (-1)^{\frac{p-1}{2}}$, where $p$ is an odd prime, and the LHS is the legendre symbol.
I've got $-1 = x^2 \pmod p \implies (-1)^{\frac{p-1}{2}} = x^{p-1} = 1 = \left( \dfrac{-1}{p}\right)$. Now suppose that $-1$ is not a quadratic residue modulo $p$. Then if $(-1)^{\frac{p-1}{2}} = 1$ we have that $\frac{p-1}{2} = 2k$ for some $k$ as otherwise it would equal $-1$, but $p$ is an odd prime and $-1 \neq 1$. That doesn't seem to help us though. Any ideas?
Thanks.
Say $(a,p) = 1$, where $p$ is odd prime. We have that, $$ (a/p) \equiv (-1)^{(p-1)/2} ~ (p) $$