Prove G is abelian. Let G be a group. Prove or disprove: We have $(g_1 * g_2)* g_3 = (g_3 * g_2) * g_1 \forall g_1, g_2, g_3 \in G$ if and only if G is abelian.
I am currently studying my old notes but it seems I found this intuitively easy to prove before that I did not write out a formal proof, but am unable to prove it now. Any suggestions are helpful.
 A: If you put $g_3=1$ in the equality, you have $g_1g_2=g_2g_1$.
A: The backward direction (if $G$ is abelian, then the statement in your question holds) should be straightforward - use associativity an the abelian property to change the left-hand side into the right-hand side.
For the forward direction, note that $g_1,g_2$, and $g_3$ have their relative positions swapped in the equation. So in particular, if you set one of them, say $g_1$, equal to the group identity element, then that equation says $g_2*g_3=g_3*g_2$. You are allowed to do so because the equation holds for all $g_1\in G$, and the resulting equation $g_2*g_3=g_3*g_2$ then also holds for all $g_2,g_3 \in G$.
A: Set the middle factor equal to $1_G$: $gh=(g1_G)h=(h1_G)g=hg$. Come to think of it, you can set any of the three factors to $1_G$ and get the result.
A: If $G$ is abelian, the equation follows. Conversely, Let $g_1, g_3$ be arbitrary. Then by setting $g_2=e$ and by using your relation we get
$$g_1 \cdot g_3=(g_1 \cdot e) \cdot g_3=(g_3 \cdot e) \cdot g_1= g_3 \cdot g_1$$
Since $g_1, g_3$ were arbitrary elements, $G$ is abelian.
