---
tag: 04E4V9G5FR
kind: definition
name: Commutativity
msc: [08A02]
defines: 099E72KTF8
uses: [0580ZJSA3Q]
sources:
  - url: https://en.wikipedia.org/wiki/Commutative_property
    locator: Definition
---

## Definition

Let $S$ be a set and let $\ast$ be a [[binary operation|0M418FE7BB]] on $S$.
The operation $\ast$ is commutative when $a \ast b = b \ast a$ for all $a, b \in S$.

## Remarks

Addition and multiplication of real numbers are commutative.
Subtraction is not commutative: $1 - 2 \neq 2 - 1$.
Multiplication of $2 \times 2$ real matrices is associative but not commutative.

## Explanations

### L1 human

Commutativity says that the order of the two inputs does not matter.
For example, $3 \times 5$ and $5 \times 3$ are both $15$.
Many operations do not have this property, for example subtraction and the composition of rotations in space.
