A commutative but not necessarily associative operation Let $S$ be a set and let $*$ be a binary operation on $S$ satisfying the laws
\begin{align}
        x*(x*y) &= y \quad \text{for all } x, y \text{ in } S,\\
        (y*x)*x &= y \quad \text{for all } x, y \text{ in } S
 \end{align}
Show that $*$ is commutative but not necessarily associative.
I was thinking of letting $x = (a *b)$, $y = b*a$ for each relation and then flipping the values of $x$ and $y$ but this doesn't seem to get me anywhere. Some hints would be greatly appreciated!
 A: There are two parts of the question: a proof of commutativity, and an example of non-associativity. There is an example in the comments that doesn't work, and while there are two previous answers containing arguments, they are, for my tastes, too terse. So, I'm writing an answer.
First, an example. Consider the following operation on $\Bbb{R}$:
$$x * y = -x - y.$$
Then
$$x * (x * y) = x * (- x - y) = - x - (- x - y) = y.$$
Clearly $x * y$ is commutative too, so the other property holds. However, it is not associative, as
$$(1 * 2) * 3 = (-3) * 3 = 0 \neq 4 = 1 * (-5) = 1 * (2 * 3),$$
so associativity doesn't hold in this case.
Next, we have a proof that commutativity does hold in general. Note that our first equalities give us cancellation laws; if we have $a * c = b * c$, then $(a * c) * c = (b * c) * c$, and so $a = b$ (and similarly for the other cancellation law). So, if $x, y \in S$, then
\begin{align*}
x * y = y * x &\iff x * (x * y) = x * (y * x) \\
&\iff y = x * (y * x) \\
&\iff y * (y * x) = (x * (y * x)) * (y * x) \\
&\iff x = x,
\end{align*}
which is true. All the steps work in reverse, by the cancellation laws and the assumed properties.
A: The example of not-necessary associative you saw already.
It's commutative because $$yx=((xy)((xy)y))x=((xy)x)x=xy.$$
A: $$
x \equiv z \star y\\
(z \star y) \star ((z \star y) \star y) = y\\
(z \star y) \star z = y\\
y \equiv z \star w\\
(z \star (z \star w)) \star z = z \star w\\
w \star z = z \star w\\
$$
