TITLE: Elementary Proof: If $a|m$, $b|m$ and $\gcd(a,b)=1$ then $ab|m$
QUESTION [7 upvotes]: So I am trying to make some way on this proof,but I cannot see how any of these relate. 
Here is the full question: Let $a,b,m$ be integers such that $a\mid m$, $b\mid m$ and $\gcd(a,b)=1$, then $ab\mid m$. 
Listing what I know I can see that by definition
$m = ap$ where $p$ is some integer,
$m= bq$ where $q$ is some integer,
$\gcd(a,b)=1=ax+by$ where $x,y$ are some integers and we are looking to prove
$ m = ab(r) $ where $r$ is some integer. 
What I thought about doing is either setting $ap$ = $bp$ and then doing something with that for noticing the fact that $m= m\cdot 1$ so by replacement you can do $m= m(ax+by)$ and then 
$$m(ax+by) = abr.$$ 
But I feel like this is leading nowhere. Am I on the right track? I can't seem to find any relevant propositions.

REPLY [2 votes]: This solution doesn't use Bézout's identity and only uses properties of $\gcd$ and thus it's generalizable to GCD domains. 
Let's set $\text{lcm}(a,b)=c$. It's enough to prove that $|ab|=|c|$ because as $a\mid m$ and $b\mid m$, then by the universal definition of $\text{lcm}$ it follows that $c\mid m$ and hence $ab\mid m$.
To prove that $|ab|=|c|$ we first note that since $a\mid ab$ and $b\mid ab$, then applying again the universal definition of $\text{lcm}$ we have $c\mid ab$. On the other hand, $$a=\frac{ab}{c}\cdot \frac{c}{b}\implies \frac{ab}{c}\mid a$$ $$b=\frac{ab}{c}\cdot \frac{c}{a}\implies \frac{ab}{c}\mid b$$
Therefore by the universal definition of $\gcd$ we deduce that $ab/c\mid \gcd(a,b)=1$, then $|ab/c|=|1|$ and thus $|ab|=|c|$.