# How to check if $2$ is a square $\mod 3$?

I don't think I can use the Legendre or Jacobi symbol here because $2$ is an even prime. I'm not sure I've learned methods to deal with $2$ even though I know how to use quadratic reciprocity, it only works with odd numbers I think.

• $0^2\equiv0\pmod3$, $1^2\equiv1\pmod3$, $2^2\equiv1\pmod3$ – egreg Apr 2 '15 at 16:33
• Maybe you're looking for a method for deciding whether $2$ is a square mod $p$, where $p$ is an arbitrary odd prime, because the $p=3$ case is just trivial. – egreg Apr 2 '15 at 16:35
• I see a pattern that every square is either $0$ or $1$ $\mod 3$, but I don't know how to prove that every square number is either $0$ or $1$ $\mod 3$. – mr eyeglasses Apr 2 '15 at 16:40
• That's quite unusual.Attempting to understand quadratic reciprocity without mastering basic modular arithmetic or congruences is an extreme example of trying to run before one learns how to walk! – Bill Dubuque Apr 2 '15 at 18:46
• In any case, I strongly recommend that you master such before tackling more advanced topics. There are many answers here that will aid learning: simply type "mod" in the site search box. – Bill Dubuque Apr 2 '15 at 18:57

## 2 Answers

In a more general context $2$ is a square mod $p$ where $p$ is an odd prime if and only if :

$$\begin{pmatrix}2\\p\end{pmatrix}=(-1)^{\frac{p^2-1}{8}}\text{ is } 1$$

In your case, because $3^2-1=9-1=8$ the answer is no.

• $2$ is a square mod $p$ when $p=2$ (ducks) – Henry Apr 2 '15 at 16:39
• I wanted my answer to be complete and I forgot to mention this case... I am confused, thank you... – Clément Guérin Apr 2 '15 at 16:40

$0^2 = 0 \equiv 0 \pmod3$

$1^2 = 1 \equiv 1 \pmod3$

$2^2 = 4 \equiv 1 \pmod3$

So, no.

• I don't see how this proves that $2$ is not a square ($\mod 3$). What is the justification for not having to check every square number $\mod 3$? – mr eyeglasses Apr 2 '15 at 16:37
• @EYES, what other numbers exist mod 3? 0,1, and 2 are the only numbers here. – JB King Apr 2 '15 at 16:38
• @ᴇʏᴇs $(3n+k)^2 = 3(3n^2+2k)+k^2 \equiv k^2 \pmod3$ so you do not have to look at any more – Henry Apr 2 '15 at 16:41
• @ᴇʏᴇs $(3n + k)^2$ represents the square of a number $k$ more than a multiple of $3$. Modulo $3$ this square is equivalent to $k^2$, as I have shown in my comment, and $k^2$ is equivalent to $0$ or $1$ as I have shown in my answer. – Henry Apr 2 '15 at 16:46
• If you wanted to say $k$ was $3$ like $3n + 3$, for example, then I could just call that number $3(n+1) + 0$ and so Henry's argument still applies. If you wanted to tell me that $k$ was $43$, as in $3n + 43$, then I could just write $3(n+14) + 1$. The only possible remainders when dividing by $3$ are $0,1,2$. The fact is that every single integer is of the form $3n$, $3n + 1$, or $3n + 2$. There are no other possibilities. – Jonathan Hebert Apr 2 '15 at 17:05