How Cyclic Group of order 6 is isomorphic to the product of cyclic groups of order 2 and 3. How to generalize this.

Show that a cyclic group of order $6$ is isomorphic to the product of a cyclic group of order $2$ and a cyclic group of order $3$. Can you generalize this?

Above problem is given by my graduation course instructor.

My Approach:

I took an example to prove this. $$G = <a>, a^6 =e$$ $$H = <b>, b^2 = e$$ $$H = <c>, c^3 = e$$

$$HK = \{bc, bc^2, b, c, c^2, e\}$$

I defined the mapping like this. $$b\rightarrow a$$ $$c\rightarrow a^2$$ $$bc\rightarrow a^3$$ $$c^2\rightarrow a^4$$ $$bc^2\rightarrow a^5$$ $$e\rightarrow e$$

I will prove above mapping as isomorphism.

Note: I am doing beginning course in Group Theory and aware of "Groups, subgroups, cyclic groups, cosets, Lagrange’s Theorem, normal subgroups, quotient groups, homomorphism of groups, basic isomorphism theorems, permutation groups, Cayley’s theorem".

I am not aware of Dihydral groups, direct products etc.

• Well, you're not aware of direct products, but what you have to prove mentions one… Oct 25, 2017 at 10:21
• There are separate LaTeX commmands for angle brackets; write \langle and \rangle instead of < and >. Oct 26, 2017 at 8:35

Your approach is correct. An alternative would be to show that $HK=G$ and $H\cap K=0$ (which doesn't require cumbersome function definition). The proper generalization is as follows:
Lemma. Let $n\in\mathbb{N}$ and represent it as $n=p_1^{a_1}\cdots p_m^{a_m}$ where each $p_i$ is prime and $p_i\neq p_j$ for $i\neq j$. Then $$\mathbb{Z}_{n}\simeq\mathbb{Z}_{p_1^{a_1}}\times\cdots\times\mathbb{Z}_{p_m^{a_m}}$$