How do you solve $x^2 - 4 \equiv 0 \mod 21$

1k Views Asked by At

There is an example in my textbook of how you solve: $$ x^2 -4\equiv 0 \mod 21 \Leftrightarrow x^2-4\equiv 0 \mod 3 \times 7$$ and then 2 congruences can be formed out of this equation if: $$x^2-4\equiv0 \mod 3 \\ x^2-4 \equiv 0 \mod 7$$ and from these 2 congruences result 2 more congruences, for each: $$x - 2 \equiv 0 \mod 3 \Rightarrow x_1 = 2\\ x + 2 \equiv 0 \mod 3 \Rightarrow x_2 = 1\\ x - 2 \equiv 0 \mod 7 \Rightarrow x_3 = 2\\ x + 2\equiv 0 \mod 7 \Rightarrow x_4 = 5$$

and then 4 systems of linear congruences are formed: $$\begin{cases} x \equiv 2 \mod 3 \\ x \equiv 2 \mod 7\end{cases}$$ $$\begin{cases} x \equiv 2 \mod 3 \\ x \equiv 5 \mod 7\end{cases}$$ $$\begin{cases} x \equiv 1 \mod 3 \\ x \equiv 2 \mod 7\end{cases}$$ $$\begin{cases} x \equiv 1 \mod 3 \\ x \equiv 5 \mod 7\end{cases}$$

What is the purpose of these systems? I already have the 4 solutions ($x_1, x_2, x_3, x_4$) of the congruence. Why do I need to form these systems?

2

There are 2 best solutions below

0
On BEST ANSWER

Your ‘4 solutions’ are not solutions modulo $21$, but pairs of solutions $\bmod3$ on one hand, $\bmod 7$ on the other hand.

From these pairs of solutions, you recover solutions modulo $3\times 7$ with the Chinese remainder theorem.

Start from the Bézout's relation $\;5\cdot 3-2\cdot 7=1$. Then the solution corresponding to the pair $(\color{red}1\bmod3,\color{red}5\bmod7)$, for instance, will be $$x\equiv\color{red}5\cdot5\cdot 3-\color{red}1\cdot2\cdot 7=61\equiv19\mod 21.$$

0
On

You need that $x^2\equiv 4\pmod{3}$ and $x^2\equiv 4\pmod{7}$. For instance, your $x_2=1$ doesn't satisfy $x_2^2\equiv 4\pmod{21}$.

You used or instead of and.