TITLE: rank of an abelian group and its embedment into vectorspace
QUESTION [5 upvotes]: I am confused about the rank of an abelian group.
In this wiki page,, we have that
$$\mathbb{Z}^n \oplus \mathbb{Z}_{q_1} \oplus \cdots \oplus \mathbb{Z}_{q_t}$$
where $n$ is the rank.
But in this wiki page,, it says that the rank of an abelian group is the cardinality of a maximal linearly independent subset.
Are these two ranks equivalent definitions?
It also says that if $A$ is a torsion-free abelian group, then it embeds into a vector space over the rational numbers of dimension rank $A$. Isn't $A\cong \mathbb{Z}^n$ where $n$ is the rank? Why do we need rational number?
It also says that:
If $A$ is torsion-free then the canonical map $A \to A \otimes\mathbb{Q}$ is injective and the rank of $A$ is the minimum dimension of $\mathbb{Q}$-vector space containing $A$ as an abelian subgroup.
How to show this?

REPLY [3 votes]: If $\{x_1,\dots,x_m\}$ is a maximal linearly independent subset of a finitely generated abelian group $G$ and $H=\mathbb{Z}x_1+\dots+\mathbb{Z}x_m$, then $G/H$ is torsion.
Otherwise, let $y+H$ be an element in $G/H$ with zero annihilator. Then $\{x_1,\dots,x_n,y\}$ is linearly independent (easy check), so contradicting maximality.
Then we have, after tensoring with $\mathbb{Q}$ the exact sequence $0\to H\to G\to G/H\to0$,
$$
G\otimes\mathbb{Q}\cong H\otimes\mathbb{Q}\cong
\mathbb{Z}^m\otimes\mathbb{Q}\cong\mathbb{Q}^m
$$
Now suppose $G\cong\mathbb{Z}^n \oplus \mathbb{Z}_{q_1} \oplus \cdots \oplus \mathbb{Z}_{q_t}$.
Tensoring it with $\mathbb{Q}$, we obtain
$$
G\otimes\mathbb{Q}\cong 
\mathbb{Z}^n\otimes\mathbb{Q}\cong\mathbb{Q}^n
$$
The isomorphisms are as $\mathbb{Q}$-vector spaces, so $m=n$.