TITLE: Prove a divisibility property in $\Bbb Z$
QUESTION [5 upvotes]: I am stuck on how to prove the following question:

Let $a,b,d \in \mathbb Z$. Now suppose that $d\mid ab$. Prove that there exists $e,f \in \mathbb Z$ such that $d=ef$ and $e\mid a$ and $f\mid b$.

Thanks for your help.

REPLY [4 votes]: Take $e=\gcd(d,a)$; by definition this is a factor of $d$ and so $d=ef$ for some $f$.  It is also true by definition that $e\mid a$, so it remains to show that $f\mid b$.
We have $ef\mid ab$ so
$$f\ \Big|\ \frac aeb\ ;$$
also
$$\gcd\Bigl(f,\frac ae\Bigr)=\gcd\Bigl(\frac de,\frac ae\Bigr)
  =\frac1e\gcd(d,a)=1\ ;$$
and so
$$f\mid b$$
as required.