Question:
For all $a, b \in R$, we define $a^{*} b=|a-b|$.
Show that $*$ is commutative but not associative.
Solution:
a*b = a - b if a>b
= - (a - b) if b>a
b*a = a - b if a>b
= - (a - b) if b>a
So a*b = b*a
So * is commutative
To show that * is associative we need to show
$(a * b) * c=a *(b * c)$
Or ||$a-b|-c|=|a-| b-c||$
Let us consider c>a>b
Eg a = 1,b = - 1,c = 5
LHS:
$|a-b|=|1+1|=2$
||$a-b|-c|=|2-5|=3$
RHS
$|b-c|=|-1-5|=6$
$|a-| b-c||=|1-6|=|-5|=5$
As LHS is not equal to RHS * is not associative