I have this math question that I'm kind of stuck on.
Suppose that the congruence equation $ax \equiv b \pmod{n}$ has at least one solution. Let $d = \gcd{(a, n)}$. Show that $d \mid b$.
I know that $ax \equiv b\pmod{n}\implies ax-nm=b$ for some integer $m$. However, I'm not totally sure how to finish this. Thanks.
$\{ua+vn\mid u,v\in\mathbf Z\}\;$ is the set of multiples of $\gcd(a,n)$.