# Are all algebraic commutative operations always associative? [duplicate]

I know that there are many algebraic associative operations which are commutative and which are not commutative.
for example multiplications of matrices as associative operation is not commutative.

I need to know about inverse of this!
I mean is there any algebraic commutative operation which is not associative?
can you show me sample?

-

## marked as duplicate by Rahul, Martin Brandenburg, dtldarek, marlu, rschwiebMar 11 '13 at 13:56

There are algebraic structures with a commutative, non-associative operation. You find some examples on wikipedia. –  m_l Mar 11 '13 at 12:57
Averaging two numbers. –  Rahul Mar 11 '13 at 13:10
I have deleted the wrong tags and voted to close as an exact duplicate. –  Martin Brandenburg Mar 11 '13 at 13:39

Consider the set $M_n(\mathbb{R})$ and the binary operation $A * B = \frac{1}{2}(AB+BA)$

This isn't associative as

$A * (B * C) = A * \frac{1}{2}(BC + CB) = \frac{1}{4}(ABC + ACB + BCA + CBA)$

Yet

$(A * B) * C = \frac{1}{4}(ABC + BAC + CAB + CBA)$

and $BAC + CAB \neq ACB + BCA$ for all $A,B,C \in M_n(\mathbb{R})$

However, $A * B = \frac{1}{2}(AB+BA) = \frac{1}{2}(BA+AB) = B * A$

So it is commutative.

-
There is nothing special about $M_n(\mathbb{R})$ in this example. –  Martin Brandenburg Mar 11 '13 at 13:44
@MartinBrandenburg Sorry, what do you mean? If you change the set to the real/complex numbers under addition, it's then associative. –  Noble. Mar 11 '13 at 13:54
@Noble I think what he means is that your result is true for matrices over any field whose characteristic is not 2. –  Mohan Jun 2 '13 at 6:03
I wanted to say that this works in any associative algebra over a ring in which $2$ is invertible. –  Martin Brandenburg Jul 18 at 8:55

Nice question. First of all, it's important to note that commutativity does not imply associativity, i.e. one can construct a counterexample. Wikipedia has one, but - even simpler - consider $\mathbb R$ with the operation

$$a \circ b := ab - (a+b).$$

Clearly $\circ$ is commutative, however e.g. $$1\circ (2\circ 3) = -1 \neq -5 = (1\circ 2)\circ 3.$$

Another question is whether such structures do arise naturally somewhere in mathematics. For most parts, associativity is a very fundamental property and we usually require commutativity on top of that (groups -> abelian groups, commutative rings ...)

-

Two counterexamples have already been given, but here's another that seems a bit simpler and that comes up "naturally". Consider the set of all points on a line (or a plane, or 3-dimensional space --- it won't matter for the example) and let the operation send each pair $(P,Q)$ of points to the midpoint of the segment $PQ$.

-

Extending the example in Rahul Narain's comment, if "$+$" is the addition operation in an Abelian group, then the operation $a\circ b=a+a+b+b$ is commutative but not associative if the group contains two elements $a$ and $b$ such that $a+a\not=b+b$ (so that $(a\circ 0)\circ b\not=a\circ(0\circ b)$).

-