You are right; if Hatcher wrote that, then that is poor writing.

The subgroup is made up of such elements **with the property** that
only finitely many of the $g_i$ are nonzero.

I would describe the subgroup as that generated by elements
$(0,0,\ldots,0,g_m,-\alpha(g_m),0,0,\ldots)$.

There are several problems with what you write, although it can be made to work by taking a few steps "back."

First: it is not true that if you pick an arbitrary generating set for a finitely generated abelian group $G$, say $g_1,\ldots,g_n$, then you will necessarily have that $G$ is the direct sum of the cyclic groups generated by the $g_i$; even if you pick your set to be minimal. For example, in $G=\mathbb{Z}$, then $g_1=2$ and $g_2=3$ generate, no proper subset of $\{g_1,g_2\}$ generate, but $G$ is *not* isomorphic to $\langle g_1\rangle \oplus \langle g_2\rangle$.

It is true that one may select a suitably chosen generating set with that property, but this fact is not immediate or immediately obvious.

Second, even if you know that $G=\langle g_1\rangle\oplus \cdots \oplus \langle g_n\rangle$, it does not follow that if $H$ is a subgroup of $G$ then you can write $H=H_1\oplus \cdots \oplus H_n$ with $H_i$ a subgroup of $\langle g_i\rangle$. For example, the diagonal subgroup $H=\{(n,n)\in\mathbb{Z}\oplus\mathbb{Z}\mid n\in\mathbb{Z}\}$ of $\mathbb{Z}\oplus\mathbb{Z}$ is not equal to the direct sum of a subgroup of $\{(n,0)\mid n\in\mathbb{Z}\}$ and a subgroup of $\{(0,m)\mid m\in\mathbb{Z}\}$.

The following *is* true, however:

**Theorem.** Let $F$ be a finitely generated free abelian group. If $H$ is a subgroup of $F$, and $H\neq\{0\}$, then there exists a basis $x_1,\ldots,x_n$ of $F$, an integer $r$, $1\leq r\leq n$, and integers $d_1,\ldots,d_r$ such that $d_i\gt 0$, $d_1|\cdots|d_r$, and $d_1x_1,\ldots,d_rx_r$ is a basis for $H$.

Taking this for granted, let $G$ be a finitely generated abelian group. Let $X$ be a generating set. Then $G$ is a quotient of a free abelian group $F$ of rank $n=|X|$, $G\cong F/N$.

If $H$ is a subgroup of $G$, then $H$ corresponds to a subgroup $K$ of $F$ that contains $N$, with $H\cong K/N$. By the theorem, $K$ is generated by $r\leq n$ elements, and therefore so is $K/N$. So $H$ is finitely generated.

As for examples in the nonabelian case, I'm not sure if your idea with $D_n$ will work; notice that composing reflections can yield a rotation! For instance, in $D_4$, the relection of the square about the $x$ axis composed with the reflection about the $y$ axis results in a rotation, not a reflection. So you aren't just going to get "the reflections", you are going to get the whole of $D_{2n}$.

For an example you can get your hands on, consider the group $G$ of the $2\times 2$ invertible matrices generated by
$$ \left(\begin{array}{cc}
1 & 1\\
0 & 1
\end{array}\right) \qquad \text{and}\qquad \left(\begin{array}{cc}2 & 0\\
0&1\end{array}\right),$$
and let $H$ be the subgroup of elements of $G$ whose main diagonal entries are both equal to $1$. Verify that $H$ is a subgroup of $G$ that is \textit{not} finitely generated.

## Best Answer

The idea is the same used to get a basis for the dual space of a vector space $V$ of finite dimension.

Let us define the homomorphisms $g_i^*\colon G\to \mathbb{Z}$ such that $g_i^*(g_j):=\delta_{ij}$. Then given $f\in Hom(G,\mathbb{Z})$ you have that

$ f=\sum_{g_i}f(g_i)\cdot g_i^*$

Now suppose that $\sum_{g_i}a_ig_i^*=0$. Then $\left(\sum_{g_i}a_ig_i^*\right)(g_j)=a_j=0$ for each $j$. Hence $Hom(G,\mathbb{Z})$ is a free abelian group of rank $n$.