Can any torsion-free abelian group be embedded in a direct sum of copies of $\mathbb Q$?

I'm trying to solve this for a problem and I need to know if what I have done is right:

Let $B$ be a torsion-free abelian group. Then we consider the set $$A=\{(b,n):b\in B,n\in \mathbb Z,n\neq 0\}$$ and define $$(b,n)\sim (a,m) \text{ iff } bm=an.$$ This yields an equivalence relation, now you can define addition of classes by $(b,n)+(a,m)=(am+bn,nm)$. Then $(A,+)$ is a torsion-free abelian group and $B$ can be embedded into $(A,+)$, but also $(A,+)$ is divisible, so $(A,+)$ can be embedded in a direct sum of copies of $\mathbb Q$.

Thank you for your time.


Solution 1:

Here is an answer using tensor products, inspired in egreg's comment above.

By corollary 4.27 in this expository article by Keith Conrad, the map $B\to B\otimes_\mathbb{Z} \mathbb{Q}$, $b\mapsto b\otimes 1$ is injective, since $B$ is torsion-free. Now, the abelian group $B\otimes_\mathbb{Z} \mathbb{Q}$ has a $\mathbb{Q}$-vector space structure (it is the $\mathbb{Q}$-extension of scalars of $B$), hence it is isomorphic to a direct sum of copies of $\mathbb{Q}$.