# Two finitely generated abelian groups are isomorphic iff they are embedded in each other

Suppose $A$ and $B$ are finitely generated abelian groups, $A$ has a subgroup that's isomorphic to $B$ and vice versa. Then A is isomorphic to $B$.

My guess (since $A,B$ are finitely generated) is to use the fundamental theorem of finitely generated abelian groups and somehow trace images of generators.

• Yes, you should use the fundamental theorem. A finitely generated abelian group is completely determined by how many copies of $\mathbb{Z}$ and the groups $\mathbb{Z}/p^k\mathbb{Z}$ occur in a direct sum decomposition of it; just count these. – Qiaochu Yuan Oct 8 '15 at 22:21