This is written on Page 93 of Derek J.S. Robinson's A Course in the Theory of Groups:
Let $G$ be an arbitrary abelian group, $T$ its torsion-subgroup. For an arbitray prime $p$, denote $G_p$ as the $p$-primary component of $G$. Then $T$ is the sum of all the $G_p$.
Isn't $T$ the direct sum of $G_p$? For any element $a \in T$, $a$ is of finite order. If the order of $a$ equals $p_1^{n_1} \cdots p_k^{n_k}$ where $p_i$'s are primes and $n_i$'s are positive integers. Then there must exist $a_i \in G_{p_i}$, $i=1, \cdots k$, such that $a = \sum_i a_i$. Because if $q \notin \{p_1, \cdots p_k \}$, and a nonzero $b \in G_q$ appears in the summation form of $a$, then the order of $a$ must be divisible by $q$. But in fact it isn't.
In my understanding, a direct sum is like the coproduct in category language, where every element written in the summation form has only finite nonzero components. But a sum can take the sum of infinitely many elements. In fact, picking infinitely elements of $G$, one per $G_p$, and adding them together may get an element of infinite order, lying outside $T$.
Where am I wrong?
Then I considered $\mathbb{Q} / \mathbb{Z}$. What is the sum of inverse of primes $\frac{1}{2} + \frac{1}{3} + \frac{1}{5} + \cdots$? Is it still in $\mathbb{Q}$? The definition of a group $(G, *, 1)$ only says for finitely many $a_i \in G$, $a_1 * \cdots * a_n$ is in $G$; it doesn't guarantee the closedness of $G$ under infinitely many times of applying the operation $*$.