# Groups of the same order that are nonisomorphic

I'm reading A First Course in Abstract Algebra by Fraleigh and I've reached a point where I feel like I'm supposed to have understood something more from the chapter than what is actually stated. I've done (most of) the exercises leading up to the question and I've reread everything at least 5 times.

Why is $\mathbb{Z}_8\times\mathbb{Z}_{10}\times\mathbb{Z}_{24}$ not isomorphic to $\mathbb{Z}_4\times\mathbb{Z}_{12}\times\mathbb{Z}_{40}$?

The fundamental theorem of finitely generated abelian groups (FToFGAG) says that every FGAG is isomorphic to a direct product of cyclic groups in the form:

$\mathbb{Z}_{p_1^{r_1}}\times\mathbb{Z}_{p_2^{r_2}}\times\ldots\times\mathbb{Z}_{p_n^{r_n}}\times\mathbb{Z}\times\ldots\times\mathbb{Z}$.

That is what the book states. Okay. Maybe I'm really tired, but it seems like, by the theorem, they should both be isomorphic to $\mathbb{Z}_{2^7}\times\mathbb{Z}_{5}\times\mathbb{Z}_{3}$.

Why is that not true?

-
The fundamental theorem doesn't guarantee that the $p_i$ are distinct. For example, $\mathbb{Z}_2 \times \mathbb{Z}_2$ is not isomorphic to $\mathbb{Z}_4$. –  Qiaochu Yuan Oct 2 '12 at 7:01

Note that $(\mathbb Z_2)^n$ is not isomorphic to $\mathbb Z_{2^n}$ (for $n>1$). All elements of the former group are of order $2$ while the latter is cyclic and has an element of order $2^n$.
In the classification theorem for finitely generated abelian groups there is no assumption that the $p_i$ are pairwise distinct.
Often counting the number of elements of a certain order gives you proofs of nonisomorphism. I haven't checked, but I would try order 120 in your example. Certainly, the first two groups you mention have no element of order $2^7$, which your third group does.
If $\gcd(m,n)=1$ then the cyclic group of order $mn$ is the product of the group of order $m$ and the group of order $n$. –  Gerry Myerson Oct 2 '12 at 7:14
That's right. The first group is isomorphic to $\mathbb Z_8\times\mathbb Z_2\times\mathbb Z_5\times\mathbb Z_8\times\mathbb Z_3$. The second group is isomorphic to $\mathbb Z_4\times\mathbb Z_4\times\mathbb Z_3\times\mathbb Z_8\times\mathbb Z_5$. And you can easily see the difference, the first group has factors $\mathbb Z_4\times\mathbb Z_4$ where the second group has $\mathbb Z_8\times\mathbb Z_2$. –  Stefan Geschke Oct 2 '12 at 14:42