Let $D_{8}$ be the dihedral group of order 8. We would like to find its conjugacy classes. Authors Dummit and Foote write:
In $D_{8}$ we may also use the fact that the three subgroups of index 2 are abelian to quickly see that if $x\notin Z(D_{8})$, then $|C_{D_{8}}(x)|=4$. The conjugacy classes of $D_{8}$ are $$\{1\},\{r^{2}\},\{r,r^{3}\},\{s,sr^{2}\},\{sr,sr^{3}\}.$$
My question is that I don't see how they used the existence of 3 subgroups of index 2 that are abelian in the above. Could someone help?
Just to provide some of my own work: I can see that the center of $D_{8}$ has order 2. Thus, if $x$ is not in the center of the group, then this combined with the fact $\langle x\rangle$ is a subgroup of the centralizer $C_{D_{8}}(x)$ means that centralizer has order greater than 2, that is 4.