Proving gcd($a,b$)lcm($a,b$) = $|ab|$

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)}$.


We assume $a$ and $b$ to be positive (the remaining cases are easily reduced to this).

Apply prime factorization/decomposition of $a$ and $b$:

$$ a = p_1^{\alpha_1} p_2^{\alpha_2}\cdots p_s^{\alpha_s}, \qquad \alpha_j\ge 0 \quad (j=1,2,\ldots,s); $$$$ b = p_1^{\beta_1} p_2^{\beta_2}\cdots p_s^{\beta_s}, \qquad \beta_j\ge 0 \quad (j=1,2,\ldots,s). $$ ($p_j$ are prime factors of $a$ and/or $b$. That's why zero-powers are allowed here).

Then $$ GCD(a,b) = p_1^{\min\{\alpha_1,\beta_1\}}p_2^{\min\{\alpha_2,\beta_2\}}\cdots p_s^{\min\{\alpha_s,\beta_s\}}, $$ $$ LCM(a,b) = p_1^{\max\{\alpha_1,\beta_1\}}p_2^{\max\{\alpha_2,\beta_2\}}\cdots p_s^{\max\{\alpha_s,\beta_s\}}, $$ hence $$ GCD(a,b)\cdot LCM(a,b) = p_1^{\max\{\alpha_1,\beta_1\}+\min\{\alpha_1,\beta_1\}} p_2^{\max\{\alpha_2,\beta_2\}+\min\{\alpha_2,\beta_2\}} \cdots p_s^{\max\{\alpha_s,\beta_s\}+\min\{\alpha_s,\beta_s\}}; $$

but $$ \max\{\alpha,\beta\}+\min\{\alpha,\beta\} = \alpha+\beta. $$

So, $$ GCD(a,b)\cdot LCM(a,b) = p_1^{\alpha_1+\beta_1} p_2^{\alpha_2+\beta_2} \cdots p_s^{\alpha_s+\beta_s} = \ldots . $$