If group $G$ has 5 elements then $G$ abelian If $G$ - group and $|G|=5$ then $G$ must be abelian group.
My efforts: Let $G=\{a,b,c,d,e\}$ then $ab,\  ba\in G$. But it is easy to verify that $ab \neq a, b$ and if $ab=e$ then $ba=e$. Suppose that $ab=c$ then $ba\in \{c,d,e\}$


*

*If $ba=c$ then we get $ab=ba$

*If $ba=e$ then $ab=e=c$ which is conreadiction.

*We have the last case $ab=c$ and $ba=d$. Let's consider $aG=\{a^2,ab,a^2b,aba,a\}$ and $Ga=\{a^2,ba,aba, ba^2,a\}$. Since $c\neq d$ then $ab\neq ba$ so $ab=ba^2$ and $a^2b=ba$. But I am not able to derive that $ab=ba$.
Can anyone explain how to continue my reasoning?
 A: From $ab=ba^2$ and $a^2b=ba$ you get $a^2ba=ba^2=ab$, hence $aba=b$.  The identifications 
$$\{a,b,c,d,e\}=\{a,b,ab,ba,e\}=G=aG=\{a^2,ab,a^2b,aba,a\}=\{a^2,c,d,aba,a\}=\{a^2,c,d,b,a\}$$
now tell us $a^2=e$.  But then $d=a^2b=eb=b$, a contradiction.
A: The order $o(g)$ of any element divides $5$ and as this is prime, $o(g) = 1$ and so $g=1$, or $o(g) = 5$ and $g$ generates the group: $G = \{g, g^2, g^3, g^4, 1\}$. Cyclic goups are Abelian as $g^n g^m  =g^{n+m} = g^m g^n$ for all $n,m$.
A: But our $G$ is just a cyclic group.
Take $a\in G$ such that $a\neq e$ and consider $\{a^n|n\in\mathbb N\}$.
You'll get $a^5=e$ and $<a>=G$.
A: Since every group of order $5$ is cyclic, you can draw the Cayley table as follows:
\begin{array}{ c|cc } 
  \cdot & e & a & a^2 & a^3 & a^4\\ \hline
 e & e & a & a^2 & a^3 & a^4\\ 
 a & a & a^2 & a^3 & a^4 & e\\ 
 a^2 & a^2 & a^3 & a^4 & e & a\\
 a^3 & a^3 & a^4 & e & a & a^2\\
 a^4 & a^4 & e & a & a^2 & a^3\\
\end{array}
where $G=\{a,a^2,a^3,a^4,a^5=e\}=\langle a\rangle$.
A: Suppose any element $a,b,c,d$ has order $5$, without loss of generality, say $a$.
Then $G = \{e,a,a^2,a^3,a^4\}$, and is clearly abelian (since powers commute with themselves:
$a^ka^m = a^{k+m} = a^{m+k} = a^ma^k$).
So we want to investigate what other orders (besides $5$) elements might have.
Suppose an element (again, say $a$) has order $4$, so that:
$G = \{e,a,a^2,a^3,b\}$.
It is immediate that $ab \neq e,a,b$. Which leaves us with $ab = a^2$ or $ab = a^3$.
$ab = a^2 \implies a^3b = e \implies b = a$, contradiction.
$ab = a^3 \implies a^2b = e \implies b = a^2$, contradiction.
We conclude there is no element of order $4$.
Thus we could only have elements of order $2$ or $3$. Since elements of order $3$ occur in inverse-pairs (prove this!), we either have $0,2$ or $4$ such elements, and thus correspondingly, $4,2$ or no elements of order $2$.
If we have no elements of order $3$, and thus $4$ elements of order $2$, then:
$G = \{e,a,b,ab,c\}$, with $a^2 = b^2 = (ab)^2 = c^2 = e$.
So $e = (ab)^2 = abab \implies ba = ab$, and $H = \{e,a,b,ab\}$ forms a subgroup of $G$ (why?). In this case, we have $ac \neq e,a,c$, so $ac = ab \implies c = b$, or $ac = b \implies c = ba = ab$, both of which are impossible. So not every non-identity element is order $2$.
So we assume we have (exactly) two elements of order $3$, so that:
$G = \{e,a,a^2,b,c\}$ with $a^3 = b^2 = c^2 = e$.
Again, it is immediate that $ac \neq e,a,c$. If $ac = a^2$, then $c = a$, contradiction.
So we are down to $G = \{e,a,a^2,ac,c\}$ with $a^3 = (ac)^2 = c^2 = e$.
It is clear that $a^2c \neq e,a^2,c$. If $a^2c = a$, then $ac = e$, and if $a^2c = ac$ then $a^2 = a$, both impossible. This eliminates the possibility that we have just two elements of order $3$.
Finally, we assume $G = \{e,a,a^2,b,b^2\}$ with $a^3 = b^3 = e$.
Again, it is clear that $ab \neq e,a,b$. I leave it to you to show $ab = a^2$, and $ab = b^2$ cannot be.
I freely admit there may be shorter ways to do this.
A: It seems to me that a finite group of prime order is necessarily a cyclic group (hence it is abelian). Just take the sub-group generated by an element g not= id and use Lagrange’s theorem which says the order of a sub-group must divide the order of the group. 
