The last group of order $32$ I'm working on classifying the groups of order $32$ by hand, and I've done the following cases:

*

*All the abelian groups (there are $7$).


*The nonabelian groups with exponent (highest element order) $16$ (there are $4$).


*The nonabelian groups with exponent $8$ (there are $19$).


*All the nonabelian groups with exponent $4$ which have an abelian subgroup of index $2$ (there are $18$).


*The groups $G$ with $G/Z(G)\cong\mathbb{Z}_2^4$, the elementary abelian group. These are the $2$ extraspecial groups.
This accounts for $50$ of the $51$ groups of order $32$. I have thoroughly checked that these are the correct groups and that there are no isomorphisms between the groups. I know from the online resources that the final group is SmallGroup(32,6), but how do I prove by hand that this is the only group up to isomorphism?
Here is what I can prove so far about the group:

*

*It has exponent $4$ (all nonidentity elements have order $2$ or $4$), as I have classified all groups with an element of order $8$ or $16$.


*The centre $Z(G)$ has order $2$, as if the order was higher, the group would have an abelian subgroup of index $2$ (which I have covered).


*The quotient $G/Z(G)$ has an element of order $4$, as it is not elementary abelian.
The classification so far has been a somewhat tricky but manageable case bash. However, this final case seems to elude me. The fact that only one group remains suggests to me there may be an elegant proof that it is the only one.
 A: So I've managed it, but it's more in the style of the case-bash that I did for everything else. Please let me know if there is an easier/more elegant way. Here are my argument/proof sketch steps:

*

*Since $Z(G)$ has order 2, $G/Z(G)$ is of order 16 and has exponent 4, so it contains a subgroup isomorphic to $\mathbb{Z}_2\times \mathbb{Z}_4$. There's a proof of this, or you can just check the classification of groups of order 16).


*The inverse image of this in $G$ must be a nonabelian subgroup of order 16 and exponent 4. The only options are: $\mathbb{Z}_4\rtimes\mathbb{Z}_4$ (the action is inversion) and $(\mathbb{Z}_2\times \mathbb{Z}_2)\rtimes\mathbb{Z}_4$ (the action is swapping the generators).


*The centre of $\mathbb{Z}_4\rtimes\mathbb{Z}_4$ is a characteristic subgroup of order 4. This means that it is also in the centre of $G$. But we know that the centre has order 2. This removes $\mathbb{Z}_4\rtimes\mathbb{Z}_4$ as a possible subgroup, leaving only $H=(\mathbb{Z}_2\times \mathbb{Z}_2)\rtimes\mathbb{Z}_4$, with presentation: $$\large{H = \big<a,b,c \space  \big| \space a^2 = b^2 = c^4 = [a,b] = 1, ca=bc,cb=ac \big>}$$


*Let $d$ be an element in $G$ \ $H$. The action of conjugation by $d$ is an order 2 automorphism $\phi$ on H, as H has index 2 in G. The centre of $H$ is $\{1,ab,c^2,abc^2\}$, and $\{1,ab\}$ is characteristic, so to prevent the centre from having order larger than $2$, $\phi(c^2)=abc^2, \phi(abc^2)=c^2$, and $\phi(ab)=ab$.


*$\phi(a)$ could be equal to $a$, $ac^2$, $b$, or $bc^2$. However, if $\phi(a)$ is $b$ or $bc^2$, then by replacing $d$ with $cd$, this reduces to the previous two cases. Therefore we can take $\phi(a)=a$ or $ac^2$. Since $\phi(ab)=ab$, $\phi(b)$ must be either $b$ or $bc^2$ (corresponding to $\phi(a)$).


*Since $\phi(c^2)=abc^2$, $\phi(c)$ must be equal to one of the square roots of $abc^2$, which are $ac, ac^3, bc, bc^3$. However, by swapping $a$ and $b$, we can remove the last two options without loss of generality. If $\phi(c)=ac^3$, then $\phi^2(c)=\phi(ac^3)=\phi(a)\phi(c)^3=\phi(a)(ac^3)^3=\phi(a)bc$, which cannot be equal to $c$ regardless of whether $\phi(a)=a$ or $ac^2$, contradicting the fact that $\phi$ is an order 2 automorphism. Therefore, $\phi(c)=ac$.


