If consecutive elements commute each other, does it mean that all of them commutes with each other? Let $x_1,x_2,...,x_k$ be $k$ different elements of a group $G$ and $k\geq4$.
If we know that $x_i$ commutes with $x_{i+1}$ and $x_k$ commutes with $x_1$, can we say that all $x_i$ commutes with each other ?
 A: No. Consider elementary matrices. Let $e_{ij}$ denote the matrix with $(i,j)$ entry $\delta_{ij}$. Let $e_{ij}(\lambda)=1+\lambda e_{ij},i\neq j$. Assume $n>2$. We have the so called Steinberg relations 
$$\begin{align}&(1)& e_{ij}(\nu)e_{ij}(\mu)&=e_{ij}(\nu+\mu)\\ 
&(2)& [e_{ij}(\nu),e_{jk}(\mu)]&=e_{ik}(\nu\mu)&\text{ if }i\neq  k\\
&(3)&[e_{ij}(\nu),e_{kl}(\mu)]&=1&\text{ if }i\neq k,j\neq k\end{align}$$
This should allow you to build examples of arbitrary length. For example, $$e_{15}(\nu),e_{24}(\mu),e_{53}(\xi),e_{24}(\zeta)$$
gives such a sequence. Note that the relations simply reflect how column or row operations behave with each other. 
A: Let $C$ denote the graph corresponding to a cycle of length four and let $G(C)$ be the associated right-angled Artin group. If your statement were true, $G(C)$ would be an abelian group, and more precisely a free abelian group of rank four. Such a group is also a right-angled Artin group, namely $G(K)$ where $K$ is the complete graph on four vertices. However, it is known that $G(C) \simeq G(K)$ is equivalent to $C \simeq K$, and the latter isomorphism is clearly false.
A: Let $G = S_5$, the symmetric group of 5 elements. Let $x_1 = (1,2), x_2 = (3, 4), x_3 = (1, 5), x_4=(2, 4), x_5 = (3, 5).$
