Question 21
Binary OperationsWhich of the following binary operations is commutative in the set of integers?
- A.a*b = a + 2b
- B.a*b = a + b − ab
- C.a*b = a2 + b
- D.a*b = a(b + 1)/2
Show the answer and explanation
Answer: B (a*b = a + b − ab)
Explanation
Commutative means a*b = b*a. Swapping a and b in a + b − ab gives b + a − ba, which is the same. The others change, e.g. 1 + 2(2) ≠ 2 + 2(1).