Let $G$ be a finite group which has a total of no more than five subgroups. Prove that $G$ is abelian. 
Let $G$ be a finite group which has a total of no more than five subgroups. Prove that $G$ is abelian.

I can prove that if $\left|G\right|\leq5
 $ then $G$ is abelian. Is it equivalent to this problem? If it isn't, give me some hints to prove.
Thanks in advanced.
 A: Well, the trivial subgroup and $G$ itself are subgroups, so you are down to three subgroups (unless $G$ is the trivial group, which is abelian). The order of the group is either a prime power, or has at least two prime factors. Can it have more than two prime factors? What if it has exactly two prime factors?
To answer @PraphullaKoushik I haven't thought about it, but take a cyclic subgroup generated by some element of your group. Either it is the whole group (in which case you are done), or it is not. If it is not, and still not of prime order, it has at least two proper subgroups, and we are out of subgroups, so there is no other element, so the group  $G$ is cyclic. So, the subgroup IS of prime order. Take some element not in it. Repeat the argument. You have a second subgroup of prime order, and you have used up $p_1 + p_2 - 1$ element. Take a third element (it must exist, since the order of the group is at least $p_1 p_2 > p_1 + p_2 - 1.$) Repeat the argument. Now, no more subgroups, you have used up $p_1 + p_2 + p_3 -2$ elements, which must be all the elements in the group.
A: Prove the contrapositive. Assume $G$ is nonabelian.
We can pick $a \in G - Z(G)$ with $o(a) \neq 2$, otherwise $G$ would be abelian. Pick $b\in G$ such that $ab \neq ba$.
If $ba$ and $ab^{-1}$ commute, $1, G, \langle a^2 \rangle, \langle a \rangle, \langle b \rangle, \langle ab \rangle$ are distinct. Otherwise, $1, G, \langle a \rangle, \langle b \rangle, \langle ba \rangle, \langle ab^{-1} \rangle$ are distinct.
A: I think this works also.
Suppose that a group $G$ is non-abelian, and choose elements $a$ and $b$ in $G$ such that $ab\neq ba$.  Then the cyclic subgroups $\langle a\rangle$ and $\langle b\rangle$ are distinct, non-trivial proper subgroups of $G$.  Since no group is the union of two proper non-trivial subgroups, there is an element $c\in G\setminus(\langle a\rangle\cup\langle b\rangle)$, and it generates another cyclic subgroup $\langle c\rangle$ distinct from $\langle a\rangle$ and $\langle b\rangle$.  We now have five subgroups $1$, $G$, $\langle a\rangle$, $\langle b\rangle$ and $\langle c\rangle$, so we need only find a sixth.  If any of $a$, $b$ and $c$ has non-prime order, then the cyclic subgroup it generates has a proper, non-trivial subgroup distinct from the first five.  Therefore, we can assume that $a$, $b$ and $c$ each have prime order.
If $G\neq\langle a\rangle\cup\langle b\rangle\cup\langle c\rangle$, we are done as before, since we can choose an element $d\in G\setminus(\langle a\rangle\cup\langle b\rangle\cup\langle c\rangle)$ which generates a new cyclic subgroup.  Therefore, assume that $G = \langle a\rangle\cup\langle b\rangle\cup\langle c\rangle$.
We can assume that at least one of $a$, $b$ and $c$ has order greater than $2$ since, otherwise, $G$ is abelian.  Suppose the order of $a$ is greater than $2$.  Then  $ab, a^{2}b\not\in(\langle a\rangle\cup\langle b\rangle)$, and we must have $ab,a^{2}b\in\langle c\rangle$.  Suppose that $ab = c^m$ and $a^{2}b = c^n$, for non-zero integers $m$ and $n$.  Then $a^{-1}c^m = b = a^{-2}c^n$, so $a = c^{n-m}$, which contradicts $a\not\in\langle c\rangle$.
A: The list of all possible groups (ie. at most 5 subgroup) are:
$\mathbb{Z}_{1}$
$\mathbb{Z}_{p^{k}}$ with $p$ prime and $k\leq 4$
$\mathbb{Z}_{pq}$ with $p,q$ prime
$\mathbb{Z}_{2}\times\mathbb{Z}_{2}$
Proof:
We already have 2 subgroup being the trivial and improper groups. Hence we attempt to find the 4th forbidden proper nontrivial subgroup to cause contradiction. Assuming $G$ is not trivial.
Pick the biggest (in term of order) cyclic subgroup $C$. We know that $C$ is not trivial because every element generate its own cyclic group. If $C=G$, then $G$ is cyclic. In this case, every divisor of $|C|$ form a subgroup, so there cannot be more than $5$ divisor. Hence $|C|$ can only have at most $2$ prime factors. If it have one, then $|C|=p^{k}$ for some $k\leq 4$ and $p$ prime. Otherwise, $|C|=pq$ for some $p,q$ prime.
Otherwise pick the biggest cyclic group $D\not\subset C$. Then we also have $C\not\subset D$. We know this is possible because any element not in $C$ generate its cyclic group.
Can this union of $C$ and $D$ be the whole $G$? If it is, let $p,q$ be their order and $r$ be the intersection's order. Then $|G|=p+q-r$ but somehow $p$ and $q$ must both divide $|G|$, which is a contradiction, because $p,q>r>0$.
Hence once again we can find the biggest cyclic group $E$ that is neither subset of $C$ or $D$. Now, we already have 3 proper non-trivial group. So firstly there is no way they can intersect non-trivially. From this point we will ignore which group is produced first and just refer to 3 of them as $C,D,E$, think of it as renaming them. Also, the union must be all of $G$ otherwise we would have even more group. Hence let $p,q,r$ be the order respectively. We have $|G|=p+q+r-2$ and $p,q,r$ each divide $|G|$. If $p=q=r$ then it must be $p=q=r=2$ so $|G|$ have order 4 which is easily seen to be abelian. If not, then one of the number must be different from the other 2, let's say $p$. Then $p$ must be normal, otherwise inner automorphism would produce the forbidden 4th group. Then $CD,CE$ is a subgroup, so $CD=CE=G$. Therefore $q=r$ so $|G|=pq=p+2q-1$ so $q(p-2)=p-1$ which means $p=3;q=r=2$ and $|G|=6$. We already know the order of $5$ of the element, which is $1,3,3,2,2$. If there is any element of order $6$, then it's cyclic and thus contradict the maximum condition. But if not, then remaining element cannot have order $3$, hence must have order $2$, and that form the forbidden 4th subgroup.
Conclusion: check the list, they are all abelian.
