0

Recently, I stumbled upon this problem, Solve $x^2$ $mod$ $23 = 7^2$, both here at MSE and somewhere surfing the web. I tried to solve it but don't know how. Although I can't remember where I found it, I doremember the question saying to solve the equation for $x$ rather than to determine whether some sort of solution existed. So by that, I presume that there is a such solution that I am not seeing.

I tried the following: $1^2$ mod $23$, $2^2$ mod $23$, $3^2$ mod $23$, $...$ , $22^2$ mod $23$. Following this procedure did not yield an answer of $49$. Can anyone show me how a solution is determined because it has been over 2 days and it is driving me crazy from my inability to see the solution.

  • 1
    My advice is that you should familiarize yourself with the difference between binary mod that calculates the remainder of integer division, and modular arithmetic. Whenever an algebraist write mod the latter is meant almost always (and $x^2\equiv7^2\pmod {23}$ surely has solutions $x\equiv\pm7$). Many programmers have note heard of the latter meaning, and only know of the remainder operation. $a\bmod b$ that returns an integer with absolute value less than $|b|$. – Jyrki Lahtonen Dec 10 '13 at 04:41

2 Answers2

2

Taking a modulus like $23$ means that the result class should be considered as well as the variable's class. So we have $7^2\equiv 3\pmod{23}$ and thus you are looking for numbers $x$ such that $x^2\equiv 3\pmod{23}$. One such number will be $7$ due to the nature of the modular equation. We also know that $(-1)^2=1$. Putting these two together, we get $(-7)^2=7^2\equiv 3\pmod{23}$. Then we consider the class of $-7\pmod{23}$, which is the same class as $16\pmod{23}$.

Moving in reverse, we have identified that $16^2\equiv 7^2\equiv 3\pmod{23}$. Rewriting as an equation, we have $16^2+a\cdot 23=7^2+b\cdot 23=3$, yielding $a=-11,b=-2$. Then we can state that $16^2=256=207+49\equiv 49+0=3+46\pmod{23}$. This is the case since $49$ and $3$ are in the same class modulo $23$.

abiessu
  • 8,115
1

$7^2\equiv x^2 \text { mod } 23$ i.e., $23$ divides $x^2-7^2$ i.e., $23$ divides either $x+7$ or $x-7$

Suppose it divides both :

$23=(x+7)k=(x-7)l=kx+7k=lx-7l\Rightarrow x(k-l)=-7(k-l)\Rightarrow x=??$

Suppose it divides only one :

$23=(x+7)k\Rightarrow k=\pm1,\pm23\Rightarrow x=??$

$23=(x-7)k\Rightarrow k=\pm1,\pm23\Rightarrow x=??$