I'm reading a proof for the integer solutions to $ax + by = c$ (the coefficents are integers).
It states that there are $w_0$ and $z_0$ such that $aw_0 + bz_0 = d$, where $d = \operatorname{gcd}(a,b)$. Then let $x_0 = w_0k$ and $y_0 = z_0k$. And if $x'$, $y'$ is a solution of $ax + by = c$, then $ax' + by' = ax_0 + by_0$.
In the next step both sides are divided by $d$. I understand how that leads to the result, but it seems arbitrary to me to divide by $d$. If we were to multiply both sides by $d$, for instance, we would still have equivalent equations yet we would obtain a different solution set for the original equation. So how is it necessary to divide by d?