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!