In class, my professor showed an example of a abelian group of order 72:
Since $72=2^3 \times 3^2$. In particular, we can decompose the group into a Cartesian product of $\mathbb{Z}_4\times\mathbb{Z}_2$ and $\mathbb{Z}_3 \times \mathbb{Z}_3$.
So we have:
$$G \simeq (\mathbb{Z}_4 \times \mathbb{Z}_3) \times (\mathbb{Z}_2 \times \mathbb{Z}_3) \simeq \mathbb{Z}_{12} \times \mathbb{Z}_6$$
I'm not sure why this is true, from what I understand, the Cartesian product of the two decomposition above should give me: $$G \simeq \mathbb{Z}_4 \times \mathbb{Z}_2 \times \mathbb{Z}_3 \times \mathbb{Z}_3$$
Why is it that we are allowed to combine the groups?
First, I'd like to say, that there are other abelian groups of order $72$. Anyway, assuming that the group in question is $(\mathbb{Z}_4 \times \mathbb{Z}_3) \times (\mathbb{Z}_2 \times \mathbb{Z}_3)$, then this is in fact isomorphic to $\mathbb{Z}_{12} \times \mathbb{Z}_6$.
A general fact is that if $m$ and $n$ are relatively prime, then $$\mathbb{Z}_m \times \mathbb{Z}_n \cong \mathbb{Z}_{mn}.$$