How to use class equation for determining the center of $S_4$
$$|G|=|Z(G)|+\sum_x [G:C_G(x)]$$ So I guess I need to find $$|G|-\sum_x [G:C_G(x)]=|Z(G)|$$
Well $|S_4|=4!=24$
and $C_G(x)$ is the set of all group elements that commute with $x$. This seems like I would need to use brute force, and that would take a very long time, since each elements has numerous elements in it's centralizer. How do I work this out?
G= disjoint union of classes [x] under the conjugate relation. Any x aside from the identity element has only one of the forms: (12) with 6 elements , (123) with 8 elements , (1234) with 6 elements, (12)(34) with 3 elements elements. Thus the cardinalities of the nontrivial classes are 6,8,6,and 3. We are left with only one trivial class of one element and it is [e]={e}. Thus Z(G)={e}.