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.