centre of a subgroup Let $H$ be a subgroup of a group $G$.
I know that $Z(G) = \{a \in G \mid ag = ga ,\forall g \in G\}$.
I was asked to show that $Z(G)$ is a subgroup of $Z(H)$, but this doesn't make sense if $Z(H) = \{a \in H \mid ah = ha ,\forall h \in H\}$.
So, is this the right definition of $Z(H)$? or is it in fact,
$Z(H) = \{a \in H \mid ag = ga ,\forall g \in G\}$?
Thank you for any help.
 A: Your first definition of $Z(H)$ is correct, that is $Z(H) = \{a \in H \:|\: ga = ag \text{ for all } g \in H\}$ (just take the definition of the center of $G$ and replace all instances of $G$ by $H$), but what you try to prove is not.
As an example why $Z(G)$ is not in general contained in $Z(H)$, take $G = \mathbb{Z}$, then $Z(G) = G$, as $G$ is abelian. The trivial group $H = \{0\}$ is a subgroup of $G$ and we have $Z(H) = \{0\}$ which clearly does not contain $G$. 
However, if we replace the center of $H$ by the centralizer $C_G(H)$ of $H$ in $G$, which is defined by $C_G(H) = \{g \in G \:|\: gx = xg \text{ for all } x \in H\}$, then we clearly have $Z(G) \subseteq C_G(H)$.
A: Given $(X\subset G)$, the centralizer $Z_G(X)=\{g\in G, g.x=x.g,\forall x\in X\}$  is the set of all elements of $G$ permutable with all the elements of subset $X$.
For any set $G$ with an associative law on it i.e. when $G$ is an associative magma, the centralizer of any subset $X\subset G$, $Z_G(X)$ is a always a stable subset of $G$ for the law: $Z_G(X).Z_G(X)\subset Z_G(X)$ (in other words any compound element $x.y$ keeps being in $Z_G(X)$ provided $x$,$y$ are themselves in $Z_G(X)$). If magma $G$ is unital with unit element $1$, $1\in Z_G(X)$ is always true: it is central i.e. permutable with any element of $G$. Now if you consider any two subsets $X$, $Y$ of magma $G$ (its law being associative or not), you have always $X\subset Y \Rightarrow Z_G(Y)\subset Z_G(X)$. Demonstrate all of this, this is not so complicated.
I think you are considering $Z_G(H)=\{a\in G, a.h=h.a,\forall h\in H\}$ where $G$ is a group and $H$ some subset of $G$. Then accordingly to what has been said $Z_G(H)$:


*

*is stable for the law

*has 1 in it 


If you want further induce a richer subgroup structure on $Z_G(H)$ you simply have to check that 


*$Z_G(H)$ is stable for $G$-group central inversion $a\in Z_G(H)\Rightarrow a^{-1}\in Z_G(H)$. This is obviously the case, since for any $a\in Z_G(H)$
and $h\in H$, $ah=ha\Rightarrow ha^{-1}=a^{-1}h$. In a group, every invertible element is a central element (is permutable with every other element of the group).


You find that $Z_G(H)$ is a subgroup of $G$. Note that you obtain this 
result $H$ being itself a subgroup or not (i.e. only a subset of group $G$).
The property of inclusion tells you a centralizer on $G$ is a decreasing function on the set of subsets of $G$ ordered by inclusion. Hence $Z_G(G)$ is always the smallest centralizer on G to be defined ($G$ being a magma, a monoid, group, or any richer algeabraic structure). This property lets you obtain $Z_G(G)\leq Z_G(H)\leq G$ in your case. 
Hope this helps. 