*$c=\phi^2(c)=\phi(ac)=\phi(a)\phi(c)=\phi(a)ac$, so $\phi(a)=a$, and therefore $\phi(b)=b$. This fixes the action of $d$ on $H$. All that is needed now is to find what $d^2$ is, as it must be in $H$.


*Since $d$ has order at most 4, $d^2$ has order at most 2. It must also be an element that commutes with $d$. This leaves the options $d^2=1$, $a$, $b$, or $ab$ (as $c^2$ does not commute with $d$). However, as $d$ acts as an automorphism of order 2 on $H$, $d^2$ leaves all of $H$ unchanged by conjugation, so it must be in the centre. Therefore $d^2=1$ or $ab$.


*If $d^2=ab$, then $(c^2d)^2=c^2dc^2d=c^2abc^2d^2=abc^4ab=abab=1$, so we can use $c^2d$ instead of $d$. Therefore we have nailed down the presentation of the group $G$: $$\large{G = \big<a,b,c,d \space  \big| \space a^2 = b^2 = c^4 = d^2 = [a,b] = [a,d] = [b,d] = 1, ca=bc, cb=ac, dc=acd \big>}$$
By considering the subgroup $\big<a,b,d\big>$, which is isomorphic to $\mathbb{Z}_2^3$, one can see that $G$ is isomorphic to the faithful semidirect product $\mathbb{Z}_2^3\rtimes\mathbb{Z}_4$. This proves there is only one group G of order 32 and exponent 4 with no abelian subgroup of order 16 such that $G/Z(G)$ is not elementary abelian. QED.
A: (Replying to your answer) You can simplify this as follows:

*

*As already observed in your message, $G/Z(G)$ has order $16$ and exponent $4$.


*Let $x \in G$ such that $\overline{x}$ has order $4$ in $G/Z(G)$. Then $\langle \overline{x} \rangle$ is not normal: otherwise, since the exponent of $G$ is $4$, the inverse image of $\langle \overline{x} \rangle$ would be isomorphic to $\mathbb{Z}_4 \times \mathbb{Z}_2$, and we could write it as $\langle x,z \rangle$, where $z$ is the nontrivial element of $Z(G)$. Then, $x^2$ would be a central element of $G$ (because it generates a characteristic subgroup of $\langle x,z \rangle$), contradicting $Z(G)=\langle z \rangle$. Therefore, $\langle \overline{x} \rangle$ is not normal.


*Using the classification of groups of order $16$, the above property (no cyclic normal subgroups of order $4$) forces $G/Z(G)$ to be $\mathbb{Z}_2^2 \rtimes \mathbb{Z}_4$.


*The $\mathbb{Z}_2^2$ factor of $G/Z(G)$ corresponds to a normal subgroup $K<G$ of order $8$ such that $G/K \cong \mathbb{Z}_4$, and since $G$ has exponent $4$, it is a semidirect product $K \rtimes \mathbb{Z}_4$ defined by some $\varphi \in \text{Aut}(K)$.


*Let $y$ be a generator of the $\mathbb{Z}_4$ factor, so that $y^r$ acts on $K$ as $\varphi^r$. Then $\varphi$ has order $4$ in $\text{Out}(K)$: indeed, if $\varphi^2$ were an inner automorphism of $K$, it would coincide with the conjugacy by some $k \in K$ (which clearly fixes $k$), so that $k$ would commute with $y^2$, and then $k^{-1}y^2$ would be central in $G$ (since it commutes with $y$ and all elements of $K$, which generate $G$), contradicting $Z(G)<K$.
The only groups of order $8$ such that the outer automorphism group has an element of order $4$ are $\mathbb{Z}_4 \times \mathbb{Z}_2$ and $\mathbb{Z}_2^3$, and in both cases the semidirect product is unique up to isomorphism, so we only need to prove that these two groups are isomorphic: presenting the former as
$$
\left\langle a,b,y \; | \; a^4=b^2=[a,b]=y^4=1, yay^{-1}=ab, yby^{-1}=a^2b \right\rangle,
$$
the subgroup $\langle a^2,b,ay^2 \rangle$ is normal and isomorphic to $\mathbb{Z}_2^3$, and it intersects $\langle y \rangle$ trivially, so that it gives an isomorphism with $\mathbb{Z}_2^3 \rtimes \mathbb{Z}_4$.
