GCD of a number and one of its divsors I found this assertion in a proof of the number of unique solutions of $ax \equiv b \mod m$ with $\gcd(a,m) \mid b$:
The page is here: http://sites.millersville.edu/bikenaga/number-theory/linear-congruences/linear-congruences.html
Let $d = \gcd(a, m)$
Let $d' = \gcd\left(m, \frac{m}{d}\right)$
Show $d' = \frac{m}{d}$.
Clearly, $d' \leq \frac{m}{d}$
But now I'm stuck.
 A: You can find the proof like the following: $$m = dz \Rightarrow z = \frac{m}{d} \Rightarrow  \gcd\left(m, \frac{dz}{d}\right) = \gcd(m, z) = \gcd(dz, z) = z = \frac{m}{d}.$$
A: Have you tried plugging in some numbers? Sometimes the obscure becomes obvious when you have some specific numbers to deal with. Let's say $a = 70$, $b = 47$, $m = 21$.
Then $d = \gcd(70, 21) = 7$ and $$d' = \gcd\left(21, \frac{21}{7}\right) = \gcd(21, 3) = 3.$$
It now seems obvious to me that $d$ is a divisor of $m$ (since it's the greatest common divisor of $a$ and $m$), and therefore $\frac{m}{d}$ is also a divisor of $m$. If $\frac{m}{d} < m$, then $\frac{m}{d}$ is the greatest common divisor of $m$ and itself. And if $\frac{m}{d} = m$ (which is the case if $d = 1$) then the number is trivially its greatest common divisor with itself (unless that number is 0, but that's a whole other can of worms).
Either way, $$d' = \frac{m}{d},$$ as you were asked to show.
A: There are two common (equivalent) definitions of the greatest common divisor.
If you use the literal definition ... $\frac md $ is a divisor in common with $m $ and $\frac md $ and anything greater than $\frac md $ isn't a divisor of $\frac md $.  So $\frac md $ is the greatest common divisor of $m $ and $\frac md$.
The other common definition is that it is a common divisor (same as above) and any other common divisor divides it.  As $\frac md$ is $\frac md $ any divisor of $\frac md$... is a divisor of $\frac md $
A: By the GCD Distributive Law  $\ (m,\frac{m}d) = \frac{m}d (d,1) = \frac{m}d.\,$  Follow the link for four proofs of the law.
