Mathwords logoMathwords

Commutative — Definition, Property & Examples

Commutative Operation

Any operation for which ab = ba for all values of a and b. Addition and multiplication are both commutative. Subtraction, division, and composition of functions are not. For example, 5 + 6 = 6 + 5 but 5 – 6 ≠ 6 – 5.

More: Commutativity isn't just a property of an operation alone. It's actually a property of an operation over a particular set. For example, when we say addition is commutative over the set of real numbers, we mean that a + b = b + a for all real numbers a and b. Subtraction is not commutative over real numbers since we can't say that ab = ba for all real numbers a and b. Even though ab = ba whenever a and b are the same, that still doesn't make subtraction commutative over the set of all real numbers.

Further examples: In this more formal sense, it is correct to say that matrix multiplication is not commutative for square matrices. Even though AB = BA for some square matrices A and B, commutativity does not hold for all square matrices. It is also correct to say composition is not commutative for functions, even though one-to-one functions commute with their inverses.

 

See also

Associative

Key Formula

ab=bafor all a and ba * b = b * a \quad \text{for all } a \text{ and } b
Where:
  • aa = Any element from the set the operation is defined on
  • bb = Any element from the set the operation is defined on
  • * = The binary operation being tested for commutativity (e.g., +, ×)

Worked Example

Problem: Determine whether multiplication is commutative by testing whether 7 × 4 = 4 × 7.
Step 1: Write the commutative property for multiplication using the given values.
a×b=b×a    7×4=?4×7a \times b = b \times a \implies 7 \times 4 \stackrel{?}{=} 4 \times 7
Step 2: Compute the left side.
7×4=287 \times 4 = 28
Step 3: Compute the right side.
4×7=284 \times 7 = 28
Step 4: Compare the two results. Since both sides equal 28, the equation holds. This is consistent with the fact that multiplication is commutative over all real numbers — swapping the order never changes the product.
28=2828 = 28 \checkmark
Answer: Yes, 7 × 4 = 4 × 7 = 28. Multiplication is commutative.

Another Example

This example shows how to DISPROVE commutativity. Unlike the first example (which confirmed a commutative operation), here a single counterexample is enough to show that subtraction fails the commutative property.

Problem: Show that subtraction is NOT commutative by finding values of a and b where a − b ≠ b − a.
Step 1: Choose specific values. Let a = 10 and b = 3.
a=10,b=3a = 10, \quad b = 3
Step 2: Compute a − b.
103=710 - 3 = 7
Step 3: Compute b − a.
310=73 - 10 = -7
Step 4: Compare the results. Since 7 ≠ −7, the order matters. We only need one counterexample to prove an operation is not commutative.
777 \neq -7
Answer: Subtraction is not commutative because 10 − 3 ≠ 3 − 10.

Frequently Asked Questions

What is the difference between commutative and associative properties?
The commutative property says you can swap the order of two inputs: a + b = b + a. The associative property says you can regroup three or more inputs without changing the result: (a + b) + c = a + (b + c). Addition is both commutative and associative. Subtraction is neither commutative nor associative.
Is division commutative?
No, division is not commutative. For example, 12 ÷ 4 = 3 but 4 ÷ 12 = 1/3, and 3 ≠ 1/3. Because changing the order changes the result, division fails the commutative property.
Why does commutativity matter if the answer sometimes stays the same when you swap order?
An operation is commutative only if swapping works for ALL values, not just some. For instance, 5 − 5 = 5 − 5 regardless of order, but 5 − 3 ≠ 3 − 5. One counterexample is enough to prove an operation is not commutative over a given set.

Commutative Property vs. Associative Property

Commutative PropertyAssociative Property
DefinitionOrder of two operands can be swapped: a ∗ b = b ∗ aGrouping of three operands can be changed: (a ∗ b) ∗ c = a ∗ (b ∗ c)
What changesThe order of the inputsThe placement of parentheses
AdditionCommutative: 3 + 5 = 5 + 3Associative: (3 + 5) + 2 = 3 + (5 + 2)
SubtractionNOT commutative: 3 − 5 ≠ 5 − 3NOT associative: (10 − 5) − 2 ≠ 10 − (5 − 2)
Number of operands involvedTwo: a and bThree: a, b, and c

Why It Matters

The commutative property appears throughout algebra whenever you rearrange terms in an expression — for example, rewriting 3x + 7 as 7 + 3x relies on commutativity of addition. In higher math, many structures are not commutative: matrix multiplication and function composition both depend on order, which is why AB ≠ BA in general. Recognizing which operations are commutative helps you know when you can safely reorder terms and when doing so would produce errors.

Common Mistakes

Mistake: Thinking subtraction is commutative because a − a = a − a works.
Correction: Commutativity must hold for ALL pairs of values, not just when a = b. A single counterexample like 8 − 3 ≠ 3 − 8 disproves it.
Mistake: Confusing the commutative property with the associative property.
Correction: Commutative deals with swapping order (a + b = b + a). Associative deals with regrouping parentheses ((a + b) + c = a + (b + c)). They are independent properties — an operation can be one without the other.

Related Terms

  • AssociativeDeals with regrouping rather than reordering
  • CompositionA non-commutative operation on functions
  • Matrix MultiplicationA non-commutative operation on matrices
  • Real NumbersThe set over which addition and multiplication are commutative
  • SetCommutativity is defined relative to a set
  • Inverse FunctionA function commutes with its inverse under composition
  • Square MatrixMatrix multiplication is not commutative for square matrices in general
  • FunctionFunction composition is generally not commutative