# If $d|m$ show $U_m\rightarrow U_d$ under $\overline{f}$

If $d|m$ and $\overline{f} : \frac{\mathbb{Z}}{m\mathbb{Z}} \rightarrow \frac{\mathbb{Z}}{d\mathbb{Z}}$ is the map defined by $\overline{f}([a]_m)=[a]_d$ then show $\overline{f}$ maps $U_m\rightarrow U_d$.

This was both a homework problem and an exam problem for me and i got it wrong in both places :(. After I went to consult the professor he gave me the hint that $(a,m)=1 \rightarrow ax+my=1, m=dz$ but im not sure how this helps in the context of the problem.

I was under the impression that in a homomorphism units always get mapped to units, so why do we even need the stipulation that $d|m$?

Could someone please explain this step by step, because it seems like a very simple problem and im missing something fundamental.

Thanks in advanced for the help!

-
The fact that $m=dz$ lets you conclude that $ax+dzy=1,$ which is only possible if $(a,d)=1.$ Then you know that $[a]_d$ is a unit. Also, what do you mean when you say $\overline f$ is a homomorphism, since $\Bbb Z/m$ and $\Bbb Z/d$ are not necessarily multiplicative groups (some elements are missing inverses)? –  Andrew Nov 13 '12 at 22:35
$\bar f$ is not well defined if $d\not\mid m$. –  lhf Nov 13 '12 at 23:13