Why isn't $\mathbb Z_9 \cong \mathbb Z_3 \times \mathbb Z_3$ by the fundamental theorem of finite abelian groups? I was reading the answer to this question: Explicit descriptions of groups of order 45 and the accepted answer says the Sylow $3$-subgroup is either isomorphic to $\mathbb Z_9$ or $\mathbb Z_3 \times \mathbb Z_3$. But now my question is: Why isn't $\mathbb Z_9 \cong \mathbb Z_3 \times \mathbb Z_3$ by the fundamental theorem of finite abelian groups?
The fundamental theorem of finite abelian groups says: Every finite abelian group is the direct product of cyclic groups. (Herstein)
So isn't $\mathbb Z_9 \cong \mathbb Z_3 \times \mathbb Z_3$ by this theorem?
 A: More to the point: How many elements of order $9$ does $\Bbb Z_3\times\Bbb Z_3$ have?
A: The theorem does indeed hold: $\Bbb Z_9$ is a "trivial" direct product; it's cyclic, and just itself! Or, you can think of it as $\Bbb Z_9 \times \{0\}$, the product of itself with the trivial group (which is also cyclic!).
Just because

Every finite abelian group is the direct product of cyclic groups

that doesn't mean that every finite abelian group is the direct product of cyclic groups of prime order.
A: In general, one needs $\mathrm{gcd}(m,n) = 1$ for $\mathbb{Z}_{mn}$ to be isomorphic to $\mathbb{Z}_m \times \mathbb{Z}_n$.
A: The other answers to this post have done a good job explaining this, but since you mentioned the Sylow theorems, you might want to look into at them to get the full picture here, particularly, the first, that reads:

If $G$ is a $p$-group of order $\#G=mp^k$, then it has $p$-subgroups of order $p^i$ for every $p^i | p^k$

meaning that

If $\# G$ is a multiple of $p^k$ then it has subgroups of orders equal to all possible powers of $p$ between $0$ and $k$ ($1, p, p^2, ... , p^{k-1}, p^k)$

So since $\# \mathbb Z_9=9=3^2$, a direct consequence of Sylow's 1st Theorem is that $\mathbb Z_3 \leq \mathbb Z_9$ (since we're talking about an abelian group, $\mathbb Z_3$ is a normal subgroup).
After that, the statement $\mathbb Z_9 \ncong \mathbb Z_3 \times \mathbb Z_3$ becomes ovious if you take into consideration this post for avaluating direct products of subgroups.
A: It is easy to see that $1$ is a generator of $\Bbb Z_9$
Now take any arbitary element of $\Bbb Z_3\times\Bbb Z_3$, say (a,b).
Then the span of ($a$,$b$) = {($a$,$b$), ($2a$,$2b$), ($0$,$0$)}
Hence |span of ($a$,$b$)| <= $3$ < $9$ = |$\Bbb Z_3\times\Bbb Z_3$| i.e there is no single element generator of $\Bbb Z_3\times\Bbb Z_3$. Thus, $\mathbb Z_9 \ncong \mathbb Z_3 \times \mathbb Z_3$
