TITLE: What is the abelianization of the dihedral group?
QUESTION [6 upvotes]: I am trying to find the number of group homomorphisms from $D_m$ to $\mathbb Z_n$ when $m$ is odd. 
Now in MSE I have seen but am unable to find that 
$Hom(G, A) \equiv Hom(G/[G, G], A)$, where $G/[G,G]$ is referred to as abelianization of $G$, where $A$ is abelian group.
Using this we can say that 
there is a bijection between $Hom(D_m, \mathbb Z_n)$ and $Hom(D_m/[D_m, D_m], \mathbb Z_n)$. Here $m$ is odd. 
But after this I am unable to proceed. 
What is $D_m/[D_m, D_m]$ actually ?

REPLY [10 votes]: A dihedral group is generated by two reflections $s_1,s_2$. For $D_n$ we have the relation $(s_1s_2)^n=1$. The element $s_1s_2s_1s_2$ is always a commutator, which means that in the abelianization we have $([s_1][s_2])^2=1$ and $([s_1][s_2])^n=1$. If $n$ is odd, this means $[s_1]=[s_2]$ (since the order must divide both $n$ and $2$) and the abelianization is $\mathbb{Z}_2$. If $n$ is even then $[s_1]$ and $[s_2]$ are distinct generators of order $2$ that commute, so the abelianization is $\mathbb{Z}_2\times \mathbb{Z}_2$.