3

In my notes it has a theorem, stating: $ax\equiv b\mod m$ has solutions if and only if $\gcd(a,m)|b$. The proof going from right to left is:

If $d=\gcd(a,m)$, $d|b \Rightarrow b=td$. We write $d=ra+sm$ for $r,s\in\mathbb{Z}$ so $b=t(ra+sm)=tra+tsm\equiv (tr)a\mod m$, so $x=tr$ is a solution.

Why is $x=tr$ a solution?

Napthus
  • 189
  • You might want to mention what $d$ is. –  Apr 20 '15 at 17:18
  • 2
    Because if your replace $x$ by the value $tr$ the equation $ax=b\mod m$ is satisfied so $x=tr $ is a solution – Elaqqad Apr 20 '15 at 17:19
  • The final equation is $\ b\equiv (\color{#c00}{tr})a\pmod m,,$ so $\ b \equiv \color{#c00}{x}a,$ has solution $,\color{#c00}{x \equiv tr}\ \ $ – Bill Dubuque Apr 20 '15 at 17:21

2 Answers2

2

You want to find $x$ such that $ax+km=b$ for some $k$.

$d=ra+sm$ is a divisor of $b=td$,

Since $tsm\equiv 0$ mod $m$, we see that $ra+sm\equiv ra$ mod $m$.

Therefore, as wanted, $ax=a(tr)\equiv b$ mod $m$.

neptun
  • 1,573
0

Viewed $\bmod m\,$ the proof amounts simply to the fact that multiples of $\,a\,$ are closed under scaling, i.e. $\,a\mid d\,\Rightarrow\, a\mid nd\,\pmod m.\,$ Eliminating the notion of $\rm\color{#0a0}{modular\ divisibility}\,$ it is more simply viewed as $\color{#c00}{\text{scaling}}$ the Bezout identity for the gcd, namely

$\qquad\qquad\begin{align} &\ \ \ \ \gcd(a,\ m)= d\\ \Rightarrow &\ \ \ \ \ \ ja\ +\ km=d\quad\ \text{by Bezout, for some } j,k\in\Bbb Z\\ \Rightarrow & \ \ \ nja + nkm= nd\ \ \ {\rm by}\ \color{#c00}{\text{scaling}}\ {\rm by}\ n\\ \Rightarrow &\ \ \ \color{#c00}{nj}a \equiv nd\!\!\!\pmod{\! m}\\ \Rightarrow &\ \ \ \ \,a\color{#c00}x \equiv nd \!\!\!\!\pmod m\ \ \text{is solvable for } x \end{align}$

i.e. $ $ Bezout $\,\Rightarrow\, aj\equiv d\,\Rightarrow\, a(nj)\equiv nd\pmod{\!m}\, $ by $\color{#c00}{\text{scaling}}$ by $\,n$

i.e. $\ \ \ {\rm mod}\,\ m\!:\ \ a\mid d\,\ \Rightarrow\,\ a\mid nd\,\ $ viewed in terms of $\color{#0a0}{\,\rm divisibility\ {\rm mod}\ m}$


If you are familiar with ideal arithmetic then the proof is even more concise

$\qquad\begin{align} &\ \exists\, x\!:\ b\equiv ax\!\!\!\pmod{\! m}\\ \iff&\ \exists\, x\!:\ b-ax \in m\Bbb Z\\ \ \iff&\qquad\ \ b\in a\Bbb Z+m\Bbb Z = \gcd(a,m)\Bbb Z\ \ \ {\rm by\ Bezout}\\ \iff&\ \gcd(a,m)\mid b\end{align}$

Bill Dubuque
  • 272,048