✖

Commutativity

Commutativity is a property of operations such as addition. Notice that with addition the order does not matter, so 3 + 5 is the same as 5 + 3. Whichever two real numbers a + b we add, the result is the same even if we swap the numbers being added: b + a. If an operation satisfies this condition, we say it is commutative.

Another commutative operation is multiplication, because 2 · 6 gives the same result as 6 · 2, and the same holds for any two numbers a, b:

a⋅b=b⋅a

An example of an operation that is not commutative is subtraction, because 7 − 4 is not the same as 4 − 7. In the first case we get 3, in the second we get −3. Another example is division, because 2 / 5 is not the same as 5 / 2.

Be careful, though, about other properties of operations, such as the order of operations. Given the expression 1 + 2 · 3, we cannot say it is the same as 2 + 1 · 3. Multiplication takes priority over addition. Brackets can help: the expression 1 + 2 · 3 is the same as 1 + (2 · 3). We can use the commutative law of addition, but we must take the whole bracket with us: 1 + (2 · 3) equals (2 · 3) + 1, and that equals (3 · 2) + 1 if we also use the commutativity of multiplication.

Set operations and commutativity

It is not only operations on numbers that can be commutative; operations on sets can be too. For example, the intersection of sets A and B is a commutative operation. The intersection of two sets is “the elements that are in both sets”, so

A∩B=B∩A

It works in exactly the same way for the union of sets A and B, whose result is “the elements that are in at least one of the sets”, and so:

A∪B=B∪A

The set difference, for example, is not commutative.

Vectors

Another commutative operation can be found among the operations with vectors, namely vector addition – in general, addition is usually a commutative operation. In this case, given two vectors u→ and v→, we have

u→+v→=v→+u→

The following figure shows this graphically:

The sum of two vectors

The sum u→+v→ is shown by the “upper path”, where we first apply the red vector u→ and only then the blue vector v→. The sum v→+u→ is shown by the “lower path”: first we travel along the blue vector v→ and then along the red vector u→. The result is the same, though – the vectors end at the same point.

You can imagine it as setting off from some place and walking fifty metres north and then twenty metres west. If you first walked twenty metres west and then fifty metres north, you would end up in the same place. Walking like this is therefore commutative.

Logic

The logical operators “and” (conjunction) and “or” (disjunction) are also commutative. This means that the statement “5 is odd and prime” has the same truth value as the statement “5 is prime and odd”. Similarly for disjunction: “6 is prime or even” has the same truth value as “6 is even or prime”.

Implication, however, is not commutative: the statement “if I win the lottery, I will be rich” is not the same as “if I am rich, I will win the lottery”.

Chapters: Commutativity, Associativity, Distributivity