Why does the equation $x^2\equiv2 \pmod 5$ have no solutions? Why does the equation $x^2\equiv2 \pmod 5$ have no solutions?
I did a remainders table and found that $$x^2\equiv0;1;4\pmod 5$$
But is there any way to justify this besides that?
The original equation was $2x^2\equiv9\pmod 5$ but I got it to the form above.
 A: You did: $\,{\rm mod}\ 5\!:\ x\equiv 0,\pm1,\pm2\,\Rightarrow\, x^2\equiv 0,\pm1\not\equiv 2,\,$ a modular brute-force case analysis.
Without brute force: $\,{\rm mod}\ 5\!:\,\ 2\equiv x^2\,\overset{\rm square}\Rightarrow\, 4\equiv x^4\overset{\rm Fermat}\equiv 1,\,$ contradiction.
Remark $ $ The latter generalizes: it is the easy necessary direction of Euler's Criterion, which we summarize below, highlighting the analogy between the simpler additive and multiplicative forms. Note in particular the analogy $\, \color{#c00}n\cdot x\, \leftrightarrow\, x^\color{#c00}n$ between $\color{#c00}n$'th multiples and $\color{#c00}n$'th powers below.
$$\begin{align}&\bmod  k\color{#c00}n\!:\qquad\ \ \,\overbrace{\exists\, a\!:\ x \equiv  \color{#c00}na}^{\large x\:\!\ \text{an $\color{#c00}n$'th multiple}}\!\!\! \Rightarrow\,  kx\equiv 0\ \ {\rm by}\ \ kx \equiv  kna \equiv 0\cdot a \equiv 0\\[.2em]  
&\bmod  p\!=\!k\color{#c00}n\!+\!1\!:\,  \underbrace{\exists\, a\!:\ x \equiv a^{\large \color{#c00}n}}_{\large x\:\!\ \text{an $\color{#c00}n$'th power}} \Rightarrow\, x^{\large k} \equiv  1\ \ {\rm   by}\ \ x^{\large k} \equiv\,  a^{\large nk}\! \equiv \underbrace{a^{\large p-1}\! \equiv 1}_{\rm Fermat} \\[.4em]
{\rm e.g.}\ \ &\bmod  2\cdot \color{#c00}5\!:\quad\ \ x\,\text{ is a multiple of $\,\color{#c00}5\,$}\,\Rightarrow 2x\equiv 0\\[.2em]  
&\bmod  2\cdot\color{#c00}5\!+\!1\!:\  x\,\text{ is a $\color{#c00}{\rm fifth}$'th power}\Rightarrow x^2\equiv 1 \end{align}\qquad$$
This analogy will become much clearer if you study the (simple) structure of cyclic groups.
A: Only half of the non-zero elements of the integers mod $p$, where $p>2$ is prime, can have square roots, because the squaring function $x\mapsto x^2$ is a two-to-one function: $x$ and $-x$ both have the same square.
A: Observe that any integer can be expressed in the form: $x = 5n+r, 0 \leq r \leq 4$. Thus squaring $x$: $x^2 - 2 = (5n+r)^2 - 2 = 25n^2+10nr+r^2-2 = r^2-2 \pmod 5$.But $r^2-2 \neq 0 \pmod 5$ for the choices of $r$ above: $0,1,2,3,4$, and this means $x^2 = 2\pmod 5$ has no solution.
A: For a high level answer, by one of the supplements to quadratic reciprocity, if $p$ is an odd prime, then $2$ is a square mod $p$ $\iff$ $p \equiv 1,7 \pmod{8}$, which $5$ is not. 
A: The best way is what you have done.


*

*First note that given any $x$, we have


$x\equiv 0\pmod5 \text{ or }x \equiv 1\pmod5 \text{ or }x \equiv 2\pmod5 \text{ or }x \equiv 3\pmod5 \text{ or }x \equiv 4\pmod5$


*Next note that if $x \equiv y\pmod{n}$, then $x^2 \equiv y^2\pmod{n}$. Hence, we have that


*

*If $x \equiv 0 \pmod5$, then $x^2 \equiv 0^2 \pmod5 \equiv 0 \pmod5$.

*If $x \equiv 1 \pmod5$, then $x^2 \equiv 1^2 \pmod5 \equiv 1 \pmod5$.

*If $x \equiv 2 \pmod5$, then $x^2 \equiv 2^2 \pmod5 \equiv 4 \pmod5$.

*If $x \equiv 3 \pmod5$, then $x^2 \equiv 3^2 \pmod5 \equiv 4 \pmod5$.

*If $x \equiv 4 \pmod5$, then $x^2 \equiv 4^2 \pmod5 \equiv 1 \pmod5$.



Hence, we can only have $x^2 \equiv 0,1,4\pmod5$.
A: If $y\equiv 2 \mathrel{\rm{mod}} 5$, then $y$'s last digit is a 2 or a 7.  No square can have last digit $2$ or $7$.
