I would appreciate some help with this task:
Let be $S$ a non-empty set equipped with an operation $\ast :S\times S\to S$ such that $\ast$ is associative and has the property $x^2\ast y = y = y \ast x^2$ for every $x,y\in S$ (here, $x^2 = x\ast x)$. I have to show that $(S,\ast)$ is an abelian group. In other words, I have to show that there is an identity element $e$ such that $x\ast e = e\ast x = x$ for all $x$ and the commutativity $x\ast y = y \ast x$, for all $x,y \in S$
Note that, assuming there exists such element $e$, we have by virtue of the property $x^2\ast y = y = y \ast x^2$ : $$ x^2 = x^2\ast e = e \quad \forall x\in S$$ This means that, in case an identity element exists, every element of $S$ is involutive. But how can I assert the existence of $e$ and, even more, the commutativity?.
Any hint is welcome. Thanks in advance.
I'll drop the $\ast$'s.
First, if $x^2y=y=yx^2$ for all $x$ and $y$, then every $x^2$ works as an identity, and moreover $\{x^2:x\in S\}$ consists of single element, call it $e$. In particular, every element is its own inverse, $S$ is a group.
Finally, let $x,y\in S$. Then
$$ e=(xy)^2=xyxy\implies xy=y^{-1}x^{-1}=yx $$