Semidirect product of two cyclic groups

Describe all semidirect products of $C_n$ by $C_m$ (ie $C_n \rtimes C_m$) where $m,n \in \mathbb{N_+}$

Note: For the first attempt one needs to find all homomorphisms from $C_m \to U(n)$, but the situation differs a lot for different pairs of $n ,m$, is there a better way to find all structures of $C_n \rtimes C_m$?

Wikipedia provided a general presentation of this product which I do not know how it was worked out.

• $U(n)$ has order $\phi(n)$, so there are nontrivial homomorphisms if and only if $\gcd(m,\phi(n))\gt 1$. – Arturo Magidin May 31 '12 at 4:26
• That's true, but if there are non-trivial homomorphisms then how to get general presentations of the semidirect product? – user31899 May 31 '12 at 4:47
• The presentation of the semidirect product is $$\langle x,y\mid x^n = y^m=1, x^y = x^{\varphi(y)}\rangle,$$ where $\varphi\colon C_m\to U(n)$ is the chosen homomorphism, and $y$ generates $C_m$. – Arturo Magidin May 31 '12 at 4:51
• The semidirect product is completely determined by how $y$ (the generator of $C_m$) acts on $x$ (the generator of $C_n$). The action is given by conjugation, so you just need to say what $x^y = y^{-1}xy$ is; it must be a power of $x$ (since $\langle x\rangle$ is normal), so it is of the form $y^{-1}xy = x^k$; the order of $x^k$ must be prime to $n$, and $k^m\equiv 1\pmod{\phi(n)}$ must hold. This gives you the multiplication table, so that's a presentation of the group. – Arturo Magidin May 31 '12 at 4:54
• Thanks! It's clear to me now. the phi(y) is in U(n) thus coprime to n which is equal to the symbol "k" in the presentaion given by the wiki site above. – user31899 May 31 '12 at 4:57