For all $a, b \in R$, we define $a * b=|a-b|$ Show that * is commutative but not associative.
For all $a, b \in R$, we define $a * b=|a-b|$ Show that * is commutative but not associative.

$\begin{array}{l}
a^{*} b=a-b \text { if } a>b \\
=-(a-b) \text { if } b>a \\
b^{*} a=a-b \text { if } a>b \\
=-(a-b) \text { if } b>a
\end{array}$

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:

$\begin{array}{l}
|a-b|=|1+1|=2 \\
|| a-b|-c|=|2-5|=3
\end{array}$

RHS:

$\begin{array}{l}
|\mathrm{b}-\mathrm{c}|=|-1-5|=6 \\
|\mathrm{a}-| \mathrm{b}-\mathrm{c}||=|1-6|=|-5|=5
\end{array}$

Since, LHS is not equal to RHS * is not associative