Does there exist an operation that is commutative but not associative?
do you know what is operation?
$\endgroup$ 13 Answers
$\begingroup$Take rock-paper-scissors, for example.
More precisely: $*\colon \{0,1,2\}\times\{0,1,2\} \to \{0,1,2\}$ given by multiplication table
$$\begin{array}{c | c c c} & 0 & 1 & 2\\ \hline 0 & 0 & 1 & 0\\ 1 & 1 & 1 & 2\\ 2 & 0 & 2 & 2 \end{array}$$
which is obviously commutative, but not associative: $$(0*1)*2 = 1*2 = 2$$ $$0*(1*2) = 0*2 = 0$$
$\endgroup$ $\begingroup$Take for instance $f(x,y)=2x+2y$ on $\mathbb{N}$. Then $f(x,f(y,z))=2x+4y+4z$ and $f(f(x,y),z)=4x+4y+2z$.
Another example is $f(x,y)=2^{x +y}$ on $\mathbb{N}$. Then $f(x,f(y,z))=2^{x + 2^{y + z}}$ and $f(f(x,y),z) = 2^{2^{x + y} +z}$.
$\endgroup$ $\begingroup$Take any Lie algebra over a field of characteristic $2$, where the Lie bracket is not associative (in particular, is not $2$-step nilpotent). Then $[x,y]=[y,x]$ for all $x,y$, but $[x,[y,z]]\neq [[x.y],z]$. An example is the $3$-dimensional simple Witt algebra over characteristic $2$, with basis $(x,y,h)$ and brackets $[x,y]=h,[h,x]=x$ and $[h,y]=y$. If you prefer $x\cdot y$ for the Lie bracket, then $x\cdot y=y\cdot x$ is the commutativity, and $(x\cdot y)\cdot z\neq x\cdot (y\cdot z)$ the non-associativity.
$\endgroup$ 0