Finite Groups with exactly $n$ conjugacy classes $(n=2,3,...)$

Nice question! The $n = 3$ case is fun and I think small values of $n$ are going to make very good exercises so I encourage you to work on them yourself, but if you really want to know a solution....

If $H_1, H_2$ denote the stabilizers of the non-identity conjugacy classes with $|H_1| \le |H_2|$, then the class equation reads $|G| = 1 + \frac{|G|}{|H_1|} + \frac{|G|}{|H_2|}$, or

$$1 = \frac{1}{|G|} + \frac{1}{|H_1|} + \frac{1}{|H_2|}.$$

The reason this is useful is that if either $|G|$ or $|H_1|$ gets too big, then the terms on the RHS become too small to sum to $1$. Since we know that $|G| \ge 3$, it follows that we must have $|H_1| \le 3$; otherwise, $\frac{1}{|H_1|} + \frac{1}{|H_2|} \le \frac{1}{2}$ and the terms can't sum to $1$.

Now, if $|H_1| = 2$ then $|H_2| \ge 3$, hence $|G| \le 6$. Since every group of order $4$ is abelian we can only have $|G| = 6, |H_2| = 3$. The unique nonabelian group of order $6$ is $S_3$, which indeed has $3$ conjugacy classes as desired.

If $|H_1| = 3$, then $|G| \ge 3$ implies $|H_2| \le 3$, hence $|H_2| = |G| = 3$ and $G = C_3$.


You may want to know that in case of infinite groups the situation is entirely different. In 1949 Graham Higman, Bernard H. Neumann and Hanna Neumann wrote a now world-famous paper called Embedding Theorems for Groups. It embeds a given group G into another group G' , in such a way that two given isomorphic subgroups of G are conjugate (through a given isomorphism) in G'. Hence one can embed any countable group in a group with the property that any two elements of equal order are conjugate. So, using that result, you need only begin with your favourite (non-trivial) torsion free group, and you get an infinite group with only two conjugacy classes! The proof of this HNN-extension construction uses the idea of taking an ascending union. At each step, you can use the HNN extension construction to embed $G_k$ in a group $G_{k+1}$, in which any two elements of $G_k$ are conjugate provided only that their orders are equal (it may be, however, that two elements of $G_{k+1}$ with infinite orders are not conjugate in $G_{k+1}$ itself). After forming the union of the chain ${G_k}$ of groups, any two members with the same order belong to some $G_n$, and they are then conjugate in $G_{n+1}$.


The problem of classifyng finite groups by the number of conjugacy classes is classical, and as far as I can tell (group theory is not my field), hard. In this paper, the authors classify all finite groups with at most $11$ conjugacy classes.