[Math] Solve the system of congruences

elementary-number-theory

The system of congruences are as follows: $$3x \equiv 2 \, \text{mod 4}\\ 4x \equiv 1 \, \text{mod 5}\\ 6x \equiv 3 \, \text{mod 9}$$

Now, the idea is to of course find the inverse of each congruence and reduce it to a form where the Chinese Remainder Theorem can be applied: $$3x \equiv 1 \, \text{mod 4} \ \Leftrightarrow x \equiv 3 \, \text{mod 4}$$ i.e. the inverse of $3$ modulo $4$ is $3$. Also, $$4x \equiv 1 \, \text{mod 5} \ \Leftrightarrow x \equiv 4\, \text{mod 5}$$ i.e. the inverse of $4$ modulo $5$ is $4$. But with the last congruence, $(6,9)=3$ and so $6$ doesn't have an inverse modulo $9$. Does this mean the system of congruences does not have a solution?

Best Answer

$x\equiv 6 \mod{4} \Longrightarrow $ $x=4k+6$ for $k\in \mathbb{Z}$
$4\cdot (4k+6) \equiv 1 \mod{5} \Longrightarrow (4k+6)\equiv 4 \mod{5} \Longrightarrow$
$4k\equiv 3 \mod{5} \Longrightarrow k\equiv 2\mod{5}$,

So $k=5m+2$ for $m\in \mathbb{Z}$
$6\cdot (5m+2) \equiv 3 \mod{9} \Longrightarrow 30m\equiv 0\mod 9 \Longrightarrow m=9t$ for $t\in \mathbb{Z}$
So $k= 45t+2 \Longrightarrow x=180t +14.$

Explicitly, $$ x\equiv 14 \mod{180} $$ Should end up being your solution.


If you want to reduce the system and apply the CRT, the reduced system is: \begin{align*} & x\equiv 3 \mod{4}\\ & x\equiv 4\mod{5}\\ &x \equiv 8\mod{9}\\ \end{align*} This is because, $6x\equiv 3 \mod{9} \Longleftrightarrow x\equiv 8\mod{9}$.
Note that since $4,5,9$ are pairwise coprime, there is a solution guaranteed by the CRT.

Related Question