let's pick a group, and see what we get for some different test values.
we'll pick S3, it's small, and non-abelian, so maybe we'll learn something.
now (1 2)(1 3) = (1 3 2), while (1 3)(1 2) = (1 2 3), so neither (1 2) or (1 3)
can be in the center of S3.
(1 2)(1 2 3) = (2 3), while (1 2 3)(1 2) = (1 3), so (1 2 3) isn't in the center.
(1 2)(1 3 2) = (1 3), (1 3 2)(1 2) = ( 2 3), so (1 3 2) isn't in the center.
(1 2)(2 3) = (1 2 3), (2 3)(1 2) = (1 3 2), so (2 3) isn't in the center.
so Z(S3) is just the identity (S3 is VERY non-abelian, hardly anything commutes).
let's see what happens if we try to centralize a smaller set.
let's choose H = {1, (1 2 3), (1 3 2)}.
straight-away we see that (1 2), (1, 3) and (2, 3) aren't in Z(H), from our investigations into the center.
but (1 2 3)^-1 = (1 3 2), and everything commutes with its inverse, so
Z(H) = H.
note that if we pick S = {1}, everything commutes with the identity, so Z({1}) = S3.
notice that the smaller S gets, the bigger Z(S) got. Z(S) is sort of a way of telling:
"how abelian is S compared to the rest of G".
the identity subgroup is VERY abelian, so it makes sense that Z({1}) is big. S3 is not very abelian, so it makes sense Z(S3) is small. {1,(1 2 3),(1 3 2)} is sort of "in the middle", everything in it commutes with itself (because it's an abelian subgroup), but it doesn't commute with anything outside of it.
if a subgroup H is abelian, Z(H) will contain all of H, and maybe more.
if a subgroup H is not abelian, Z(H) won't contain all of H.
if the main group G is abelian, of course, Z(H) = G for every subgroup H.
the center of G, Z(G) will always be an abelian group (since everything in it commutes with everything, including its own elements), but it isn't necessarily the largest abelian subgroup of G. for example, in the group D4 =
{1,r,r^2,r^3,s,rs,r^2s,r^3s}, the center is {1,r^2}, but the subgroup {1,r,r^2,r^3} is abelian and is clearly larger.