I have a relation $R$ on a set $G$ defined as $(a,b) \in R$ if $ab = ba$. It is pretty clear that this is reflexive and symmetric, but how do I prove or disprove transitivity?
Edit: As mentioned in the comments, I forgot to specify that $G$ is a group.
To be more explicit than the other answers, take the group $GL_2(\Bbb R)$ of invertible $2\times 2$ matrices. Let $a = \left(\begin{array}{cc} 1 & 1\\ 1 & 0\end{array}\right), b = \left(\begin{array}{cc} 1 & 0\\ 0 & 1\end{array}\right),$ and $c = \left(\begin{array}{cc} 0 & 1\\ 1 & 1\end{array}\right)$. Then $ab = ba = a$ and $bc = cb = c$, but $ac \neq ca$. Thus, this relation is not transitive.