If $\gcd(a,b) = 1$, $x \equiv 0 \pmod{a}$, $x \equiv 0 \pmod{b}$ then prove that $x \equiv 0 \pmod{ab}$.
My attempt at answering the question:
\begin{align*} x &\equiv 0 \pmod{a}\\ &\Longrightarrow x\text{ is divisible by $a$}\\ &\Longrightarrow x = ma\text{ for some integer $m$}\\ \ \\ x &\equiv 0 \pmod{b}\\ &\Longrightarrow x\text{ is divisible by $b$}\\ &\Longrightarrow x = mb\text{ for some integer $m$}\\ \ \\ x^2 &= (ma)(mb)\\ x^2 &= (m^2)(ab)\\ x &= \sqrt{m^2ab}\\ x &= m\sqrt{a}\sqrt{b} \end{align*} Let $m$ be $k\sqrt{a}\sqrt{b}$. Then \begin{align*} x &= kab\\ &\Longrightarrow x \equiv 0 \pmod{ab} \end{align*}
Is this correct, if not can someone point me in the right direction?
