Show that the centre $Z(D_n)$ of $D_n$ is $1$ or$\mathbb Z_2$ according as $n$ is odd or even This is a homework problem I got. My approach is: if $n$ is odd, then $D_n=\{1,r,r^2,...,r^{n-1},s,rs,...,r^{n-1}s\}$, since $sr=r^{n-1}s$ (not equal to $rs$), and this generalizes to all compositions of $s$ and $r$ (because $n$ is odd), the only element in $Z(D_n)$ is $1$.
But I have trouble with the second part of the proof. $\mathbb Z_2=\{0,1\}$, it's not even a subset of $D_n$, so I don't understand what they are asking here.
 A: First of all, what they're asking you to show is not that the center is $\mathbb Z_2$, but rather that it is isomorphic to it, which basically means in the language of group theory that they are the "same" in a well-defined sense. If you don't know what isomorphic means I believe your notes probably will explain it with a few pages of details so I'll skip that part.
Now since you know $sr = r^{n-1}s$ in $D_n$, say for instance a $k^{th}$ power of $r$ would be in the center, say $r^k$. Clearly $r^k$ commutes with every power of $k$, but it commutes with $s$ if and only if $sr^k = r^ks$, but $sr^k = r^{n-k}s$ (you can easily show this equality by induction on $k$), so that $r^k$ commutes with $s$ if and only if $2k = n$, which means if and only if $n$ is even and $k = n/2$. Now $s$ cannot be in the center since $sr \neq rs$, unless $n=2$, but I guess you include that case only if you're bored, because usually $D_n$ also refers to symmetries of a polygon, and no polygon has $2$ vertices (besides the line segment.. bleh.) Anyway. My point is, $r^{n/2}$ is in the center, and $s$ is not. Note that similar arguments show that $r^{\ell}s$ is not in the center for any integer $\ell$.
This means that
$$
Z(D_n) = 
\begin{cases}
\{1\} & \text{ if } n \equiv 1 (\mathrm{mod} 2) \\
\{1, r^{n/2}\} & \text{ if } n \equiv 0 (\mathrm{mod} 2)
\end{cases}
$$
but since $\{1, r^{n/2} \}$ is isomorphic to $\mathbb Z_2$, we say that the center "is" $\mathbb Z_2$ in the sense of isomorphisms.
Hope that helps,
