Proving that two subgroups are equal. In the group $\mathbb Z^2 = \mathbb Z \times \mathbb Z$, we consider two subgroups:

*

*$G = \{(m, n) : 2m + n \equiv 0 \pmod{5} \}$

*$H = \langle (2, 1), (1, 3) \rangle$ (the subgroup generated by those two elements).

Show that $G$ and $H$ are the same subgroup.
I have managed to show that $H$ is a subset of $G$, but I am having trouble showing that $G$ is a subset of $H$. My thoughts are to sub integers into $G$ and manipulate it to get $H$, however, only a few integers would work for that and there are infinitely many integers. Does anyone know if this is correct or if there is another way I can do this?
 A: Hint: To prove that $G \subseteq H$, we need to solve
$$
(m,n) = a(2,1) + b(1,3)
$$
for $a,b \in \mathbb Z$, given that
$$
2m+n=5t
$$
Express the first equation in matrix terms and use the second equation when you invert the matrix.
A: First, realize that $(5,0)=3*(2,1)-(1,3)$, so $(5,0)\in H$. Similarly, realize that $(0,5)=2*(1,3)-(2,1)$, so $(0,5)\in H$
To prove $G\subseteq H$, consider the opposite.
Let $g\in G,g=(m,n)$ be the element with the least nonnegative $m$ such that $g\notin H$. For $m<0$, consider $-g$.
If $m\geq 5$, consider $g=(m-5,n)+(5,0)$. Since $m-5\equiv m \pmod 5$, $(m-5,n)$ must also be in $G$, and since $g\notin H$ and $(5,0)\in H$, $(m-5,n)$ must not be in $H$. But since $m>5$, $m-5$ is positive, so $g$ is not the element with the least positive $m$ which is not in $H$.
Otherwise, $m<5$. Since $\forall g\in G,g=(m,n),2m+n\equiv 0\pmod 5$, so $n\equiv -2m\equiv 3m \pmod 5$, so $g=(m,n)\equiv (m,3m)\equiv m*(1,3) \pmod 5$. Since $3m\equiv n \pmod 5$, $3m=5m'+n$. $g=m*(1,3)-m'*(0,5)$, and since $(1,3),(0,5)\in H$, a linear combination of $(1,3)$ and $(0,5)$ is also in $H$, so $g\in H$, which is a contradiction.
