# Simple example of idempotent but not commutative nor associative binary operator?

Is there a simple example of a binary operation that is idempotent, but not commutative nor associative?

• The term idempotent refers to objects where we can perform a binary operation, not to the operation itself. – Tobias Kildetoft Apr 8 '16 at 11:58
• An idempotent element $a$ is one such that $a\cdot a=a$. Do you want $a\cdot a=a$ for all elements in the set? – almagest Apr 8 '16 at 12:04
• yes, I want a*a=a for all a in the set – Filip Haglund Apr 8 '16 at 12:08

How about $a\oplus b=pa+(1-p)b$ for $a,b\in\mathbb R$ with $\{0,\frac12,1\}\not\ni p\in\mathbb R$?