Is the Center of G the same as the Centralizer of g in G? Is the center, $Z(G)$, of a group $G$ the same as the centralizer, $C(g)$, of an element $g\in G$?
I have proven that $C(g)\leq G\forall g\in G$ but my homework, in a later problem, asks me to prove that $Z(G)\leq G$. This confuses me, because I thought $C(g)$ is the same as $Z(G)$.

Consider a group (G, *).
Let 'g' be a fixed element of G.
The set of all the elements in G that commute with 'g' is known as the centralizer of 'g'. It is denoted by C(g).
The set of all the elements in G that commute with every element of G is  known as the center of G. It is denoted by Z(G).
There can be many elements in G that commute with a fixed element g € G but we can't say that those same elements commute with every element of G.
There might be some elements in C(g) that belong to Z(G) but not all the elements of C(g) are in Z(G).
Therefore C(g) is not the same as Z(G). At least most of the time.
But every element of Z(G) is always in C(g) of every element . Because the elements that commute with every element of G commute with a fixed element also.
Therefore, the centre is always a subset of the centralizer but not the other way around. The centre might sometimes be equal to one of the centralizers.
All the centralizers and the center of a group are subgroups however.
The answers mentioned before explain the concept really well but while I was learning, I broke it all up this way and it really helped.
Hope this helps you all too.
Thank you.
