TITLE: Can a group with exactly five subgroups be nonabelian?
QUESTION [8 upvotes]: I was wondering if there is an example of a nonabelian group $G$ with exactly five subgroups. Let $G$ be a such group, and let $a,b\in G$ be such that $ab\ne ba$. Let us concentrate on the subgroups $\langle a\rangle, \langle b\rangle, \langle ab\rangle$ and $\langle ba\rangle$. 
If $a$ commute with $ab$ or $ba$, then $a$ would commute with $b$, and similarly for $b$ instead of $a$. Therefore the only possible inclusion between our cyclic subgroups is between $\langle ab\rangle$ and $\langle ba\rangle$; in particular none of the considered cyclic subgroups can be equal to $\{e\}$ or $G$.
Thus, the three nontrivial proper subgroups of $G$ are $\langle a\rangle, \langle b\rangle$ and $\langle ab\rangle=\langle ba\rangle$, and $G=\langle a,b\rangle$. Each one of these three subgroups must have prime order and they intersect trivially. Finally, $G$ must be finite (every group with finitely many cyclic subgroups is finite; prove it!) and $|G|$ is multiple of at most three primes.
Any ideas to "concretize" this hypothetical group?

REPLY [3 votes]: I worry that you claim $G$ has at most three prime divisors. I assume this is because each of $\langle a \rangle$, $\langle b\rangle$, and $\langle ab \rangle$ have prime order. However, subgroups cannot choose one prime each and this is a very important part of the structure of finite groups.
Here is something to get you thinking: Let $g,h,k$ be elements of a group. Then $k^{-1} (gh) k = k^{-1} g k \cdot k^{-1} h k$ so subsets of the form $\{ k^{-1} x k : x \in H \}$ are subgroups if and only if $H$ is a subgroup. These are called conjugate subgroups, and that set is usually called $k^{-1} H k$ or just $H^k$ for short. Notice that $k^{-1} g k = k^{-1} h k$ if and only if $g = h$, so conjugate subgroups have the same order.
This means that when $\langle a \rangle$ claims the prime $p$, we gets lots of subgroups of order $p$: $H=\langle a \rangle$ and all of its conjugates. If $\langle b \rangle$ claims the prime $q$, then we get $H$, $H^b$, $H^{b^2}$, $H^{b^3}$, all the way to $H^{b^{q-1}}$. Since $q$ is prime, Lagrange's theorem shows that either we just got $q$ different subgroups with order $p$, or every single one of them is the same.
One of Galois's insights is that in this case (all the conjugates of $H$ are equal) we can form a smaller group $G/H$, where the elements are subsets of the form $Hb^i$ for $i=0,1,\ldots,q-1$. Each of those subsets are disjoint, so we get a total of $pq$ elements.
In other words, the idea of conjugate subgroups should have immediately led you to conclude $G$ is divisible by at most 2 primes, and pretty soon that those primes had to both be at most 2, but that they needed to be different primes. (So, no, sorry there is no such group.)
At any rate, each prime $p$ dividing the order of a group brings with it an entire space of $p$-subgroups, and it is very difficult for that space to be small. The only way it can be small is when nothing commutes (you have gotten that idea already, so that's very good). The way things commute is described by a graph whose vertices are the primes dividing the group order and edges exist between $p$ and $q$ if there is an element of order $p,q$. In order for both the $p$-space and the $q$-space to be "skinny", it is necessary that $p$ and $q$ be connected in the graph, but then you get a whole new space of $pq$-groups.