I ran across this while reading through a matrix theory proof. I'm not sure how to show this. Any help would be much appreciated.
My attempt:
gcd($k$,$m$) = $r$ $\implies$ $kx + my = r$, for integers $x$ and $y$ (by B$\acute{e}$zout's identity). Hence $\dfrac{k}{r}x + \dfrac{m}{r}y =1$, and so it follows that gcd($\tfrac{k}{r}$,$\tfrac{m}{r}$) = 1; i.e. $k/r$ and $m/r$ are coprime.
Now, we also have $k \mid \ell m \implies \dfrac{k}{r} \mid \dfrac{\ell m}{r}$. I feel like the solution to this is right in front of me, but I don't see how I can make the jump that $k/r \mid \ell$.
To finish: $\,(k/r,m/r)=1\,$ and $\,k/r\mid \ell(m/r)\,\Rightarrow\, k/r\mid \ell\, \,$ by Euclid's Lemma. More directly:
$$ k\mid m\ell,k\ell \,\Rightarrow\,k\mid (m\ell,k\ell) = (m,k)\ell\,\Rightarrow\, k/(m,k)\mid \ell$$