$\langle a, b\rangle = d\mathbb{Z}$, relation of $d$ to $a, b$? Let $a, b$ be positive integers, and consider the subgroup $\langle a, b\rangle$ of $\mathbb{Z}$ they generate. I know that $$\langle a, b\rangle = d\mathbb{Z}$$for some positive integer $d$. My question is, what is $d$ in relation to $a, b$?
 A: We will show that $d = \text{gcd}(a,b)$
Firstly, note that we must have $d \mid a$ and $d \mid b$, because we have, by assumption, $a,b \in d\mathbb{Z}$.
It follows that $\text{gcd}(a,b) \mid d$.
On the other hand, we can write (using Euclid's algorithm):
$$
\text{gcd}(a,b) = ra+sb
$$
for some integers $r,s$.
Thus $\text{gcd}(a,b) = ra+sb \in \langle a,b \rangle = d\mathbb{Z}$, and so it follows that $d \mid \text{gcd}(a,b)$
Hence $d = \text{gcd}(a,b)$
A: $d$ is the greatest common divisor of $a$ and $b$. This is easy to see via Bezout's lemma. Note that $\langle a, b\rangle$ is actually even an ideal in the ring $\mathbb{Z}$.
A: $d=\gcd(a,b)$. This is because every $x\in\langle a,b\rangle$ can be written in the form $x=sa+tb$ for some $s,t\in\mathbb{Z}$. Recall that $d$ being the greatest common divisor (or any divisor) of $a$ and $b$ means that $d|(sa+tb)$. So, $\langle a,b\rangle\subseteq d\mathbb{Z}$. Conversely, since there is a choice of $s$ and $t$ for which $as+tb=d$ (this is a basic fact about the $\gcd$ of two numbers), we also have that $d\mathbb{Z}\subseteq\langle a,b\rangle$.
