How to Construct a Non-abelian Group with p^3 Elements
Recently, while working through the exercises in Chapter 6 of Silverman’s Abstract Algebra: An Integrated Approach, I came across the following challenge problem.
6.16 (d): Challenge Problem. Construct a non-abelian group of order for every prime .
First attempts
We know that when , two examples immediately come to mind: and . But for other primes , this does not seem obvious at all—at least not for someone encountering this problem for the first time. The difficulty of the problem lies in the “non-abelian” condition: it is a rather tricky requirement, and at this point I did not yet have any handy tools for dealing with it.
So I recalled an exercise from our university textbook:
Let , and define . Prove that forms a group under the operation .
A quick check shows that this operation is indeed noncommutative. So this gives a non-abelian group on , with identity element . But here the underlying set is ; how can we “adapt” it to a group of order ?
One direct idea is to let , and simply copy the textbook operation. However, this does not work, because some elements do not have inverses. For example, you cannot find an inverse for the element , since , so this construction does not form a group.
So my exploration got stuck. It seemed that we might need to impose some additional restrictions on the domains of and , but how exactly to do that was far from clear. At this point, this line of thought appeared to hit a dead end.
The semidirect product approach
Then one day, while randomly flipping through later parts of Silverman, I noticed a new symbol: , called the semidirect product. It looks like an ordinary direct product that has somehow been “twisted,” so the resulting group ought to be noncommutative.
So I tried to construct . But how exactly is such a construction carried out? The textbook explanation was long and cumbersome, and I was too lazy to read it carefully, so I asked GPT for the construction of a semidirect product, and got the following answer:
I had only just encountered the notation for the first time in exercise 6.26 on Sylow theory. It seemed to mean “automorphisms,” and then one also has to prove that is isomorphic to . So I gradually understood that is actually a set of maps, whose objects are “maps” rather than “elements,” and these maps are required to be isomorphisms.
Then I thought about it heuristically. For a cyclic group , suppose its generator is . If is sent to (where ), then every original element gets sent to , and there are only distinct elements of the form . So such a map certainly cannot be bijective, and hence cannot be an isomorphism. Therefore a natural conclusion is that , which corresponds exactly to the elements of .
Now let us return to , namely . By the same reasoning, we immediately get , and its elements are .
The next question is this: we need a homomorphism , and the image is a subgroup of ; meanwhile, by the First Isomorphism Theorem, . Hence , so can only be or . The former is obviously the trivial map , corresponding to the direct product, which does not satisfy the non-abelian requirement. Therefore, we are forced to consider how to construct a subgroup of isomorphic to .
Let us restate the goal: within the set , we want to choose elements forming a cyclic group of order .
At first glance, this does not seem easy. To gain some intuition, I tried the case . Then . First of all, must be in the subgroup. Then the remaining two elements are and . Let us check whether closure holds:
, in which case the group would be . Clearly is not in the set, so this is ruled out.
, in which case the group would be . And , so closure holds, and this is a valid choice.
Thus for , the valid exponents are . At this point, a clever reader may boldly guess that for arbitrary , the corresponding values should be . Let us check whether this really works—which is equivalent to the following classical number-theoretic congruence:
The proof is easy by the binomial theorem:
Therefore, we have found a valid homomorphism satisfying:
Substituting this into the original semidirect product formula gives:
But there is actually a slight problem with this notation, because is an operation between a group element and an integer, and such an operation is not defined. So we need to specify explicitly that , and then replace the original multiplication by addition, and exponentiation by multiplication. This yields:
If we check associativity (you can use a computer algebra system to reduce the pain of hand computation), we find that whether we associate left or right, the result is .
As for commutativity, , which are not equal, so the group is non-abelian.
The identity element is easily seen to be . As for inverses, we seek such that . Clearly , and then we have . Since is not divisible by , it has an inverse modulo , hence .
In summary, we have successfully constructed a non-abelian group of order .
Relation to the textbook construction
Although I had solved the problem, I was still curious whether the textbook route was really a dead end. In fact, if one looks carefully, the structure of the textbook operation is somewhat similar to my answer, so let us try to transform the textbook operation a bit:
Set , and then the equation becomes:
This at least confirms that it bears some resemblance to the formula we derived earlier, . But there are still some differences in the details: for instance, the element probably needs to be modified, and the term on the right somehow has to be turned into addition.
Note that our operation is taking place in , so . Then what about ? We can try to reinterpret the earlier homomorphism in additive form, namely by setting
As shown earlier, all form a subgroup of of size . Therefore we may let , and take . In this way we indeed obtain a valid non-abelian group of order .
To summarize, the situation now is:
.
Of course this is not the end yet. In order to simplify it into exactly the same form as our previous answer, we need to reparametrize as . So we make another change of variables, setting:
Thus:
And the latter corresponds to , so in fact the original formula has already transformed into:
Finally, substituting back gives:
which is exactly the result obtained in the previous section. GPT’s comment on this was:
Your group of order is a specialization of the textbook’s “affine-type” group law to a particular -subgroup of the acting group; the two formulas differ only by coordinate order and reparametrization.
Are there any others?
In fact, for odd primes , there are only groups of order , of which three are abelian:
and two are non-abelian. Namely the Heisenberg group :
and the one we constructed:
We can prove that for odd primes , is not isomorphic to , because has an element of order , namely . Now take and consider the order of . Let
Then:
Observe that for , 𝟘, so and all subsequent terms vanish. Also, , so we obtain:
Since , we have if and only if . In that case , which shows that is not isomorphic to .
Finally, what happens when ? One can prove that both and are isomorphic to the mentioned at the beginning of this post. Together with , there are still five types in total. This shows that is really an outlier: it cannot be seen at a glance from the most naive semidirect product intuition.