Let $a$ and $b$ be two integers. Prove that $$ dm = \left|ab\right| ,$$ where $d = \gcd\left(a,b\right)$ and $m = \operatorname{lcm}\left(a,b\right)$.
So I went about by saying that $a = p_1p_2...p_n$ where each $p_n$ is a prime. Same applies to $b = q_1q_2 ... q_c$. So then $m = (u_1u_2...)(p_1p_2...p_n)$ and $m = (t_1t_2...)(q_1q_2...q_c)$ since $a|m$ and $b|m$. $m$ has a unique factorization, so the primes $(u_1u_2...)(p_1p_2...p_n) = (t_1t_2...)(q_1q_2...q_n)$ and the gcd(a,b) = $(p_1p_2...p_n) \cap (q_1q_2...q_n)$ (I know this is not mathematically correct, so is there a correct way to express this?).
So $dm = |ab| \iff d= \frac{|ab|}{m}$. And by the definition above, $\frac{ab}{(t_1t_2...)b} = \frac{a}{(t_1t_2...)}$. And this is where I get stuck. Is my proof right? Am I going in the right direction?
Thanks
PS. I am trying to do this using only the prime factorization theorem and the definitions of the gcd and the lcm.
WLOG $a$ and $b$ are positive integers (as the remaining cases are easily reduced to this one).
Let $d = \gcd(a,b)$ and $l=\operatorname{lcm}(a,b)$. Notice that $\frac{ab}{d}$ is a common multiple of $a$ and $b$, since $\frac{a}{d}$ and $\frac{b}{d}$ are integers, by definition. By Euclidean algorithm, $\frac{a}{d}$, $\frac{b}{d}$ are relatively prime. Now assume $n$ is a common multiple of $a$ and $b$; then we can find integers $k$ and $k'$ such that $n=ka$ and $n=k'b$, so $ka=k'b$. We divide both sides by $d$ (we remain in integers!) to get $k'\frac{b}{d}=k\frac{a}{d}$. Hence $\frac{a}{d}$ divides $\frac{b}{d} k'$ and since $\frac{a}{d}$ and $\frac{b}{d}$ are relatively prime then $\frac{a}{d}$ divides $k'$. Hence $n=k'b=q\frac{ab}{d}$ for some integer $q$. So $\frac{ab}{d} $ divides $n$. Hence $\operatorname{lcm}(a,b) = \frac{ab}{d} = \frac{ab}{\gcd(a,b)}$.