# A criterion for isomorphism of finite abelian groups using fundamental theorem of finitely generated abelian groups [duplicate]

I have recently encountered this very interesting problem from my abstract algebra class where we have just now proven the fundamental theorem of finitely generated Abelian groups, and the problem statement I have here is as follows:

Let $G_1, G_2$ be two finite Abelian groups such that for all natural k these two groups have the same number of elements of order k. We are to prove that the groups $G_1, G_2$ are isomorphic

Now I realize this may have been around somewhere or even here but I could not understand any of those as they use different tools. What I have been taught in my course is the fundamental theorem of finitely generated Abelian groups which I know in two forms: the elementary divisors and the invariant factor decomposition and that two of these are isomorphic if and only if they have the same elementary divisors or the invariant factors but from there I am stuck. I would certainly appreciate the help on this for a novice. Thanks to all helpers

Edit: I realize this might be a duplicate question my problem is I could not really understand the other answers

## marked as duplicate by Jorge Fernández Hidalgo, Eric Wofsey, David, Shailesh, user228113 Jan 12 '16 at 1:20

• Use the elementary divisor form and take $k$ to be a prime power. Try to recover the elementary divisors of $G$. – Francis Begbie Jan 12 '16 at 0:31
The invariant factor decomposition shows that the subgroup generated by an element of largest order in a finite abelian group is a direct factor of the group. Given the hypotheses on $G_1$ and $G_2$, this allows us to cancel the same factor in their invariant factor decomposition. The result follows by induction on the size of the groups or on the number of invariant factors.