Recall that the center of a group G is ZG g G gx xg for al
Solution
we can write D8 as {1,r,r^2,r^3,r^2s,r^3s} where r^4 = s^2 = 1 , rsr=s
since r ans s do not commute neither of them is in the center of D8
also rsr=s means sr = r^3s so r^3 and s do not commute so r^3 is not in the center either.
(rs)s=r but srs= (sr)s = (r^3s)s = r^3 , so rs is not in the center
(r^2s)r = r^2(sr) = r^2(r^3s) =rs,
r(r^2s) = r^3s, so r^2s is not in the center.
(r^3s)s = r^3, s(r^3s) = s(sr) = r, so r^3s is not in the center. this only leaves 1 and r^2.
clearly 1 is in the center, and also r^2 commutes with every element of <r>.
sr^2 = (sr)r = (r^3s)r = r^3(sr) = r^3(r^3s) = r^2s, so r^2 commutes with r and s, and hence with all of D8. thus the center is {1,r^2}.
now we consider D10 = {1,r,r^2,r^3,r^4,s,rs,r^2s,r^3s,r^4s}, where r^5 = s^2 = 1, rsr = s.
we can show that s only commutes with 1 and s, which means that the center has to be {1}.
clearly s does not commute with r, or else D10 would be abelian (also, sr = r^4s).
sr^2 = (sr)r = r^4sr = r^4(r^4s) = r^3s
sr^3 = (sr)r^2 = r^4sr^2 = r^4(sr)r = r^3sr = r^3(r^4s) = r^2s
sr^4 = (sr)r^3 = (r^4s)r^3 = r^4(sr^3) = r^4(r^2s) = rs
s(rs) = (sr)s = (r^4s)s = r^4, (rs)s = r
s(r^2s) = s(sr^3) = r^3, (r^2s)s = r^2
s(r^3s) = (sr^3)s = (r^2s)s = r^2, (r^3s)s = r^3
s(r^4s) = s(sr) = r, (r^4s)s = r^4.
in general, in the group Dn,
sr = r^(n-1)s, so s will not commute with r^ks unless r^k = r^(n-k).
and s will not commute with r^k unless r^k = r^(n-k), which can only happen if n is even.
so if n is odd, the center of Dn is {1}.
now if n is even, r^(n/2) commutes with r and s, so is in the center.
however, (r^(n/2)s)(r) = r^((n/2)-1)s
r(r^(n/2)s) = r^((n/2)+1)s, so even though r^(n/2)s commutes with s,
it does NOT commute with r, so the center of Dn for n even is {1,r^(n/2)}
