Lemma13.8
Let $G$ be a finite abelian group of order $n = p_1^{\alpha_1} \cdots p_k^{\alpha_k}\text{,}$ where where $p_1, \ldots, p_k$ are distinct primes and $\alpha_1, \alpha_2, \ldots, \alpha_k$ are positive integers. Then $G$ is the internal direct product of subgroups $G_1, G_2, \ldots, G_k\text{,}$ where $G_i$ is the subgroup of $G$ consisting of all elements of order $p_i^k$ for some integer $k\text{.}$
Proof
Since $G$ is an abelian group, we are guaranteed that $G_i$ is a subgroup of $G$ for $i = 1, \ldots, n\text{.}$ Since the identity has order $p_i^0 = 1\text{,}$ we know that $1 \in G_i\text{.}$ If $g \in G_i$ has order $p_i^r\text{,}$ then $g^{-1}$ must also have order $p_i^r\text{.}$ Finally, if $h \in G_i$ has order $p_i^s\text{,}$ then
\begin{equation*}
(gh)^{p_i^t} = g^{p_i^t} h^{p_i^t} = 1 \cdot 1 = 1,
\end{equation*}
where $t$ is the maximum of $r$ and $s\text{.}$
We must show that
\begin{equation*}
G = G_1 G_2 \cdots G_k
\end{equation*}
and $G_i \cap G_j = \{1 \}$ for $i \neq j\text{.}$ Suppose that $g_1 \in G_1$ is in the subgroup generated by $G_2, G_3, \ldots, G_k\text{.}$ Then $g_1 = g_2 g_3 \cdots g_k$ for $g_i \in G_i\text{.}$ Since $g_i$ has order $p^{\alpha_i}\text{,}$ we know that $g_i^{p^{\alpha_i}} = 1$ for $i = 2, 3, \ldots, k\text{,}$ and $g_1^{p_2^{\alpha_2} \cdots p_k^{\alpha_k}} = 1\text{.}$ Since the order of $g_1$ is a power of $p_1$ and $\gcd(p_1, p_2^{\alpha_2} \cdots p_k^{\alpha_k}) = 1\text{,}$ it must be the case that $g_1 = 1$ and the intersection of $G_1$ with any of the subgroups $G_2, G_3, \ldots, G_k$ is the identity. A similar argument shows that $G_i \cap G_j = \{1 \}$ for $i \neq j\text{.}$
Next, we must show that it possible to write every $g \in G$ as a product $g_1 \cdots g_k\text{,}$ where $g_i \in G_i\text{.}$ Since the order of $g$ divides the order of $G\text{,}$ we know that
\begin{equation*}
|g| = p_1^{\beta_1} p_2^{\beta_2} \cdots p_k^{\beta_k}
\end{equation*}
for some integers $\beta_1, \ldots, \beta_k\text{.}$ Letting $a_i = |g| / p_i^{\beta_i}\text{,}$ the $a_i$'s are relatively prime; hence, there exist integers $b_1, \ldots, b_k$ such that $a_1 b_1 + \cdots + a_k b_k = 1\text{.}$ Consequently,
\begin{equation*}
g = g^{a_1 b_1 + \cdots + a_k b_k} = g^{a_1 b_1} \cdots g^{a_k b_k}.
\end{equation*}
Since
\begin{equation*}
g^{(a_i b_i ) p_i^{\beta_i}} = g^{b_i |g|} = e,
\end{equation*}
it follows that $g^{a_i b_i}$ must be in $G_{i}\text{.}$ Let $g_i = g^{a_i b_i}\text{.}$ Then $g = g_1 \cdots g_k \in G_1 G_2 \cdots G_k\text{.}$ Therefore, $G = G_1 G_2 \cdots G_k$ is an internal direct product of subgroups.