The Commutative Property and Operations That Lack It
See why addition and multiplication allow swapping order, while subtraction, division, powers, composition and matrices do not.
Key takeaways
- Commutativity says the order of the two inputs does not matter, for every possible pair.
- Real number addition and multiplication are commutative, while subtraction, division and exponentiation are not.
- One counterexample is enough to show that an operation is not commutative, but a few successful examples prove nothing.
- Subtraction can be reordered safely after rewriting it as addition of opposites.
- Composition of functions and multiplication of matrices generally depend on order.
An operation is commutative if swapping the two inputs never changes the result. Addition and multiplication of real numbers have this property: a + b = b + a and a × b = b × a. Subtraction, division and raising to a power do not.
That short statement is worth studying, because much of algebra depends on knowing when you may reorder and when you may not. Later subjects include whole systems in which even multiplication refuses to commute.
The statement
For all real numbers a and b:
a + b = b + a
ab = ba The words "for all" are the heart of it. A property is a promise about every pair at once, including negatives, fractions and irrational numbers. That is why it can be written with letters and applied to expressions whose values you do not know.
The name comes from a root meaning to exchange or interchange, the same one found in "commute."
In algebra the property justifies writing x × 5 as 5x, putting terms in descending powers and recognizing that ab and ba are like terms. So 4ab + 3ba = 7ab.
Pictures that explain it
For whole numbers, an array makes multiplication's symmetry visible. Four rows of six dots make 24 dots. Turn the page a quarter turn and you see six rows of four. No dot was added or removed, so 4 × 6 = 6 × 4.
For addition, picture two sticks laid end to end. Which one comes first does not change the total length.
These pictures cover counting numbers and positive lengths. For negatives, fractions and all real numbers, commutativity is part of the foundational description of the number system, either assumed as an axiom or proved from a careful construction of the numbers.
The property is also about operations, not about stories. "Three bags of five apples" and "five bags of three apples" are different arrangements with the same total.
Using it to calculate faster
Because order is free in sums and products, you can arrange the work to suit yourself.
5 × 77 × 2 = 5 × 2 × 77 = 10 × 77 = 770
86 + 39 + 14 = 86 + 14 + 39 = 100 + 39 = 139 It also halves the number of facts to learn in a multiplication table. Once you know 7 × 8 = 56, you know 8 × 7. In a table with factors from 1 to 10, the 100 entries include only 55 different pairs of factors.
Percent calculations benefit too. Since x% of y and y% of x are both xy/100, you can compute 48% of 50 as 50% of 48, which is 24.
In algebra, reordering helps you see matching terms. In 3 + 5m + 9 - 2m, moving like terms together gives 5m - 2m + 3 + 9 = 3m + 12.
Subtraction and division
Try a swap:
9 - 4 = 5 4 - 9 = -5
12 ÷ 3 = 4 3 ÷ 12 = 1/4 One failed pair settles the matter. Such a pair is a counterexample.
The failures have a pattern. Swapping a subtraction gives the opposite: b - a = -(a - b). Swapping a division of nonzero numbers gives the reciprocal: b ÷ a is 1 divided by (a ÷ b).
Some special pairs do agree. If a = b, then a - b = b - a = 0. For division, a ÷ b = b ÷ a when a = b or a = -b, with both nonzero. Agreement in special cases does not make an operation commutative.
Reordering sums that contain subtraction
You can still rearrange an expression with minus signs, provided each sign stays with its term. Rewrite subtraction as adding the opposite, and the commutative property applies.
8x - 5 - 3x + 12
= 8x + (-5) + (-3x) + 12
= 8x + (-3x) + (-5) + 12
= 5x + 7 Test x = 2: the original is 16 - 5 - 6 + 12 = 17, and the result is 10 + 7 = 17.
Division works similarly. Since a ÷ b = a × (1/b), you can reorder 35 × 8 ÷ 7 as 35 ÷ 7 × 8 = 40. What you cannot do is turn it into 7 ÷ 35 × 8.
Using this together with the associative property lets you pick friendly pairs: 37 + 58 + 63 = (37 + 63) + 58 = 158.
Percents, rates and formulas
In a product of several factors, such as the volume of a box, any order works: length × width × height equals height × length × width. Turning the box on its side does not change how much it holds.
A formula with division is stricter. Speed is distance divided by time. Reversing it gives time per unit of distance, a meaningful but different quantity. A 100 kilometer trip in 2 hours is 50 kilometers per hour, while 2 ÷ 100 = 0.02 hours per kilometer.
Powers do not commute
Is aᵇ equal to bᵃ? Usually not.
2³ = 8 3² = 9
2⁵ = 32 5² = 25
1⁴ = 1 4¹ = 4
2⁴ = 16 4² = 16 The last line is a well known exception: 2 and 4 are the only pair of different positive whole numbers with aᵇ = bᵃ. It can mislead a student who happens to test only that pair.
This is why the two inverse operations of exponentiation are different. Roots recover the base, and logarithms recover the exponent. For addition, a single inverse operation, subtraction, recovers either input.
Order in actions and functions
Everyday actions often depend on order. Putting on socks and then shoes differs from the reverse.
Functions behave the same way. Let f(x) = x + 3 and g(x) = 2x.
f(g(x)) = 2x + 3
g(f(x)) = 2(x + 3) = 2x + 6 The two results differ for every x. Composition is not commutative in general, though some pairs do commute, such as adding 3 and adding 10. More is in function composition.
Geometric motions show it too. Take the point (1, 0) in the plane. Shifting right by 2 and then rotating a quarter turn counterclockwise about the origin gives (3, 0) and then (0, 3). Rotating first gives (0, 1) and then (2, 1).
Matrices: multiplication that does not commute
A matrix is a rectangular array of numbers. Matrix addition commutes, but matrix multiplication usually does not.
Write matrices row by row, with a semicolon between rows. Let A = [1 1; 0 1] and B = [1 0; 1 1].
AB = [1·1 + 1·1, 1·0 + 1·1; 0·1 + 1·1, 0·0 + 1·1] = [2 1; 1 1]
BA = [1·1 + 0·0, 1·1 + 0·1; 1·1 + 1·0, 1·1 + 1·1] = [1 1; 1 2] The products differ. Sometimes one order is defined and the other is not even possible, or the two have different sizes. The reasons are explored in why matrix multiplication does not commute.
This has consequences for identities. For numbers, (a + b)² = a² + 2ab + b². For matrices the middle is AB + BA, and it becomes 2AB only when A and B commute.
Reading word phrases in the right order
Since subtraction and division depend on order, English phrases about them need care.
| Phrase | Expression |
|---|---|
| 6 subtracted from n | n - 6 |
| 6 less than n | n - 6 |
| the difference of 6 and n | 6 - n |
| 6 divided into n | n ÷ 6 |
| 6 divided by n | 6 ÷ n, n ≠ 0 |
| the sum of 6 and n | 6 + n or n + 6 |
The last row is the relaxed one: either order is correct, thanks to commutativity. In the others, swapping changes the meaning. The phrase "less than" in particular reverses the order in which the words appear. With n = 10, "6 less than n" is 4, while writing 6 - n gives -4. More translations are practiced in turning phrases into expressions.
The same attention helps with a graph. The point (2, 5) differs from (5, 2). An ordered pair is not commutative, which is why it is called ordered.
Commutative does not mean associative
The two properties are separate. Associativity concerns regrouping three inputs; commutativity concerns swapping two.
Averaging two numbers is commutative: the average of a and b equals the average of b and a. It is not associative. Averaging 0 and 4 and then averaging with 8 gives 5. Averaging 4 and 8 first and then with 0 gives 3.
Composition of functions goes the other way: it is associative but not commutative.
How to test a new operation
Exercises sometimes define a symbol such as a ⋆ b = a + b + ab. To decide whether it commutes:
- Write b ⋆ a from the definition: b + a + ba.
- Use known properties to compare it with a ⋆ b.
- If they match for all a and b, it is commutative. Here it does.
- If you suspect it fails, find one numerical counterexample.
For a ⋆ b = 2a + b, testing a = 1 and b = 0 gives 2, while the swap gives 1. So it is not commutative.
Proving and disproving
The two kinds of claim need different evidence. To show an operation is commutative, you argue with letters so that every case is covered. To show it is not, you display one pair that fails.
Say a ⋆ b = 3a + 3b. Then b ⋆ a = 3b + 3a, and since real addition commutes, the two are equal for all a and b. That is a complete proof.
Say instead a ⋆ b = ab². Choosing a = 2 and b = 3 gives 18, while the swap gives 12. Done. No further examples are needed.
Be careful with a test where a = b, since every operation of two real numbers agrees with its own swap there. Zero and one are also poor test values.
Where you will meet this again
In solving by the zero product property and in everyday polynomial work, commutativity is used constantly and silently. In abstract algebra, a group whose operation commutes is called abelian, named for the mathematician Niels Henrik Abel. Rings and groups without the property form large and important families.
Practice
Decide whether each operation on real numbers is commutative.
- a ⋆ b = ab + 1
- a ⋆ b = a - b + ab
- a ⋆ b = the larger of a and b
- a ⋆ b = a² + b²
Answers: yes; no, since 1 ⋆ 0 = 1 and 0 ⋆ 1 = -1; yes; yes.