No, integers are not commutative under subtraction.
Subtraction is not a commutative operation. This means that changing the order of the integers in a subtraction problem will usually change the result.
Understanding Commutativity
A mathematical operation is commutative if changing the order of the operands does not change the result. In simpler terms, a op b = b op a, where op is the operation.
Why Subtraction Isn't Commutative
Consider two integers, a and b. If subtraction were commutative, then:
a - b = b - a
Let's test this with an example:
Let a = 5 and b = 2
- 5 - 2 = 3
- 2 - 5 = -3
Since 3 ≠ -3, subtraction is not commutative.
General Rule
In general, for integers a and b, a - b is only equal to b - a if a = b. If a and b are different, the result will be different, and one will be the negative of the other.
Example Table
a | b | a - b | b - a |
---|---|---|---|
10 | 5 | 5 | -5 |
-3 | 2 | -5 | 5 |
7 | 7 | 0 | 0 |
-4 | -1 | -3 | 3 |
As the table illustrates, only when a = b does a - b = b - a.