Why does $x^2 \equiv 2 \pmod{5}$ have no solution?

1.4k Views Asked by At

Can someone explain why $x^2 \equiv 2 \pmod{5}$ has no solution other than trial and error?

So I've shown that modulo 5, we have $0^2 \equiv 0, 1^2 \equiv 1, 2^2 \equiv 4, 3^2 \equiv 4, 4^2 \equiv 1$ and I'm seeing that it doesn't look like there is a solution but what is the actual reason? Since I can't go through infinitely many numbers.

4

There are 4 best solutions below

0
On

Yes, because every integer is of one of the forms: $$5k,5k\pm1, 5k\pm2, k\in\Bbb Z$$ and we get:

$$(5k)^2=25k^2\equiv0\pmod5$$ $$(5k\pm1)^2=25k^2\pm10k+1\equiv1\pmod5$$ $$(5k\pm2)^2=25k^2\pm20k+4\equiv4\pmod5$$

None of these are $\equiv2\pmod5$, so no solutions exist

0
On

Since there are only 5 elements in ${\mathbb Z}_5$, we can just try all 5 of them: $0^2=0, 1^2=1, 2^2=4, 3^2=9\equiv 4\pmod{5}, 4^2=16\equiv 1 \pmod{5}$. So none of them when squared gives us $2 \pmod{5}$

0
On

You have already shown what you need. Every integer is of the form $0, 1, 2, 3$, or $4$ modulo $5$, and $0^2$ mod $5 = 0$, $1^2$ mod $5 = 1$, $2^2$ mod $5 = 4$, $3^2$ mod $5 = 4$, and $4^2$ mod $5 = 1$, so we know that there is no integer $x$ for which $x^2 \equiv 2(mod\;5)$ i.e. $x^2(mod\;5) \neq 2$ for all integers $x$.

0
On

Well every integer ends with 0 or 1 or 2 or...or 9.

So $x^2$ ends with 0 or 1 or 4 or 5 or 6 or 9,

so $x^2$ cannot be 2 modulo 5.