Non-associativity vs. non-commutativity

56 Views Asked by At

I am rather new to mathematics, so the question is probably a bit stupid.

I've been thinking about non-commutativity as "when the order matters", but then this makes it hard to get the difference between that situation and non-associativity which also seem to be about the order of operations. Can someone help me clear up what probably is a misunderstanding?

Thank you :)

2

There are 2 best solutions below

0
On

Commutivity is about the order of the operands: $x \circ y = y \circ x$.

Associativity is about the order of the operators: $x \circ (y \circ z) = (x \circ y) \circ z$. Note that although the operators will be performed in a different sequence, the operands are in the same sequence.

As mentioned in the examples, matrix multiplication is associative but not commutative. Non-commutative operations are frequently studied but non-associative ones are more rarely studied.

3
On

Let just start with the basic four operations.

  • $+$ is commutative because $a+b=b+a$ and associative because $(a+b)+c=(a+b)+c$

This is the same for multiplication $\times$.

The commutativity deals with the order of the input elements, while associativity deals with parenthesising (the order stays the same).

Note that for an associative law $\circ$, parenthesis can then be omitted and we have no problem talking about expressions like this $a\circ b\circ c\circ d$.

  • $-$ and $\div$ are neither commutative nor associative.

$2-1=1$ is not the same as $1-2=-1$

and $(3-2)-1=0$ is not the same as $3-(2-1)=2$.

  • An example of a low which is not commutative but still associative are for instance projectors.

In simple language take the operation of painting. If I paint in blue then in red the result is red, this is not commutative as painting in red first then blue, the result will be blue.

But it is associative as the result only depends on the last applied color, therefore $(a\circ b)\circ c=a\circ c=a$ and $a\circ(b\circ c)=a\circ b=a$ as well.

A more interesting example than projection is matrix multiplication for instance.

  • A simple example of non associativity but still commutativity would be the geometric midpoint.

It is obviously commutative since the midpoint of $A$ and $B$ is the same as the midpoint of $B$ and $A$.

But for $3$ points $A=0,B=2,C=4$ then $\begin{cases}mid(mid(A,B),C)=mid(1,4)=2.5\\ mid(A,mid(B,C))=mid(0,3)=1.5\end{cases}\quad$ so it is not associative.