My professor has given us some review material to help us prepare for our final. One of the questions is as follows:
Let $M$ be a finite abelian group of order $|M| = \prod\limits_{i = 1}^{l} p_i^{s_i}$, where $p_1, \ldots , p_l$ are the different prime divisors of $M$ and $s_i \ge 1$ are integers. Show that $M \simeq P_1 \times \ldots \times P_l$, where $P_i$ is a $p_i$-group of order $p_i^{s_i}$ for all $1 \le i \le l$.
The solution he provided:
Induction on $l$: when $l = 1$, this is clear. For $l \ge 2$, note that by a previous homework, if $P_l$ is a $p_l$-Sylow subgroup of order $p^{s_l}$, then $M \simeq N \times P_l$ for some $N$ which is a subgroup of $M$. By the index formula, $|N| = \prod\limits_{i=1}^{l-1} p^{s_i}$. Conclude by induction.
I think that all tracks. However, there is a follow-up question (no solution provided) that I'm not quite sure how to prove.
Assume that the order of $M$ is defined as above, but now suppose that $M$ is not abelian. Does it still hold that $M \simeq P_1 \times \ldots \times P_l$?
My intuition is that no, it doesn't still hold. But I can't think of a counterexample, and I can't come up with a justification for my intuition. I'm not sure where $M$ being abelian is actually relevant to the solution to the first question, but my gut tells me that I'm missing something crucial (and likely obvious...)
Can someone help me out?
Notice that $S_3\ncong C_3\times C_2$ because the LHS is not abelian and the RHS is.