# If $(\frac {-1}{d}) = 1$, does it mean that $-1$ is a square in $\mathbb {Z}/d\mathbb{Z}$?

Suppose that $d$ is a positive odd integer such that the Jacobi symbol $(\frac {-1}{d}) = 1$. Is $−1$ necessarily a square in $\mathbb {Z}/d\mathbb{Z}$? Either give a proof, or provide a counter-example.

I think it is absolutely a square, but I'm not sure how to prove it.

I know that because of Quadratic Reciprocity, is for some odd positive integer $b$ it is the case that $\frac {-1}{b} = 1$, then $b$ is congruent to $1$ (mod $4$). Then $d$ is congruent to $1$ mod ($4$) and is a square in $\mathbb {Z}/d\mathbb{Z}$. Is this reasoning all correct?

• Lol do you mean the Chinese remainder theorem? – Brandon Thomas Van Over Oct 26 '15 at 8:01
• Yes, my bad, I fixed it – Jimm Oct 26 '15 at 8:02

$\newcommand{\jac}{\left( \frac{#1}{#2} \right)}$Consider $d = 3 \cdot 7 = 21$. Then $$\jac{-1}{21} = \jac{-1}{3} \cdot \jac{-1}{7} = \dots$$
Note that $-1$ is not a square modulo $3$ nor $7$. Can it be a square modulo $21$?
Let $n = p_1^{\alpha_1}p_2^{\alpha_2}\dots p_n^{\alpha_n}$ be odd. For each prime, $\Big(\frac{-1}{p_i}\Big) \in \{-1,1\}$ and $$\Big(\frac{-1}{n}\Big)=\Big(\frac{-1}{p_1}\Big)^{\alpha_1}\Big(\frac{-1}{p_2}\Big)^{\alpha_2}\dots\Big(\frac{-1}{p_n}\Big)^{\alpha_n}$$ If $\alpha_i$ is even, $\Big(\frac{-1}{p_i}\Big)^{\alpha_i} = 1$. And if $-1$ is quadratic nonresidue modulo $p_i, p_j$, with $\alpha_i,\alpha_j$ odd, still $\Big(\frac{-1}{p_i}\Big)^{\alpha_i}\Big(\frac{-1}{p_j}\Big)^{\alpha_j} = 1$.
Therefore, $\Big(\frac{-1}{n}\Big) = 1$ doesn't imply $-1$ is a quadratic residue modulo $p_i$, and by the Chinese remainder theorem, modulo $n$.
• If in my original question $d$ were a prime odd integer, then it would be true, right? – Jimm Oct 26 '15 at 13:40
• @Jimm Yes. If $d$ is an odd prime, then $\Big( \frac{-1}{d}\Big) = 1$ means $-1$ is a square in $\mathbb{Z}/d\mathbb{Z}$. Moreover, $\Big( \frac{-1}{d}\Big) = 1$ if and only if $d \equiv 1 \mod 4$ by quadratic reciprocity. – Weaam Oct 26 '15 at 13:56