Are the groups $\Bbb{Z}_8 \times \Bbb{Z}_{10} \times \Bbb{Z}_{24}$ and $\Bbb{Z}_4 \times \Bbb{Z}_{12} \times \Bbb{Z}_{40}$ isomorphic? This question is taken from "A first course in Abstract Algebra" by Fraleigh 7th edition, section 11 question 18:
Are the groups $\mathbb{Z}_8 \times \mathbb{Z}_{10} \times \mathbb{Z}_{24}$ and $\mathbb{Z}_4 \times \mathbb{Z}_{12} \times \mathbb{Z}_{40}$ isomorphic?
The solution manual says no. My question is why not?
We have $$\mathbb{Z}_8 \approx \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2},$$
and $$\mathbb{Z}_{10} \approx \mathbb{Z}_{5} \times \mathbb{Z}_{2},$$
and $$\mathbb{Z}_{24} \approx \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{3}.$$
Thus $$\mathbb{Z}_8 \times \mathbb{Z}_{10} \times \mathbb{Z}_{24} \approx \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{5} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{3}$$
Similiarly, $$\mathbb{Z}_4 \times \mathbb{Z}_{12} \times \mathbb{Z}_{40} \approx \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{3} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \mathbb{Z}_{5}$$
These last 2 expressions are the same except for a reordering. Where is the mistake in my reasoning?
 A: Let's focus on a very simple case, comparing $\mathbb{Z}_{4}$ and $\mathbb{Z}_{2} \times \mathbb{Z}_{2}$. Are these the same? They have the same order, but they are actually not isomorphic! To see why, note that $1$ has order $4$ in $\mathbb{Z}_{4}$ (you need to add it to itself $4$ times to get to $0$). However, every element of $\mathbb{Z}_{2} \times \mathbb{Z}_{2}$ has order at most $2$. For example, $(1,0) + (1,0) = (2,0) = (0,0)$, or $(1,1) + (1,1) = (2,2) = (0,0)$.
What IS true is that $\mathbb{Z}_{pq} = \mathbb{Z}_{p} \times \mathbb{Z}_{q}$ for distinct primes $p$ and $q$. The same thing holds if you replace $p$ with $p^n$ and $q$ with $q^k$. This actually encapsulates the entire pattern: you can split up $\mathbb{Z}_{ab}$ into $\mathbb{Z}_{a} \times\mathbb{Z}_{b}$ if and only if $a$ and $b$ are coprime, i.e. having no prime factors in common.
A: The mistake is at the first line: $\mathbb{Z}_8$ is not isomorphic to $\mathbb{Z}_2\times\mathbb{Z}_2\times\mathbb{Z}_2$.
You can see this very simply: all elements of $\mathbb{Z}_2\times\mathbb{Z}_2\times\mathbb{Z}_2$ have order $2$, on the other hand $\mathbb{Z}_8$ has elements of higher order.
A: These groups are not isomorphic:  the first group contains the direct product of two cyclic groups of order $8$, and the second group does not.
