TExcelTAD
Home › Basic Math & Pre-Algebra › Properties of Operations

Properties of Operations

A handful of rules describe how addition and multiplication behave: you can swap the order, regroup, and split a product over a sum. These properties are why mental-math tricks work, why algebra is allowed to rearrange equations, and, surprisingly, why some computer code gives slightly different answers when it adds the same numbers in a different order.

The properties at a glance

Property Addition Multiplication
Commutative (order doesn't matter) a+b=b+aa + b = b + a a×b=b×aa \times b = b \times a
Associative (grouping doesn't matter) (a+b)+c=a+(b+c)(a + b) + c = a + (b + c) (a×b)×c=a×(b×c)(a \times b) \times c = a \times (b \times c)
Identity (a number that changes nothing) a+0=aa + 0 = a a×1=aa \times 1 = a
Inverse (a number that gets you back to the identity) a+(−a)=0a + (-a) = 0 a×1a=1a \times \frac{1}{a} = 1, for a≠0a \ne 0
Distributive (connects the two) a×(b+c)=a×b+a×ca \times (b + c) = a \times b + a \times c
Zero property a×0=0a \times 0 = 0

The letters aa, bb, cc stand for any numbers. That is the whole point: a property is a promise that holds for every number you could put in.

Commutative and associative: reorder and regroup

Because of these two properties, a long sum or product can be computed in whatever order is easiest:

4×7×25=(4×25)×7=100×7=70018+37+82+63=(18+82)+(37+63)=100+100=200\begin{aligned} 4 \times 7 \times 25 &= (4 \times 25) \times 7 = 100 \times 7 = 700 \\ 18 + 37 + 82 + 63 &= (18 + 82) + (37 + 63) = 100 + 100 = 200 \end{aligned}

Subtraction and division have neither property: 9−4≠4−99 - 4 \ne 4 - 9 and 12÷3≠3÷1212 \div 3 \ne 3 \div 12. That is one reason mathematicians like to rewrite subtraction as adding a negative (9−4=9+(−4)9 - 4 = 9 + (-4)) and division as multiplying by a reciprocal (12÷3=12×1312 \div 3 = 12 \times \frac{1}{3}): then the friendly properties apply again.

python · try it yourself
a, b, c = 6, 15, 4
print("commutative +:", a + b == b + a, "  x:", a * b == b * a)
print("associative +:", (a + b) + c == a + (b + c), "  x:", (a * b) * c == a * (b * c))
print("subtraction commutative?", a - b == b - a, (a - b, b - a))
print("division associative?", (48 / 4) / 2 == 48 / (4 / 2), ((48 / 4) / 2, 48 / (4 / 2)))
commutative +: True   x: True
associative +: True   x: True
subtraction commutative? False (-9, 9)
division associative? False (6.0, 24.0)

One example that works does not prove a property, but one example that fails is enough to disprove it. The last two lines are such counterexamples.

The distributive property

Multiplying a sum is the same as multiplying each part and adding:

6×(10+3)=6×10+6×3=60+18=786 \times (10 + 3) = 6 \times 10 + 6 \times 3 = 60 + 18 = 78

You already used it in Multiplication to split 7×467 \times 46 into 7×40+7×67 \times 40 + 7 \times 6. It also works backwards, which is called factoring out:

17×8+17×2=17×(8+2)=17×10=17017 \times 8 + 17 \times 2 = 17 \times (8 + 2) = 17 \times 10 = 170

And it works with subtraction: 9×98=9×(100−2)=900−18=8829 \times 98 = 9 \times (100 - 2) = 900 - 18 = 882.

Here is a check over many random numbers. It cannot prove the property (nothing finite can), but it builds confidence and would catch a mistaken rule fast:

python · try it yourself
import random

rng = random.Random(1)
ok = True
for _ in range(1000):
    a, b, c = (rng.randint(-100, 100) for _ in range(3))
    if a * (b + c) != a * b + a * c:
        ok = False
print("distributive holds in 1000 random tests:", ok)

# a rule that is FALSE: does a + (b * c) equal (a + b) * (a + c)?
a, b, c = 2, 3, 4
print(a + b * c, (a + b) * (a + c))
distributive holds in 1000 random tests: True
14 30

Addition does not distribute over multiplication, and one counterexample shows it.

Identities and inverses

  • Adding 0 or multiplying by 1 changes nothing. That is why a running total starts at 0 and a running product starts at 1 in code.
  • The additive inverse of 7 is −7 (they add to 0). The multiplicative inverse or reciprocal of 7 is 17\frac{1}{7} (they multiply to 1). Zero has no reciprocal, which is another way of saying you can't divide by zero.

In software: when the properties break

Python's integers and fractions obey every property exactly. Floats do not quite, because each operation rounds its result to about 16 significant digits:

python · try it yourself
x = (0.1 + 0.2) + 0.3
y = 0.1 + (0.2 + 0.3)
print(x, y, x == y)

big = 1e16
print((big + 1) - big, (big - big) + 1)
0.6000000000000001 0.6 False
0.0 1.0

Float addition is commutative but not associative. This matters in real programs:

  • Parallel and GPU code adds numbers in a different order on each run (whichever thread finishes first), so a sum over millions of values can differ in its last digits between runs. Machine learning frameworks document this as "non-determinism".
  • Compilers are not allowed to regroup float arithmetic unless you allow it with flags like -ffast-math, precisely because it changes results.
  • Strings show that "+" need not be commutative at all: "ab" + "cd" is "abcd" but "cd" + "ab" is "cdab".

The Floating Point lesson explains the rounding behind this.

Exercises

Exercise 1: Name the property

Which property justifies each step? (a) 5+9=9+55 + 9 = 9 + 5 (b) 3×(4×5)=(3×4)×53 \times (4 \times 5) = (3 \times 4) \times 5 (c) 8×(2+7)=16+568 \times (2 + 7) = 16 + 56 (d) 41×1=4141 \times 1 = 41

Answer

(a) commutative (addition) (b) associative (multiplication) (c) distributive (d) identity (multiplication)

Solution

(a) only the order changed; (b) only the brackets moved; (c) the 8 was multiplied into each part of the sum: 8×2=168 \times 2 = 16 and 8×7=568 \times 7 = 56; (d) 1 is the multiplicative identity.

Exercise 2: Mental math with properties

Compute 25×37×425 \times 37 \times 4 and 12×9912 \times 99 in your head, naming the properties you use.

Answer

3 700 and 1 188

Solution
25×37×4=(25×4)×37=100×37=3 700(commutative + associative)12×99=12×(100−1)=1 200−12=1 188(distributive)\begin{aligned} 25 \times 37 \times 4 &= (25 \times 4) \times 37 = 100 \times 37 = 3\,700 && \text{(commutative + associative)} \\ 12 \times 99 &= 12 \times (100 - 1) = 1\,200 - 12 = 1\,188 && \text{(distributive)} \end{aligned}

Exercise 3: Factor out

Compute 23×46+23×5423 \times 46 + 23 \times 54 by factoring out.

Answer

2 300

Solution
23×46+23×54=23×(46+54)=23×100=2 30023 \times 46 + 23 \times 54 = 23 \times (46 + 54) = 23 \times 100 = 2\,300
python · try it yourself
print(23 * 46 + 23 * 54, 23 * (46 + 54))
2300 2300

Exercise 4: Hunt for a counterexample

Is division distributive over addition from the left, that is, does a÷(b+c)=a÷b+a÷ca \div (b + c) = a \div b + a \div c? Find a counterexample with small whole numbers, then check whether (b+c)÷a=b÷a+c÷a(b + c) \div a = b \div a + c \div a holds.

Answer

No: 12÷(2+4)=212 \div (2 + 4) = 2, but 12÷2+12÷4=912 \div 2 + 12 \div 4 = 9. The other direction does hold: (b+c)÷a=b÷a+c÷a(b + c) \div a = b \div a + c \div a.

Solution

One failing example disproves the first rule. The second rule is the distributive property in disguise, because (b+c)÷a=(b+c)×1a=b×1a+c×1a(b + c) \div a = (b + c) \times \frac{1}{a} = b \times \frac{1}{a} + c \times \frac{1}{a}.

python · try it yourself
from fractions import Fraction as F

a, b, c = 12, 2, 4
print(F(a, b + c), F(a, b) + F(a, c))
print(F(b + c, a), F(b, a) + F(c, a))
2 9
1/2 1/2

Test yourself

Which operation is commutative?

  1. Subtraction
  2. Division
  3. Multiplication
  4. None of them

7×103=7×100+7×37 \times 103 = 7 \times 100 + 7 \times 3 uses which property?

  1. Associative
  2. Distributive
  3. Identity
  4. Commutative

Why can (a + b) + c and a + (b + c) give different results with Python floats?

  1. Python has a bug
  2. Each float addition rounds, so the grouping changes which roundings happen
  3. Floats are not commutative
  4. Floats cannot be added