Let $(M,\cdot)$ be a non-associative magma.
What would be an example of $M$ such that there exists $x\in M$ such that $x\cdot(x\cdot x)\neq (x\cdot x)\cdot x$?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityLet $(M,\cdot)$ be a non-associative magma.
What would be an example of $M$ such that there exists $x\in M$ such that $x\cdot(x\cdot x)\neq (x\cdot x)\cdot x$?
The set of positive real numbers $\mathbb{R}^+$ with the operation of division $/$ is an example. Here $x/(x/x)=x \neq 1/x =(x/x)/x$ if $x \neq 1$.
Another example is the operation $(x,y) \mapsto x^y$ on $\mathbb{N}$. It is a coincidence that we have $x^{(x^x)} = (x^x)^x$ for $x \in \{1,2\}$, but we have $0^{(0^0)} \neq (0^0)^0$ and $3^{(3^3)} \neq (3^3)^3$
The free magma on one generator $x$ is another example (and this must be an example if there is any example, because of the universal property). The free magma on one generator is the set of finite binary trees with the operation "joining along a new root". Here are the two binary trees representing $x*(x*x) \neq (x*x)*x$:
/\ /\
/\ /\
A magma is just a set $S$ with a binary operation $S\times S:\rightarrow S$ .
In the integers with ordinary subtraction , $(\mathbb{Z},-).$ The equations $$x-(x-x)=(x-x)-x$$ almost never holds, in fact it only holds for $x=0.$
More generally, pick a group $G$ and define $a \star b=ab^{-1}$ then $$x \star (x \star x)=x$$ $$(x \star x) \star x=x^{-1}$$ These are not just magmas, they are quasigroups.
As far as commutative but non-associative magmas: In a commutative magma one would have $(x \cdot x) \cdot x=x \cdot(x \cdot x).$ However given an abelian group $(G,+)$ we can define $a \cdot b=2(a+b)=a+a+b+b .$ This is commutative but usually $$(a\cdot b)\cdot c=4a+4b+2c <>2a+4b+4c=a\cdot(b \cdot c).$$ If all the elements of $G$ have odd order, then this is again a quasi-group.
This one. $$ \begin{align} 1 \cdot 1 & = 2 \\ 1 \cdot 2 & = 1 \\ 2 \cdot 1 & = 2 \\ 2 \cdot 2 & = 1 \end{align} $$
$1 \cdot (1\cdot 1) = 1$ and $(1\cdot 1)\cdot 1=2$
What would be an example of non-associative but commutative magma ?
Here's another one:
Pick fixed, distinct elements $x,v,w,z$ in $M$, and define $\cdot$ by
$$a\cdot b= \begin{cases} z & \text{if $a=b=x$} \\ x & \text{ if $a\neq x$ and $b\neq x$} \\ v & \text{ if $a=x$ and $b\neq x$} \\ w & \text{ if $a\neq x$ and $b=x$} \end{cases}$$
Then we would find that $x\cdot (x\cdot x)=x\cdot z=v$ but $(x\cdot x)\cdot x=z\cdot x=w$.
This works so long as $|M|\geq 4$.
As @davcha pointed out already, it is easy to work out an example among finite magmas. Look at the Cayley table:
$$\begin{array}{c|cccc} \cdot & 0 & 1 & 2 & 3\\ \hline 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 1 & 1 \\ 2 & 2 & 2 & 0 & 2 \\ 3 & 3 & 3 & 3 & 0 \end{array}$$
over the set $M=\{0,1,2,3\}$. Here we have
$$(1\cdot 1)\cdot 1=0\cdot1=0\ne 1=1\cdot 0=1\cdot(1\cdot 1),$$
and so on with $x=2$ and $x=3$.
The set of truth-values $M=\{\mathbf T,\mathbf F\}$ with the operation $\to$; that is, $\mathbf T\to\mathbf F=\mathbf F$ and $\mathbf T\to\mathbf T=\mathbf F\to\mathbf T=\mathbf F\to\mathbf F=\mathbf T$. Then $$\mathbf F\to(\mathbf F\to\mathbf F)=\mathbf F\to\mathbf T=\mathbf T$$ while $$(\mathbf F\to\mathbf F)\to\mathbf F=\mathbf T\to\mathbf F=\mathbf F.$$