There Are Only Two Groups of Order 4 and Order 6
During our modern algebra class, the instructor mentioned that, up to isomorphism, there are only two distinct groups of order 4, and likewise only two groups of order 6, adding that this had once been a graduate-school entrance exam question in algebra. Hearing this, I got curious and looked into it, and found that the fact that there are only two non-isomorphic groups of order 4 is almost obvious — which made me wonder whether such a question was really challenging enough for a graduate entrance exam. Then I analyzed the order-6 case, and found it noticeably more complicated (more elements to deal with). Today, in real analysis class, I thought of a simplifying trick, and with it I managed to prove that there are only two non-isomorphic groups of order 6. I'll share the results and the process here.
The two groups of order 4
Whether we're talking about groups of order 4 or order 6, they are all finite groups. One nice feature of finite groups is that we can actually write out their multiplication tables (as long as we're willing to put up with some tedium). Since we want to study how many groups of order 4 there are, it suffices to enumerate the possible multiplication tables for order-4 groups. Let the order-4 group be $G_4=\{e, a, b, c\}$, where $e$ is the identity element. Based on this, we can already fill in part of the multiplication table:
$$\begin{array}{c|cccc} \cdot & e & a & b & c \\ \hline e & e &a &b &c \\ a & a & & & \\ b & b & & & \\ c & c & & & \end{array}$$
Next consider the possible value of $a^2$. It can only be $e$ or $b$ (if it equals $c$, that case is equivalent to it equaling $b$), so let's examine each possibility.
If it is $e$, then we fill in $e$ in the corresponding spot. At the same time, note this key fact: in a multiplication table, no result can repeat within a row or a column (this is just the rearrangement property of finite groups) — which makes constructing the table feel exactly like solving a Sudoku puzzle! So, after filling in $a^2=e$, we can push the table further to:
$$\begin{array}{c|cccc} \cdot & e & a & b & c \\ \hline e & e &a &b &c \\ a & a &e &c &b \\ b & b &c & & \\ c & c &b & & \end{array}$$
That leaves four blank entries, which must be either $\begin{array}{c}{a}&{e}\\{e}&{a}\end{array}$ or $\begin{array}{c}{e}&{a}\\{a}&{e}\end{array}$. It is not hard to check that both choices give a valid group multiplication table, so we end up with two possible "multiplication tables" for order-4 groups:
$$\begin{array}{c|cccc} \cdot & e & a & b & c \\ \hline e & e &a &b &c \\ a & a &e &c &b \\ b & b &c &e &a \\ c & c &b &a &e \end{array} \quad\text{and}\quad \begin{array}{c|cccc} \cdot & e & a & b & c \\ \hline e & e &a &b &c \\ a & a &e &c &b \\ b & b &c &a &e \\ c & c &b &e &a \end{array}$$
These two groups are, respectively, the Klein four-group and the cyclic group of order 4. The other case is $a^2=b$, which turns out to resolve itself in one go (once $b$ is filled in, everything else follows automatically):
$$\begin{array}{c|cccc} \cdot & e & a & b & c \\ \hline e & e &a &b &c \\ a & a &b & & \\ b & b & & & \\ c & c & & & \end{array}\quad\to\quad\begin{array}{c|cccc} \cdot & e & a & b & c \\ \hline e & e &a &b &c \\ a & a &b &c &e \\ b & b &c & & \\ c & c &e & & \end{array}\quad \to \quad \begin{array}{c|cccc} \cdot & e & a & b & c \\ \hline e & e &a &b &c \\ a & a &b &c &e \\ b & b &c &e &a \\ c & c &e &a &b \end{array}$$
This is simply another presentation of the cyclic group of order 4. Hence there are exactly these two cases, and no more.
The two groups of order 6
At order 6, our "Sudoku" becomes noticeably harder, because there are more elements, and correspondingly less information given at the start. As anyone who has played Sudoku knows, puzzles with less initial information tend to be much harder. So instead let's use some properties of groups to simplify our reasoning.
Since the group is finite, every element in an order-6 group has finite order, and by Lagrange's theorem, the order of any element must divide the order of the group, 6. Now suppose $a$ is an element of maximal order (one of possibly several) in the order-6 group; then $|a|$ is 6, 3, or 2. If $|a|=6$, then the group is simply the cyclic group of order 6 — that's the first case, and we're done with it. (Indeed, shifting perspective made things much quicker!)
The second case is $|a|=3$, i.e. $a^3=e$, so we already know three elements of the group: $e,a,a^2\equiv b$. Let the fourth element be $c$; then, by our assumption, the order of $c$ can only be 3 or 2 (it cannot exceed 3). But $|c|=3$ is impossible: if $|c|=3$, then the group would gain two more elements, $c,c^2$, giving us five known elements. But what about $ac$ and $ca$? Neither of them equals any of $e,a,a^2,c,c^2$, so both must be new elements — yet the group has order 6, so we'd need $ac=ca$, hence $(ac)^3=a^3 c^3=e$. But then what about $(ac)^2$? It clearly isn't any of $e,a,a^2,c,c^2,ac$, so the group's order would exceed 6 — a contradiction.
So instead $|c|=2$, giving us one more element, $c$. Consider $ac$ and $ca$: neither equals any of $e,a,a^2,c$, so both are new elements, and moreover $ac\neq ca$, because if $ac=ca$, then $(ac)^6=a^6 c^6=e$, and also $(ac)^3\neq e,(ac)^2\neq e$, which would make the order of $ac$ equal to 6! That contradicts the assumption that $a$ has maximal order. Hence $ac\neq ca$, and now all six elements of the group are accounted for: $e,a,a^2,c,ac,ca$. From here it's straightforward to write down the multiplication table:
$$\begin{array}{c|cccccc} \cdot & e & a & a^2 & c & ac & ca \\ \hline e & e & a &a^2 &c ∾ &ca \\ a & a & a^2 &e ∾ &ca &c \\ a^2 & a^2 & e &a &ca &c ∾\\ c & c & ca ∾ &e &a &a^2 \\ ac & ac & c &ca &a^2 &e &a\\ ca & ca & ac &c &a &a^2 &e \end{array}$$
The final case is $|a|=2$ — but is this even possible? If $|a|=2$, we only know two elements of the group so far, $e,a$. Consider a third element $b$; its order can only be $2$, so now we know three elements: $e,a,b$. Now consider $ab,ba$: if they're not equal, we get five known elements of the group. But then what happens with the sixth element? If we introduce a new element $c$, that forces yet another new element $ac$, and so on, pushing the group's order beyond 6! But even if $ab=ba$, it still doesn't work, because then we'd have four elements $e,a,b,ab$, and introducing a new element $c$ would force $ac,abc$ to all be distinct new elements as well — again pushing the order past 6! Both sub-cases lead to a contradiction.
Therefore there are exactly two non-isomorphic groups of order 6.
What about order n?
The analysis for order 6 already ran quite long, so if a reader wants to work out the number of groups of order 8, that will take considerable courage and patience (the answer is 5). Interestingly, analyzing groups of order 9 or 10 is actually simpler — the answer in both cases is 2 — since the complexity depends heavily on the number of divisors of the order $n$. For partial results, see:
http://zh.wikipedia.org/wiki/小群列表
http://www.douban.com/note/245316892/
Although the analysis above turned out rather long-winded and somewhat clumsy, the truth is that even with more sophisticated methods, one doesn't get much more insight than what the approach here already provides. Determining the number — and explicit construction — of non-isomorphic groups of order n is a remarkably hard problem in general; to this day there is no formula that gives the number of non-isomorphic groups for an arbitrary given n. According to material from baike.com, even the seemingly narrower question of how many non-isomorphic groups of order $p^k$ exist is a hard problem — so far it has only been resolved for the case where p is an odd prime with k≤6, and for p=2 with k≤7, in determining the number of groups of order $p^k$.
Translated automatically with claude-sonnet-5; all equations are reproduced verbatim from the source. Copyright remains with the original author.