In mathematics, especially abstract algebra, a binary operation * on a set S is commutative if, for all x and y in S, x * y = y * x.

The most commonly known examples of commutativity are addition and multiplication of natural numbers; for example:

  • 4 + 5 = 5 + 4 (since both expressions evaluate to 9)
  • 2 3 = 3 2 (since both expressions evaluate to 6)

Further examples of commutative binary operations include addition and multiplication of real and complex numbers, addition of vectors, and intersection and union of sets. Important non-commutative operations are the multiplication of matrices and the composition of functions.

An Abelian group is a group whose operation is commutative.

A ring is called commutative if its multiplication is commutative, since the addition is commutative in any ring.

See also: Associativity, Distributive property