# Prove a divisibility property in $\Bbb Z$

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

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.
• yes, this make complete sense! I didn't think to take $e$ as being the $gcd(d,a)$. Thanks for your help and time :) – juper Nov 7 '17 at 23:52