Commutative operation
Elementary
A way of combining two numbers is commutative if the order of the numbers doesn’t matter, such as $2 + 3 = 3 + 2$.
Undergraduate (abstract algebra)
Consider a set $S$ with a binary operation $\ast$. The operation $\ast$ is commutative if
\[a \ast b = b \ast a \quad \text{for all } a, b \in S.\]Examples
Examples
-
Addition $+$ on $\reals$
Elementary
Addition on $\reals$ is commutative: for example, $2 + 3 = 3 + 2 = 5$.
-
Multiplication $\times$ on $\reals$
Elementary
Multiplication on $\reals$ is commutative: for example, $2 \times 3 = 3 \times 2 = 6$.
Non-examples
Things that may be mistaken for examples.
-
Subtraction $a - b$ on $\reals$
Elementary
Subtraction on $\reals$ is not commutative, because $5 - 3 = 2$, but $3 - 5 = -2$.
-
Multiplication of $2 \times 2$ real matrices
Undergraduate
Multiplication of $2 \times 2$ matrices is not commutative, because multiplying the same two matrices in opposite orders can give different products: \[\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}, \qquad \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 1 & 2 \end{bmatrix}.\]
Properties
- Addition and multiplication of real numbers are commutative.
- Subtraction, division, composition of functions, and multiplication of matrices are not commutative: for example, $5 - 3 = 2$, but $3 - 5 = -2$.
- A group whose operation is commutative is called abelian.
Distinctions involving this term
- Associative vs. commutative: Consider a binary operation, such as addition, that combines two inputs, such as two numbers, into one result. Associativity and commutativity both involve changing an order, but they change the order of different things. An associative operation gives the same result when the order in which the operations are performed changes, while the inputs stay in place, as in $(a \ast b) \ast c = a \ast (b \ast c)$: on the left, $a \ast b$ is computed first; on the right, $b \ast c$ is computed first. A commutative operation gives the same result when the order of the inputs changes, as in $a \ast b = b \ast a$: $a$ and $b$ trade places. An operation can have either property without the other.