Number Theory – Prove $a\mid m$, $b\mid m$, $\gcd(a,b)=1$ Implies $ab\mid m$

divisibilityelementary-number-theorygcd-and-lcm

Prove: If $a\mid m$ and $b\mid m$ and $\gcd(a,b)=1$ then $ab\mid m$

I thought that $m=ab$ but I was given a counterexample in a comment below.

So all I really know is $m=ax$ and $m=by$ for some $x,y \in \mathbb Z$. Also, $a$ and $b$ are relatively prime since $\gcd(a,b)=1$.

One of the comments suggests to use Bézout's identity, i.e., $aq+br=1$ for some $q,r\in\mathbb{Z}$. Any more hints?

New to this divisibility/gcd stuff. Thanks in advance!

Best Answer

Write $ax+by=1$, $m=aa'$, $m=bb'$. Let $t=b'x+a'y$.

Then $abt=abb'x+baa'y=m(ax+by)=m$ and so $ab \mid m$.

Edit: Perhaps this order is more natural and less magical:

$m = m(ax+by) = max+mby = bb'ax+aa'by = ab(b'x+a'y)$.

Related Question