0

When i look at my notes , i realized something i have not realized before.It was as to a modular arithmetic question.

The question is ${\sqrt 2} \pmod7$

It is very trivial question.The solution is: if $x \equiv {\sqrt 2} \pmod7$ ,then $x^{2} \equiv ({\sqrt 2})^{2} \pmod7$

$\therefore x^{2} \equiv 2 \pmod7$ and $x=+3,-3,+4,-4$

However, there is something which i stuck in it. How can we work with ${\sqrt 2}$ , because we know the definition of modular arithmetic.It says that

$a \equiv b \pmod m$ where $a,b$ are integers and $m$ is positive integer.I think that ${\sqrt 2}$ contradicts with the definiton of modular arithmetic because it is not an integer.

Can you enlighten me? What am i missing ?

NOTE:Someone might suggest that when you take exponential of both side , ${\sqrt 2}$ turned out to be an integer.

My answer to this question:Yes it turned out to be an integer but in order to take exponential of ${\sqrt 2}$ , it must be an integer because definition says that $a^{e} \equiv b^{e} \pmod m$ where $a,b$ are integers and $m,e$ are positive integers.

2 Answers2

4

$\sqrt{2}$ is defined to be "a number that when you multiply it by itself, gives you $2$". In each field, the definition of "multiply" might be different and hence this number can be different (or it might not exist). In your example, $\sqrt{2}$ is a$^*$ number in $Z_7$, not to be confused with $1.41\ldots$.

Edit: $^*$Actually, there are two such numbers, and "the square root of..." is not well defined here (as it is in $\mathbb{R}$) to be the positive number one.

YJT
  • 4,621
  • 2
    "$\sqrt{2}$ is a number in $\Bbb Z_7$". Well, actually it's two of them. So it's not well defined, until you chose which. Like for $\sqrt{x}$ for $x\in\Bbb R$. It's not either an integer, but an element of a finite field. – Jean-Claude Arbaut Sep 10 '20 at 10:22
  • @Jean-ClaudeArbaut indeed. Didn't want to get into this detail as it moves away the focus from the misunderstanding in the OPs question. Editing now to be more precise. – YJT Sep 10 '20 at 10:26
  • 1
    As a side note, with this interpretation of square roots, the quadratic formula works just fine to solve quadratic equations modulo a prime, as long as you are allowed to divide by 2 (and presumably the cubic and quartic formulae under similar restrictions). – Arthur Sep 10 '20 at 10:30
  • @YJT thanks for elegant explanations –  Sep 10 '20 at 10:33
  • 1
    Your edit shows precisely why I dislike this notation in $\mathbb{F}_p$. To me it feels like it should mean that there is a canonical choice of "positive" square-root as in $\mathbb{R}$. Which is of course rubbish. – Mummy the turkey Sep 10 '20 at 10:37
  • 1
    @Mummytheturkey For the same reason I dislike using square roots on complex numbers. It's somewhat justified in things like the quadratic formula, where you have $\pm\sqrt{\phantom a}$ anyways. – Arthur Sep 10 '20 at 11:37
  • There can be more than two square roots for non-prime moduli - see my comment on Crostful's answer. – Bill Dubuque Sep 10 '20 at 20:46
2

You are working in the field of numbers modulo $7$, namely $\Bbb Z / (7)$ which is often denoted by $\Bbb F_7$.

Now, $2$ is an element of $\Bbb F_7$. Another element $x \in \Bbb F_7$ is said to be a square root of $2$ if $x^2 = 2 \pmod 7$.

It happens that theoretically $2$ may have two square roots or none. This means that it it does not make sense to talk about "the square root of $2$", since it may not exist, or there may be more than one.

The two square roots of $2$ in $\Bbb F_7$ are $3$ and $4$ (which is $-3$), since their square is $2 \pmod 7$. This can be written using the notation $$\sqrt 2 = \pm 3 \pmod 7$$ which is equivalent to say that $$2 = ( \pm 3)^2 \pmod 7$$

However this is just notation, it has nothing to deal with the real number $\sqrt 2 \in \Bbb R$.

Crostul
  • 36,738
  • 4
  • 36
  • 72
  • thanks for elegant explanations –  Sep 10 '20 at 10:33
  • when you wrote ${\sqrt 2}= \pm3 (mod7)$ ,did you mean ${\sqrt 2} \equiv \pm3 (mod7)$ –  Sep 10 '20 at 12:29
  • @martinscott Yes, for me they are equivalent ways of to write the same concept. – Crostul Sep 10 '20 at 19:33
  • @martinscott Beware there can be more than two square roots $!\bmod n,$ if $n$ is not prime, e.g. $!\bmod n!=!7\cdot 23, $ note $,2,$ has four sqrts: $,\pm18,,\pm74, \equiv, \mp(3,5),,\pm(-3,5)\bmod{(7,13)},$ by CRT combining the roots $,\pm3 \bmod 7,$ and $,\pm 5\pmod{!23}.\ $ – Bill Dubuque Sep 10 '20 at 20:43