Chapter 03

Order of operations

An expression with more than one operation in it can be read more than one way. 2 + 3 × 4 is 20 if you work left to right, and 14 if you multiply first.

Both readings are reasonable, so mathematics fixed one of them by agreement. That agreement is the order of operations, and it is the reason a written expression means the same thing to everyone.

The order

The order of operations ranks the four operations, so that an expression is worked through the same way by everyone who reads it.

  • Brackets first, then exponents, then multiplication and division, then addition and subtraction.
  • Multiplication and division rank equally. Work them left to right.
  • Addition and subtraction rank equally too. Work those left to right as well.
  • 2 + 3 × 4 is 14, because the multiplication is done first.
  • (2 + 3) × 4 is 20, because brackets outrank multiplication.
  • Brackets are how you say which operation you want first when the ranking would have chosen another.

Working out 6 + 2 × (5 − 1)²

Brackets: 5 − 1 = 4, so 6 + 2 × 4².

Exponent: 4² = 16, so 6 + 2 × 16.

Multiply: 2 × 16 = 32, so 6 + 32.

Add: 38.

Examples

Each one is set out the way a solution is written on paper: the question, the steps in order, then the answer.

Example 1. Division and multiplication together

Work out 24 ÷ 6 × 2.

Solution

  1. Division and multiplication rank equally, so go left to right.
  2. 24 ÷ 6 = 4.
  3. 4 × 2 = 8.

8

Example 2. Brackets changing the answer

Work out 24 ÷ (6 × 2).

Solution

  1. Brackets first: 6 × 2 = 12.
  2. Then divide: 24 ÷ 12 = 2.

2

The scientific calculator
It applies the order of operations, so 2 + 3 × 4 reads 14 on its display.
The adding machine
It resolves each operator as the key is pressed, so the same keys read 20. A printing machine has always worked this way, and its tape shows why.