$f(x) = ax \text{ mod } m$, given that $\text{gcd}(a,m) = d$ what values does $f(x)$ take on? What values are in the range of $f(x) = ax \: (\text{mod } m)$ for $x \in \{0,...,m-1\}$.

I know that the answer should be all multiples of d however I'm not sure how one would reach that conclusion
Hint: $xa+ym=c$ has a solution (in integers $x$ and $y$) iff $d\mid c$.
For this is a linear diophantine equation.
Hint: $xa+ym=c$ has a solution (in integers $x$ and $y$) iff $d\mid c$.
For this is a linear diophantine equation.