October 9, 2006

Let $S$ be a set and let $*$ be a binary operation on $S$ satisfying the laws
$x*(x*y)=y$ for all $x$, $y$ in $S$

$(y*x)*x=y$ for all $x$, $y$ in $S$

Show that $*$ is commutative but not necessarily associative.

Solution.  Let's call the two given properties (1) and (2). If we interchange $x$ and $y$ in (2), we have that $(x*y)*y=x$. Therefore,

$(x*y)*x=(x*y)*[(x*y)*y]=y,$

where the last step follows from property (1) with $x*y$ in place of $x$. Now we obtain

$y*x=[(x*y)*x]*x=x*y,$

where in the last step we applied (1) with $x*y$ in place of $y$. Thus $*$ is commutative. To see that $*$ is not associative, let $S$ be the set of all integers. Define $x*y=-x-y$. Then $*$ satisfies (1) and (2), but

$x*(y*z)=-x+y+z; \quad (x*y)*z=x+y-z$,
which are unequal as long as $x\neq z$.