Mark the tick against the correct answer in the following:
Let $\mathrm{Q}^{+}$be the set of all positive rationals. Then, the operation $*$ on $\mathrm{Q}^{+}$defined by $\mathrm{a} * \mathrm{~b}=\frac{\mathrm{ab}}{2}$ for $\mathrm{all} \mathrm{a}, \mathrm{b} \in \mathrm{Q}^{+}$
is
A. commutative but not associative
B. associative but not commutative
C. neither commutative nor associative
D. both commutative and associative
According to the question,
$\mathrm{Q}=\{$ Positive rationals $\}$
$\mathrm{R}=\{(\mathrm{a}, \mathrm{b}): \mathrm{a} * \mathrm{~b}=\mathrm{ab} / 2\}$
Formula
$*$ is commutative if $a^{*} b=b^{*} a$
$*$ is associative if $(\mathrm{a} * \mathrm{~b}) * \mathrm{c}=\mathrm{a}^{*}\left(\mathrm{~b}^{*} \mathrm{c}\right)$
Check for commutative
Consider,$a * b=a b / 2$
And,$b * a=b a / 2$
Both equations are the same and will always true .
Therefore , * is commutative ……. (1)
Check for associative
Consider, $(\mathrm{a} * \mathrm{~b}) * \mathrm{c}=(\mathrm{ab} / 2) * \mathrm{c}=\frac{\frac{a b}{2} \times c}{2}=\mathrm{abc} / 4$
And,$a^{*}\left(b^{*} c\right)=a^{*}(b c / 2)=\frac{a \times \frac{b c}{2}}{2}=a b c / 4$
Both the equation are the same and therefore will always be true.
Therefore, $*$ is associative $\ldots \ldots$ (2)
Now, according to the equations (1), (2)
Correct option will be (D)