5

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.

VividD
  • 15,966
YoTengoUnLCD
  • 13,384
  • 3
    For $5$, your way is best. By the way, there is a not very hard to prove general theorem that $2$ is a quadratic residue of the odd prime $p$ if and only if $p\equiv \pm 1\pmod{8}$. – André Nicolas May 01 '15 at 01:05

7 Answers7

7

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}\Longrightarrow\, 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 (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).

$$\begin{align}&\bmod \color{#0a0}k\:\!\color{#c00}n\!:\qquad\ \ \,\overbrace{\exists\, a\!:\ x \equiv \color{#c00}na}^{\large x\:\!\ \text{an $\color{#c00}n$'th multiple}}\!\!\! \Rightarrow\, \color{#0a0}kx\equiv 0\ \ \,[\:\!{\rm by}\ \ kx \equiv kna \equiv 0\cdot a \equiv 0\:\!]\\[.3em] &\bmod p\!=\!\color{#0a0}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\color{#0a0} k} \equiv 1\ \ [\:\!{\rm by}\ \ x^{\large k} \equiv\, a^{\large nk}\! \equiv \underbrace{a^{\large p-1}\! \equiv 1}_{\rm Fermat},\ {\rm by}\,\ x\not\equiv 0\:\!] \\[.6em] {\rm e.g.}\ \ &\bmod \color{#0a0}2\cdot \color{#c00}5\!:\quad\:\!\ \ x\,\text{ a $\,\color{#c00}5$'th mult.}\:\!\ \Rightarrow\, \color{#0a0}2x\equiv 0\\[.3em] &\bmod \color{#0a0}2\cdot\color{#c00}5\!+\!1\!:\ x\,\text{ a $\,\color{#c00}{5}$'th power}\Rightarrow\, x^{\large \color{#0a0}2}\!\equiv 1,\ {\rm by}\,\ x\not\equiv 0\end{align} $$

This analogy will become much clearer upon study of the (simple) structure of cyclic groups.

Bill Dubuque
  • 272,048
  • 1
    $,\ 2\equiv x^2,\overset{\rm square}\Rightarrow, 4\equiv x^4,\overset{\rm Fermat}\Rightarrow, 4\equiv 1,,$ is imho better cleaner way to write it – VividD May 01 '15 at 07:05
  • @VividD It is important to condense arguments into conceptual chunks, Just as for equalities, exploiting transitivity helps much in that regard, and may better reflect the conceptual inferences involved. This may require a little more effort when one is first learning, but it will become subconscious once one has more practice. – Bill Dubuque May 01 '15 at 12:28
3

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.

  • Excuse me, could you elaborate a bit? I'm having trouble understanding the relation of between $x^2$ being a two-to-one function and the integer roots – YoTengoUnLCD May 01 '15 at 02:09
  • 1
    @YoTengoUnLCD : Suppose, for example, that $p=13$. Then there are $12$ members of this field other than $0$, and we can call those $1,2,3,\ldots,12$, or we can call them $\pm1, \pm2, \pm3, \pm4, \pm5, \pm6$ (since $12$ is the same as $-1$, $11$ is the same as $-2$, etc.). We have $1^2=(-1)^2 = 1$, $2^2 = (-2)^2 = 4$, $3^2=(-3)^2=9$, $4^2=(-4)^2=3$, $5^2 = (-5)^2 = 12$, $6^2=(-6)^2 = 10$. There we have all of the nonzero squares: $1,4,9,3,12,10$, which is the same as $\pm1,\pm4,\pm3$. Only six of the $12$ nonzero elements can be squares, so the other six must be non-squares. ${}\qquad{}$ – Michael Hardy May 01 '15 at 02:54
  • 1
    Let's also try it with $p=11$. The nonzero elements are $\pm1,\pm2,\pm3,\pm4,\pm5$. There are $10$ of them. Squaring them, we get $(\pm1)^2=1$, $(\pm2)^2=4$, $(\pm3)^2=9$, $(\pm4)^2=5$, $(\pm5)^2=3$. The squares are then $1,4,9,5,3$, which are the same as $1,3,\pm4,5$. There are five of them, i.e. exactly half of the $10$ nonzero elements are squares. Thus the other five must be non-squares. ${}\qquad{}$ – Michael Hardy May 01 '15 at 02:58
  • Oh I get it! Thank you so much, I had not realized this. Very thorough explanation :). – YoTengoUnLCD May 01 '15 at 16:26
1

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$.

ncmathsadist
  • 49,383
1

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.

DeepSea
  • 77,651
1

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.

Spooky
  • 741
0

The best way is what you have done.

  1. 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$

  1. 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$.

Adhvaitha
  • 20,259
0

Since this answer does not directly use Fermat's little theorem (see Bill Dubuque's answer), I'm including it for pedagogical reasons and marked it Community wiki.

It is elementary to show that $(\mathbb{Z}/5\mathbb{Z})^\times$ is a group with four elements.

For any $x \in (\mathbb{Z}/5\mathbb{Z})^\times$, the set
$\quad \{x,x^2,x^3,x^4\}$
forms a group with $1$, $2$, or $4$ elements with $x^4 = 1$.

If $x^2 = 2$, then $(x^2)^2 = 4$, but also $x^4 = 1$, a contradiction.

CopyPasteIt
  • 11,366