Why does this imply a congruence does not exist?

113 Views Asked by At

Consider

$$kx \equiv a \bmod M$$

Where $x,a,M$ are known, solving for $k$. Let $g = \gcd(M,x)$. Why is it the case that if $g$ does not divide $a$, there is no solution?

1

There are 1 best solutions below

5
On BEST ANSWER

If the solution exists, the congruence can be rewritten as $kx-a=Mj$ for some integer $j$. This implies $kx-Mj=a$. The left side is divisible by $g$. So for the equality to hold right side must also be divisible by $g$.