I need to prove that $\langle n \mathbb{Z},m\rangle =\langle m\mathbb{Z},n\rangle =d\mathbb{Z}$ Let $n, m\in \mathbb{Z}$ and $d=gcd(n,m)$, prove that:
$$\langle n \mathbb{Z},m\rangle =\langle m\mathbb{Z},n\rangle =d\mathbb{Z}$$
What is $\langle n\mathbb{Z},m\rangle$ here? The intersection of all the ideals that contain $m$ and $n\mathbb{Z}$? 
Thanks in advance 
 A: I think you are right. It is the smallest ideal containing $n\mathbb{Z}$ and $m$. We claim that this ideal is the same as $\langle d\rangle$ where $d=\gcd(m,n)$.
First since $d\min m$ and $d\mid n$, clearly $n\mathbb{Z}$ and $m$ are contained in $\langle d\rangle$. Hence $\langle n\mathbb{Z},n\rangle\subseteq \langle d\rangle$.
Conversely, by Bezout's lemma there are integers $a,b$ such that $am+bn=d$. It follows that $\langle d\rangle \subseteq \langle n\mathbb{Z},n\rangle$.
A: I'm not sure about this:
As $\mathbb{Z}$ is a commutative ring with identity element we can san say that:
$\langle n\mathbb{Z}, m \rangle=\{ \sum a_i x_i  + \sum b_k
m \mid a_i, b_i \in \mathbb{Z}$ and $ x_i\in n\mathbb{Z} \}$
Is it correct?
In this case any element of  $\langle n\mathbb{Z}, m \rangle$ can be written as:
$na+mb$ with $a,b \in \mathbb{Z}$
Because $n\mathbb{Z}$ in an ideal of $\mathbb{Z}$ and the other part is also divisible by  $m$.
Then this element $na+mb$ is divisible by $d$. 
$na+mb\in d\mathbb{Z}$
$\langle n\mathbb{Z}, m \rangle \subseteq d\mathbb{Z}$ 
Now as $d\mathbb{Z}$ is an ideal of $\mathbb{Z}$ and 
$na=(dk)a$ with $a,k \in \mathbb{Z}$
$m=dl$ with $l \in \mathbb{Z}$
$d\mathbb{Z}$ is an ideal that contains $n\mathbb{Z}$ and $\{m\}$, and is subset of any ideal that contains $n\mathbb{Z}$ and $\{m\}$.
$\langle n\mathbb{Z}, m \rangle \supseteq d\mathbb{Z}$ 
