Sub group of $\Bbb{Z}\oplus \Bbb{Z}$ generated by Let $d_1,d_2$ be a pair of positive integers. I want to find a generator (if there is one) of the subgroup $$\{(x,y)\in \Bbb{Z}\oplus \Bbb{Z}|\ d_1x+d_2y=0\}.$$
I know that the element $(\text{lcm}(d_1,d_2)/d_1, -\text{lcm}(d_1,d_2)/d_2) $ is in the subgroup. And I have a feeling it is a generator, but I couldn't prove this.
 A: Assume first that $\text{gcd}(d_1,d_2)=1$. From $d_1x+d_2y=0$ we get 
$$
d_1x=-d_2y.
$$
So, since we are assuming that $d_1$ and $d_2$ are coprime, we know that $x$ is a multiple of $d_2$ and $y$ is a multiple of $d_1$. If $x=kd_2$, then 
$$
y=-\frac{d_1x}{d_2}-d_1k.
$$
So every pair $(x,y)$ is of the form $(d_2k,-d_1k)=k\cdot (d_2,-d_1)$.
In general, if $c=\text{gcd}(d_1,d_2)$, we can write $d_1=e_1c$, $d_2=e_2c$ with $e_1$,$e_2$ coprime. From $d_1x+d_2y=0$ we get $e_1x+e_2y=0$ and the above applies to show that all elements in the subgroup are of the form $$k\cdot(e_2,-e_1).$$
Finally, as you mention in the question, $c\,e_1e_2=\text{lcm}(d_1,d_2)$, so 
$$
e_2=\frac{\text{lcm}(d_1,d_2)}{ce_1}=\frac{\text{lcm}(d_1,d_2)}{d_1}
$$
and similarly
$$
e_1=\frac{\text{lcm}(d_1,d_2)}{ce_2}=\frac{\text{lcm}(d_1,d_2)}{d_2}.
$$
A: $\renewcommand\lcm{\operatorname{lcm}}$Let me denote the subgroup by $H$. For any element $(x,y) \in H$, you know $d_1 x = -d_2 y$ is a common multiple of $d_1$ and $d_2$, which means $\lcm(d_1,d_2)$ divides both. So $$(x,y) \in H \Longrightarrow d_1 x = -d_2y = k\lcm(d_1,d_2) \text{ for some } k \in \mathbb{Z}.$$
That implies that any element of $H$ must be a multiple of your proposed generator.
