How does one know this is a subgroup? I was watching a video of an algebra lecture on line. The substitute teacher was presenting a pf. of a lemma:
$$m\mathbb{Z} + n\mathbb{Z} = \mbox{gcd}(m,n)\mathbb{Z}\quad\mbox{where }m,n\in\mathbb{Z}$$
I am a bit puzzled by the development of the proof in that the first assertion is that the LHS is a subgroup and has the form $d\,\mathbb{Z}$. And then goes on to use this to complete the proof.
My question (probably naive) is how does one know at the onset that the LHS is a subgroup - after all, the lemma is intended to prove what that sum is, and knowing that, it can then be claimed that the sum is also a subgroup.
In this regard, there was also a problem I saw in "Dummit and Foote" which asks to prove that the intersection of two subgroups is a subgroup. So if this is applicable to my question, it seems it has to first be determined what the intersection of
$m\mathbb{Z}$ and $n\mathbb{Z}$ are. Which then leads to the gcd of the RHS.
Thanks from a self-studier.
 A: Do you believe that $m\mathbf{Z}$ and $n\mathbf{Z}$ are subgroups of $\mathbf{Z}$? In general, if $H, K$ are subgroups of an abelian group $G$ (written additively) then
\[
H + K = \{x + y : x \in H,\, y \in K\}
\]
is also a subgroup of $G$. Just check the three axioms.
It would be a good exercise to check that the intersection $m\mathbf{Z} \cap n\mathbf{Z}$ is actually $\operatorname{lcm}(m, n)\mathbf{Z}$. This makes sense: to be in the intersection, you have to be a multiple of both $m$ and $n$. Good luck with your self-study!
A: For a subset $G'$ of any group $G$ to be a subgroup, three criterion must be met.
1) The identity element $e$ must be an element of $G'$. It is, in this case, because the element $m0+n0 = 0$ is the identity.
2) For any two elements $x, y \in G'$, we must have $xy\in G'$. This is also  easy to check, by the following calculation, with $x = ma + nb$ and $y = ma' + nb'$, then:
$$
(ma + nb) + (ma' + nb') = m(a+a')+n(b+b') \in G'
$$
This property is generally called "closed under multiplication", or "under addition" in this case.
3) For any element $x\in G'$, we must have $x^{-1}\in G'$. This one is also not too hard, since if $x = ma + nb$, then we have
$$
x + (m(-a)+n(-b)) = ma-ma+mb-mb = 0
$$
so we have $x^{-1} = (m(-a)+n(-b)) \in G'$
And that concludes the proof.
The intersection of the two subgroups would be the subgroup lcm$(m, n)\mathbb{Z}$, while the sum is $\gcd(m, n)\mathbb{Z}$.
