which of the following are binary operation.justify your answer.

(i) the operation . defined on Q by a.b =a(b-a)

(ii) the operation . defined on [0, pi] by x.y = cosxy
also,for those operation which are binary operations,check whether they are associated and commutative .