In a previous exam assignment, there is a problem that asks for a proof that $\mathbb{Z}_{24}$ and $\mathbb{Z}_{4}\times\mathbb{Z}_6$ are not isomorphic.
We have $\mathbb{Z}_{24}$ is isomorphic to $\mathbb{Z}_4\times\mathbb{Z}_6$ if there exists a bijective function $f∶ \mathbb{Z}_{24}\rightarrow\mathbb{Z}_{4}\times\mathbb{Z}_6$ such that $f(a+b)=f(a)+f(b)$ and $f(ab)=f(a)f(b) \forall a,b\in R$. Since there are exactly $24$ unique elements in both $\mathbb{Z}_{24}$ and $\mathbb{Z}_4\times\mathbb{Z}_6$, we can construct a bijective function $f∶ \mathbb{Z}_{24}\rightarrow\mathbb{Z}_{4}\times\mathbb{Z}_6$. Consider then $$\begin{aligned} &f\left([a]_{24}+[b]_{24}\right) \\ &=f\left([a+b]_{24}\right) \\ &=\left([a+b]_{4},[a+b]_{6}\right) \\ &=\left([a]_{4}+[b]_{4},[a]_{6}+[b]_{6}\right) \\ &=\left([a]_{4},[a]_{6}\right)+\left([b]_{4},[b]_{6}\right) \\ &=f\left([a]_{24}\right)+f\left([b]_{24}\right) \end{aligned}$$ and $$\begin{aligned} &f\left([a]_{24}[b]_{24}\right) \\ &=f\left([a b]_{24}\right) \\ &=\left([a b]_{4},[a b]_{6}\right) \\ &=\left([a]_{4}[b]_{4},[a]_{6}[b]_{6}\right) \\ &=\left([a]_{4},[a]_{6}\right)\left([b]_{4},[b]_{6}\right) \\ &=f\left([a]_{24}\right) f\left([b]_{24}\right). \end{aligned}$$ It therefore seems to me that this function shows that $\mathbb{Z}_{24}$ is isomorphic to $\mathbb{Z}_4\times\mathbb{Z}_6$.
Can someone tell me where I go wrong with this "proof", and tell me how I can show that the rings are not isomorphic?
I guess you defined $f([a]_{24})=([a]_4, [a]_6)$? This is clearly not a bijection. For example, $[0]_{24}$ and $[12]_{24}$ are mapped to the same element.
The rings are not isomorphic because the additive group of $\mathbb{Z_{24}}$ is cyclic, while the additive group of the other ring isn't. So there can't even be a bijection which only satisfies $f(a+b)=f(a)+f(b)$.