Given an elementary abelian $p$-group $A$ of order $p^n$ for $n\geq 2$ and choose a subgroup $H$ of order $p$ from $Aut(A)\cong GL(n,p)$. We can use semi-direct product $A\rtimes B$ to construct a nonabelian $p$-group containing an elementary abelian maximal subgroup. Is there any other example and a complete characterization of $p$-groups satisfying this property?



nonabelian $p$-group contains an elementary abelian maximal subgroup
Not every such group has this form, but they can be classified.


Let $G$ be a $p$-group containing an elementary abelian $p$-group $A$ as a maximal subgroup.


Being maximal, it is an index $p$ normal subgroup. Let $g$ be a generator of the quotient $G/A$. Then $g$ acts by conjugation on $A$ as a matrix $\sigma \in GL\_n(\mathbb F\_p)$


The unique eigenvalue of $\sigma$ is $1$ and thus it can be put in Jordan normal form, writing it as a block-diagonal matrix with $m\_k$ unipotent blocks of size $k$ for some sequence $m\_k$ satisfying $\sum\_k k m\_k =n$. Furthermore, since a unipotent block of size $k$ has order $>p$ if $k>p$, we must have $m\_k =0 $ for $k>p$.


Let $\alpha \in A = g^p$. We can express any element of $G$ as $a g^r$ with $a\in A$ and $r \in \{0,\dots, p-1\}$. The multiplication table of $G$ is determined by the relations $ ga g^{-1} = \sigma(a)$ and $g^p = \alpha$. We obtain a group with $A$ as an index $p$ subgroup this way if and only if $\alpha$ is $\sigma$-invariant.


The space of $\sigma$-invariants in unipotent block of size $k$ for $\sigma$ is one-dimensional. So it might seem that the space of choices of $\alpha$ is $\mathbb F\_p^{\sum\_{k=1}^p m\_k}$. However, up to automorphisms of $\mathbb F\_p^n$ commuting with $\sigma$, if $\alpha$ has a nontrivial component in any block of size $k$ then we can cancel the component in every other block of size $k$ and every block of greater size. Thus, the only information that matters is the least $k$ such that $\alpha$ has a component in a block of size $k$, or equivalently, the least $k$ such that $\alpha$ is not in the image of $(\sigma-1)^k$. Call this $k\_\alpha$, and if $\alpha=0$, set $k\_\alpha=\infty$.


The groups with relation $g^p=\alpha\_1$ and $g^p=\alpha\_2$ are equivalent if we can write $ g^p =\alpha\_1, (ag)^p=\alpha\_2$, or in other words if $a + \sigma(a) + \sigma^2(a) + \dots + \sigma^{p-1}(a) = \alpha\_2- \alpha\_1 $. Restricting to any block of size $<p-1$, $a + \sigma(a) + \sigma^2(a) + \dots + \sigma^{p-1}(a)=0$, so $\alpha\_1,\alpha\_2$ become equivalent under this if and only if their difference is supported in blocks of size $p$. In other words, the cases $k\_{\alpha}=p$ and $k\_\alpha=\infty$ are equivalent.


The last source of equivalence of the pair $(G,A)$ is changing $g$ for a power of $g$, but this just has the effect of multiplying $a$ by a constant and thus is already accounted for.


So the classification of pairs $(G,A)$ where $G$ is a $p$-group and $A$ is a maximal elementary abelian subgroup is given by tuples $(m\_1,\dots, m\_p,k\_{\alpha})$ of nonnegative integers where $\sum\_{k=1}^p k m\_k = n$, $1\leq k\_{\alpha} \leq p-1$ or $k\_{\alpha}=\infty$, and $m\_{k\_\alpha}>0$ unless $k\_\alpha=\infty$.


$G$ is nonabelian if and only if $m\_1 \neq n$.


Semidirect products only occur in the case $k\_\alpha=\infty$, so there are lots of nonabelian groups that aren't semidirect products.


