# Classifying $2$-groups with cyclic center of order $2^n$ and index $4$

If $G$ is a $2$-group with cyclic center having order of $Z(G)=2^n$ and index of $|G/Z(G)|=4$, then how many groups of a particular order are possible?

I know that there are two possibilities for such a group:

1. $G = \langle x,y,s \mid x^2 = y^2 = 1\rangle$ with $x,y \in G$ and $s$ is generator of center,
2. $G = \langle x,y,s \mid x^2 = y^2 = s\rangle$, where $Z(G) = \langle s \rangle$ and $|G/Z(G)|=4$.

Further I know some properties of these groups:

1. $x^2 \in Z(G)$ for every $x \in G$,
2. $xy = yx$ or $xy = eyx$ for $e \in Z(G)$.

How to prove that these are the only two possibilities?

• I think a more essential question is whether the case 2 determines the group up to isomorphism? Working on it... – Jyrki Lahtonen Jan 9 '16 at 9:57
• @JyrkiLahtonen I have added a brief explanation to my answer. – Derek Holt Jan 9 '16 at 10:38

If $x^2 = s^{2k}$ for some $k$ then $(xs^{-k})^2=1$ so by replacing $x$ by $xs^{-k}$, we may assume that $x^2=1$.
If $(xs^{-k})^2=s$ so by replacing $x$ by $xs^{-k}$, we may assume that $x^2=s$.
So we may assume that $x^2=1$ or $s$ and similarly $y^2=1$ or $s$, and also $z^2=1$ or $s$, where $z=1$ or $s$. So by replacing $x$ or $y$ by $z$ if necessary, we can get either $x^2=y^2=1$ or $x^2=y^2=s$, giving the two possibilities.
To show that the groups are uniquely defined up to isomorphism, we also have to show that the commutator $[x,y] = x^{-1}y^{-1}xy$ is determined. Since $[x,y] \in Z(G)$, we have $[x,y]^2 = [x^2,y] = 1$. So (since $G$ is nonabelian) we must have $[x,y]= s^{2^{n-1}}$ in both cases.
We know $G/Z(G)$ is not cyclic (or else $G$ is abelian), so $G/Z(G)$ is the Klein Four-Group, in which every element is self inverse, hence $g^2\in Z(G)$ for every $g$. Property 2 follows from the fact that $Z(G)$ must contain the commutator subgroup of $G$, because $G/Z(G)$ is abelian.