# Prove this magma commutativity

Given magma $(X, *)$ and that $(x*y)*y = x$ and $y*(y*x) = x$ $\forall x, y \in X$ prove that $x*y = y*x$.

Should be rather simple but I've been trying to prove that for several hours now with no luck. I've been trying lots of substitutions in $x*y$ and $y*x$ but wasn't able to come to something identical.

-

This is similar to question A1 on the 2001 Putnam Exam, though the solution is a little different. You just have to play around a bit (or a lot, if you're new to this sort of thing):

Claim 1: $(x\star y)\star x=y$ for all $x,y\in X$. Proof: Let $x,y\in X$ be arbitrary. Then, $(x\star y)\star y=x$ by assumption. Now left-multiply by $(x\star y)$ to see that $(x\star y)\star((x\star y)\star y)=(x\star y)\star x$. Now apply your second property to the left hand side, with $(x\star y)$ taking the role of $y$, to see that the left hand side is actually just $y$. Thus $y=(x\star y)\star x$.

Now, since $(x\star y)\star x=y$ for all $x,y$, simply multiply on the right by $x$ to obtain $$((x\star y)\star x)\star x=y\star x$$

Use your first property with $(x\star y)$ playing the role of $x$ and $x$ playing the role of $y$, and you're done!

-

In short: $$x*y=((x*y)*x)*x=((x*y)*((x*y)*y))*x=y*x$$

-