5

How do we solve quadratic congruences such as:

$x^2 \equiv11 \pmod{39}$

I know I must use the chinese remainder theorem with $p = 13, 3$ but I've only done linear examples and am unsure about how to do quadratic ones.

NECing
  • 4,095
Benzne_O
  • 847

3 Answers3

17

$$x^2 \equiv 11 \pmod{39} \implies x^2 \equiv 2 \pmod 3 \implies \text{No solution}$$


EDIT

In general, when you want to solve for $$x^2 \equiv a \pmod n \,\,\, (\spadesuit)$$ and if $n = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k}$, the idea is to first solve for $$x^2 \equiv a \pmod {p_l^{a_l}} \,\,\, (\clubsuit)$$ You have a solution for your original problem $(\spadesuit)$ iff you have a solution for each $l \in \{1,2,\ldots,k\}$ in $(\clubsuit)$. Once you find solution for each $l$ in $(\clubsuit)$, put them together using Chinese Remainder theorem.

For instance, if you have $x^2 \equiv 23 \pmod {77}$, then we need to look at $x^2 \equiv 23 \pmod 7$ and $x^2 \equiv 23 \pmod{11}$ i.e. $x^2 \equiv 2 \pmod 7$ and $x^2 \equiv 1 \pmod{11}$. $$x^2 \equiv 2 \pmod7 \implies x \equiv \pm 3 \pmod 7$$ Similarly, $$x^2 \equiv 1 \pmod{11} \implies x \equiv \pm 1 \pmod{11}$$

Hence, $$x \equiv 3 \pmod 7 \text{ and } x \equiv 1 \pmod{11} \implies x \equiv 45 \pmod{77}$$ $$x \equiv -3 \pmod 7 \text{ and } x \equiv 1 \pmod{11} \implies x \equiv 67 \pmod{77}$$ $$x \equiv 3 \pmod 7 \text{ and } x \equiv -1 \pmod{11} \implies x \equiv 10 \pmod{77}$$ $$x \equiv -3 \pmod 7 \text{ and } x \equiv -1 \pmod{11} \implies x \equiv 32 \pmod{77}$$

Hence, $$x \equiv \pm 10, \pm 32 \pmod{77}$$

  • missed by a few minutes :-) (+1) – robjohn Mar 19 '13 at 22:03
  • I guess I should have been more clear in the question, but I was sort of looking to understand the process a little more instead of just getting an answer. Is there any way you could help me understand how to approach these problems in general, say with an example that has a solution. I know $x^2 \equiv \space 23 \space mod \space 77$ has solutions if that would have been a better example. I'm just trying to understand these problems for a test I have coming up. – Benzne_O Mar 19 '13 at 23:41
  • @Benzne_O Added some more details. Is it of any help? –  Mar 19 '13 at 23:59
  • This is awesome! Thanks a lot – Benzne_O Mar 20 '13 at 01:17
  • @Benzne_O See here and here for more details on the "process" (lifting roots using CRT). – Bill Dubuque Dec 07 '21 at 02:52
1

I'm sorry for writting a little bit abstract, though it is not a big deal.

For any ring homormophism $\sigma:R_1\to R_2$ we can extend it to a more bigger ring homormophism $$\sigma' :R_1[x]\to R_2[x]\\a_{0}+a_{1}x+\dots +a_{n}x^n\mapsto\sigma (a_{0})+\sigma(a_1)x+\dots+\sigma(a_n)x^n$$ The reason for using almost same notation $\sigma$ here is that we can identify $R_{1}$ with constant term in $R_{1}[x]$ by so called dig and replace lemma so $\sigma'\lvert_{R_1}=\sigma$ .

Due to the definition of ring homormophism we would have $\sigma'(f(g))=\sigma'(f)(\sigma'(g))\forall f,g\in R_1[x]$. So particularly let $\deg g=0$ then $\deg f(g)=\deg f\cdot\deg g=0$ and hence first and third $\sigma' $ in the preceding formula will become $ \sigma$.

Now $0=\sigma'(f)(\sigma(g))=\sigma(f(g))$ will imply $f(g)\!\in\ker\sigma $. Of course, if you have $\sigma$ an isomorphism then $0=\ker\sigma$ i.e. $f(g)=0$, which means $\sigma'(f)$ having a solution $\sigma(g)$ implies the original polynomial $f$ having a solution $g \pmod{ \ker\phi}$,


now take $R_1=\mathbb Z,R_2=\mathbb Z_3\otimes\mathbb Z_{11}$. And by taking surjection (since $\ker \sigma _3$, $\ker \sigma _{11}$ are coprime)$ \sigma=(\sigma_3,\sigma_{11}):=x\mapsto (x+3\mathbb Z,x+11\mathbb Z)$ you will get a ring epimorphism, if you'd like a direct approach, you can take the quotient now, and have $\sigma:R_1/\ker \sigma =R_1/\ker\sigma_3\cap\ker\sigma_{11}=\mathbb Z/33\mathbb Z\simeq R_{2}=\mathbb Z_3\otimes\mathbb Z_{11}$ (I use same notation $\sigma$ here for convenience) then from above discussion relating to companying polynomial ring, you would know solving a polynomial problem $f(x)=0$ in $\mathbb Z/33\mathbb Z[x]$ is equivalent to solve $\sigma'(f)(x)=0$ in $\mathbb Z_3\otimes\mathbb Z_{11}[x]$. By the property of the "independently pointwise" ring structure of $\mathbb Z_3\otimes\mathbb Z_{11}[x]\simeq\mathbb Z_3[x]\otimes\mathbb Z_{11}[x]$ , it is equivalent to solve $\sigma _{3}(f)(x)=0,\sigma _{11}(f)(x)=0$ in $\mathbb Z_{3}$ and $\mathbb Z_{11}$ respectively


p.s. since it is an isomorphism, if you have $m$ and $n$ solutions independently in those direct summand ring, you will turn out have $m\cdot n$ solutions in the overall ring and hence ring $\mathbb Z/33\mathbb Z$

-1

$x^2\equiv11(\pmod{39}$

$39$ is a composite number $3\cdot13$

so now problem is :

$x^2\equiv11\pmod3$ and $x^2\equiv11\pmod{13}$.

if $x^2\equiv a\pmod{p}$ is a problem then it has solution if $a^{((p-1)/2)} \pmod {p}=1$

and have no solution if ^((p-1)/2) mod(p)=p-1 1)x^2=11mod(3) (p-1)/2=1 11^1 mod(3)=2=p-1 so no solution 2)x^2=11 mod(13) (p-1)/2=6 11^6 mod(13)=12=p-1 so no solution