---
title: "Priorities of Operations"
book: "Primary & Middle School Mathematics"
subject: math
language: en
chapter: 45
exercises: 11
source: https://one-course.com/books/math/1/en/chapter/45-priorities-of-operations
---

# Chapter 45 — Priorities of Operations

What is $3 + 4 \times 5$? If you compute left to right you get $35$; if you multiply first you get $23$. Mathematics needs one single answer, so there are traffic rules for computations — the priorities. This chapter states them and introduces a first algebraic identity, distributivity.

## 45.1 The priority rules

**Theorem 45.1 (Priority rules).**

In a computation without brackets:

1. multiplications and divisions are performed *before* additions and subtractions;
2. operations of the same level are performed from left to right.

Brackets override everything: what is inside brackets is computed first, starting with the innermost ones.

**Example 45.2.**

One step per line, underlining (mentally) what is computed:

$$
\begin{align*}
3 + 4 \times 5 &= 3 + 20 = 23
&&\text{(multiplication first)}\\
20 - 8 + 2 &= 12 + 2 = 14
&&\text{(same level: left to right)}\\
18 \div 3 \times 2 &= 6 \times 2 = 12
&&\text{(same level: left to right)}\\
(3 + 4) \times 5 &= 7 \times 5 = 35
&&\text{(brackets first).}
\end{align*}
$$

Note the traps: $20 - 8 + 2$ is *not* $20 - 10$, and $18 \div 3 \times 2$ is *not* $18 \div 6$.

**Example 45.3 (Nested brackets).**

$$
\begin{align*}
50 - 2 \times \bigl(3 + (10 - 4)\bigr)
&= 50 - 2 \times (3 + 6) && \text{(innermost bracket)}\\
&= 50 - 2 \times 9 && \text{(remaining bracket)}\\
&= 50 - 18 && \text{(multiplication)}\\
&= 32 .
\end{align*}
$$

**Remark 45.4 (Fraction bars hide brackets).**

A [fraction](https://one-course.com/books/math/1/en/chapter/39-fractions-first-steps#def-g6-fractions-def) bar groups its [numerator](https://one-course.com/books/math/1/en/chapter/24-first-fractions#def-g4-fractions-def) and its [denominator](https://one-course.com/books/math/1/en/chapter/24-first-fractions#def-g4-fractions-def), as if each had invisible brackets:

$$
\frac{12 + 8}{4} = \frac{20}{4} = 5,
\qquad\text{not}\quad 12 + \frac{8}{4} = 14 .
$$

**Method 45.5 (Computing safely).**

1. Spot the operation to do first (innermost brackets, then $\times$ and $\div$ , then $+$ and $-$ );
2. compute *only that one* , and rewrite the whole expression with the result in place;
3. repeat until one number remains — one operation per line, no shortcuts.

## 45.2 Distributivity

**Theorem 45.6 (Distributivity).**

For all numbers $k$, $a$, $b$:

$$
k \times (a + b) = k \times a + k \times b,
\qquad
k \times (a - b) = k \times a - k \times b .
$$

**Proof by a picture.** Count the [area](https://one-course.com/books/math/1/en/chapter/43-perimeter-area-volume#def-g6-measure-area) of a rectangle of width $k$ split into two smaller rectangles of lengths $a$ and $b$: as a whole it is $k \times (a+b)$; in two parts it is $k \times a + k \times b$. Same rectangle, same [area](https://one-course.com/books/math/1/en/chapter/43-perimeter-area-volume#def-g6-measure-area). ∎

![Distributivity as areas: the big rectangle k × (a + b) is the sum of the two smaller ones.](https://one-course.com/images/onecourse/chapters/math-1/g7-priorities/fig-20d5069e21cc.svg)

*Distributivity as [areas](https://one-course.com/books/math/1/en/chapter/43-perimeter-area-volume#def-g6-measure-area): the big rectangle $k \times (a + b)$ is the [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of the two smaller ones.*

**Example 45.7 (Both directions).**

*Expanding* (left to right) makes mental math easy:

$$
7 \times 103 = 7 \times (100 + 3) = 700 + 21 = 721,
\qquad
6 \times 98 = 6 \times (100 - 2) = 600 - 12 = 588 .
$$

*Factoring* (right to left) collects a common factor:

$$
23 \times 12 + 23 \times 8 = 23 \times (12 + 8) = 23 \times 20 = 460 .
$$

**Example 45.8 (Translating words into a computation).**

“The [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of $8$ and the [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) of $5$ by $3$” is $8 + 5 \times 3 =
23$. “The [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) of $5$ by the [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of $8$ and $3$” is $5 \times (8 + 3) = 55$: the words “the [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) of … by the [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of…” put brackets around the [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def).

## 45.3 Exercises

**Exercise 45.1 ★.**

Compute, one operation per line:

$$
5 + 3 \times 6, \qquad
(5 + 3) \times 6, \qquad
30 - 12 \div 4, \qquad
(30 - 12) \div 4 .
$$

**Solution of Exercise 45.1.**

$5 + 3 \times 6 = 5 + 18 = 23$.

$(5 + 3) \times 6 = 8 \times 6 = 48$.

$30 - 12 \div 4 = 30 - 3 = 27$.

$(30 - 12) \div 4 = 18 \div 4 = 4.5$.

**Exercise 45.2 ★.**

Compute:

$$
24 - 6 + 2, \qquad
24 \div 6 \times 2, \qquad
24 - 6 \times 2, \qquad
24 \div (6 \times 2).
$$

**Solution of Exercise 45.2.**

$24 - 6 + 2 = 18 + 2 = 20$ (left to right).

$24 \div 6 \times 2 = 4 \times 2 = 8$ (left to right).

$24 - 6 \times 2 = 24 - 12 = 12$ (multiplication first).

$24 \div (6 \times 2) = 24 \div 12 = 2$.

**Exercise 45.3 ★.**

Compute step by step:

$$
7 + 3 \times (10 - 6), \qquad
40 - (2 + 3) \times 4, \qquad
60 \div \bigl(2 \times (7 - 4)\bigr).
$$

**Solution of Exercise 45.3.**

$7 + 3 \times (10 - 6) = 7 + 3 \times 4 = 7 + 12 = 19$.

$40 - (2 + 3) \times 4 = 40 - 5 \times 4 = 40 - 20 = 20$.

$60 \div \bigl(2 \times (7 - 4)\bigr) = 60 \div (2 \times 3)
= 60 \div 6 = 10$.

**Exercise 45.4 ★.**

Compute the [fractions](https://one-course.com/books/math/1/en/chapter/39-fractions-first-steps#def-g6-fractions-def) (invisible brackets!):

$$
\frac{18 + 6}{8}, \qquad
\frac{30}{7 - 2}, \qquad
\frac{5 \times 8}{4 + 6} .
$$

**Solution of Exercise 45.4.**

$\dfrac{18 + 6}{8} = \dfrac{24}{8} = 3$; $\dfrac{30}{7 - 2} = \dfrac{30}{5} = 6$; $\dfrac{5 \times 8}{4 + 6} = \dfrac{40}{10} = 4$.

**Exercise 45.5 ★.**

Use distributivity to compute mentally:

$$
8 \times 102, \qquad
25 \times 99, \qquad
14 \times 12 + 14 \times 8, \qquad
37 \times 45 - 37 \times 35 .
$$

**Solution of Exercise 45.5.**

$8 \times 102 = 8 \times (100 + 2) = 800 + 16 = 816$.

$25 \times 99 = 25 \times (100 - 1) = 2500 - 25 = 2475$.

$14 \times 12 + 14 \times 8 = 14 \times (12 + 8) = 14 \times 20 = 280$.

$37 \times 45 - 37 \times 35 = 37 \times (45 - 35) = 37 \times 10 =
370$.

**Exercise 45.6 ★.**

Write the computation in one line, with brackets where needed, then compute: “the [difference](https://one-course.com/books/math/1/en/chapter/3-subtraction-first-steps#ex-g1-subtraction-difference) of $50$ and the [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) of $6$ by $7$”; “the [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) of the [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of $4$ and $5$ by the [difference](https://one-course.com/books/math/1/en/chapter/3-subtraction-first-steps#ex-g1-subtraction-difference) of $10$ and $8$”.

**Solution of Exercise 45.6.**

“The [difference](https://one-course.com/books/math/1/en/chapter/3-subtraction-first-steps#ex-g1-subtraction-difference) of $50$ and the [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) of $6$ by $7$”: $50 - 6 \times 7 = 50 - 42 = 8$ (no brackets needed, the priority does the work).

“The [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) of the [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of $4$ and $5$ by the [difference](https://one-course.com/books/math/1/en/chapter/3-subtraction-first-steps#ex-g1-subtraction-difference) of $10$ and $8$”: $(4 + 5) \times (10 - 8) = 9 \times 2 = 18$.

**Exercise 45.7 ★.**

Amir bought $3$ notebooks at $2.50$ each and $2$ pens at $1.20$ each. Write his total in a single expression, then compute it.

**Solution of Exercise 45.7.**

$3 \times 2.50 + 2 \times 1.20 = 7.50 + 2.40 = 9.90$ euros.

**Exercise 45.8 ★★.**

Place brackets in $4 + 2 \times 5 - 1$ to make the result: (a) $13$; (b) $29$; (c) $24$. (One of the three needs no brackets at all — which one?)

**Solution of Exercise 45.8.**

(a) no brackets: $4 + 2 \times 5 - 1 = 4 + 10 - 1 = 13$.

(b) $(4 + 2) \times 5 - 1 = 30 - 1 = 29$.

(c) $(4 + 2) \times (5 - 1) = 6 \times 4 = 24$.

**Exercise 45.9 ★★.**

Are $12 + 4 \times k$ and $16 \times k$ the same for every number $k$? Test with $k = 1$ and $k = 2$, and conclude. Which priority mistake would lead from one to the other?

**Solution of Exercise 45.9.**

$k = 1$: $12 + 4 \times 1 = 16$ and $16 \times 1 = 16$ — they agree (that is why $k = 1$ is a bad test!). $k = 2$: $12 + 4 \times 2 = 20$ but $16 \times 2 = 32$: different. So the two expressions are *not* equal in general. The mistake $12 + 4 \times k = 16 \times k$ comes from adding $12 + 4$ first, ignoring the priority of $\times$.

**Exercise 45.10 ★★.**

A cinema ticket costs $9$ euros, but a group of $n$ people pays a flat $12$ euros plus $6$ euros per person.

1. Write an expression for the group price, and compute it for $n = 5$ .
2. From how many people is the group rate cheaper than $n$ individual tickets? (Try a few values of $n$ .)

**Solution of Exercise 45.10.**

*1.* Group price: $12 + 6 \times n$. For $n = 5$: $12 + 30 = 42$ euros.

*2.* Individual price: $9n$. Compare: $n = 3$: $30$ vs $27$ (individual cheaper); $n = 4$: $36$ vs $36$ (equal); $n = 5$: $42$ vs $45$ (group cheaper). From $5$ people on, the group rate wins (each extra person costs $6$ instead of $9$, so the gap only grows).

**Exercise 45.11 ★★★.**

Using each of the digits $1$, $2$, $3$, $4$ exactly once, the four operations and brackets at will, write expressions equal to $24$, to $10$, and to $1$.

**Solution of Exercise 45.11.**

Possible answers (many exist):

$$
24 = 1 \times 2 \times 3 \times 4, \qquad
10 = 1 + 2 + 3 + 4, \qquad
1 = (4 - 3) \times (2 - 1).
$$

## 45.4 Problem: Multiplying like an Egyptian scribe

**Problem 45.1.**

Weekend problem — mental-math tricks from distributivity, and the doubling–halving multiplication used for four thousand years

Long before calculators — and before multiplication tables were drilled at school — Egyptian scribes and Russian peasants multiplied any two numbers using only *doubling, halving and adding*. Their method looks like magic; it is in fact distributivity ([Theorem 45.6](#thm-g7-priorities-distributivity)) working at full power. This problem sharpens your mental arithmetic, then teaches you the ancient method, then opens the hood to see exactly why it works.

**Part I — The art of not computing.**

1. Compute mentally, expanding as in [Example 45.7](#ex-g7-priorities-distributivity) : $7 \times 102$ and $9 \times 98$ .
2. Compute mentally, factoring: $17 \times 13 + 17 \times 7$ and $45 \times 101 - 45$ .
3. The “times $5$ ” trick: to multiply by $5$ , multiply by $10$ and halve. Compute $5 \times 87$ this way, and explain why the trick is legitimate.
4. Two more tricks to justify and use: multiply by $25$ by multiplying by $100$ and dividing by $4$ (compute $25 \times 32$ ); multiply by $99$ by multiplying by $100$ and subtracting once (compute $99 \times 47$ ).
5. A warning shot: distributivity spreads a factor over a *[sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def)* , never over a [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) . Compare $8 \times (5 + 3)$ with $8 \times 5 + 8 \times 3$ , and then $8 \times (5 \times 3)$ with $(8 \times 5) \times (8 \times 3)$ : which pair matches, which does not?

**Part II — The doubling–halving method.** Here is the recipe for $13 \times 24$. Write two columns. Left column: start at $13$ and *halve*, dropping any [remainder](https://one-course.com/books/math/1/en/chapter/17-sharing-and-division#def-g3-division-remainder), down to $1$: $13,\ 6,\ 3,\ 1$. Right column: start at $24$ and *double* as many times: $24,\ 48,\ 96,\ 192$. Cross out every row whose *left* number is [even](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd), and add the surviving right numbers.

6. Carry out the recipe for $13 \times 24$ : which row is crossed out, what [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) remains, and does it equal $13 \times 24$ ?
7. Multiply $21 \times 17$ by the method (halve $21$ , double $17$ ), and check the answer by ordinary multiplication.
8. Multiply $16 \times 25$ by the method. How many rows survive, and what is special about a left column that starts at $1$ , $2$ , $4$ , $8$ , $16, \dots$ ?
9. Now *why* it works, one step at a time. Justify each equality with distributivity: $$13 \times 24 = (12 + 1) \times 24  = 12 \times 24 + 24 = 6 \times 48 + 24 .$$ Moral: halving the left and doubling the right keeps the [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) — but when the left number is *[odd](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd)*, one copy of the right number splits off and must be banked. Which number does the first row of the table bank?
10. Continue the bookkeeping down the table: $6 \times 48 = 3 \times 96$ , then $3 \times 96 = 1 \times 192 + 96$ , then $1 \times 192 = 192$ . Collect everything that was banked along the way, and explain why the banked numbers are exactly the right-column numbers of the rows with an [odd](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd) left — the rows the recipe keeps.

**Part III — Under the hood: [sums](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of doublings.**

11. In question 6, the surviving rows were worth $1$ , $4$ and $8$ doublings of $24$ : the method silently wrote $13 \times 24 = (1 + 4 + 8) \times 24$ . Check that $1 + 4 + 8 = 13$ , and find which doublings ( $1$ , $2$ , $4$ , $8$ , $16$ ) the method kept for $21$ in question 7.
12. Write $25$ and $42$ as [sums](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of numbers from the doubling list $1, 2, 4, 8, 16, 32$ , using each at most once.
13. Explain why *every* whole number can be written this way: take the largest doubling number that fits, subtract, repeat — why must this stop? Write $100$ as such a [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) .
14. The scribes of Egypt did exactly this, four thousand years ago: to multiply $19 \times 35$ , they made a doubling table of $35$ ( $1 \to 35$ , $2 \to 70$ , $4 \to 140$ , $8 \to 280$ , $16 \to 560$ ), picked the rows adding up to $19$ , and summed. Do the computation their way.
15. Finale: modern computers, which count with $0$ s and $1$ s, multiply essentially like the scribes — by doublings and additions. Which three additions would a computer make for $13 \times 24$ ? (Why every number splits into doublings, and what $0$ s and $1$ s have to do with it, is the weekend problem of the Powers chapter: [Problem 56.1](https://one-course.com/books/math/1/en/chapter/56-powers#pb-g8-powers-1) .)

**Solution of Problem 45.1.**

**1.** $7 \times 102 = 7 \times (100 + 2) = 700 + 14 =
714$; $9 \times 98 = 9 \times (100 - 2) = 900 - 18 = 882$.

**2.** $17 \times 13 + 17 \times 7 = 17 \times (13 + 7) =
17 \times 20 = 340$; $45 \times 101 - 45 = 45 \times (101
- 1) = 45 \times 100 = 4\,500$.

**3.** $5 \times 87 = 870 \div 2 = 435$. Legitimacy: $5 = 10 \div 2$, so multiplying by $5$ is multiplying by $10$ then dividing by $2$ (the order of $\times$ and $\div$ at the same level, left to right, does the rest).

**4.** $25 \times 32 = 3\,200 \div 4 = 800$, because $25 = 100 \div 4$. And $99 \times 47 = (100 - 1) \times 47 = 4\,700 - 47 = 4\,653$: distributivity over the [difference](https://one-course.com/books/math/1/en/chapter/3-subtraction-first-steps#ex-g1-subtraction-difference) ([Theorem 45.6](#thm-g7-priorities-distributivity)).

**5.** $8 \times (5 + 3) = 64$ and $8 \times 5 + 8 \times 3
= 40 + 24 = 64$: they match — that is distributivity. But $8 \times (5 \times 3) = 8 \times 15 = 120$, while $(8 \times 5) \times (8 \times 3) = 40 \times 24 = 960$: no match. The factor spreads over the *terms of a [sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def)*, not over the factors of a [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def).

**6.**

| $13$ | $24$ | kept ($13$ [odd](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd)) |
| --- | --- | --- |
| $6$ | $48$ | crossed out ($6$ [even](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd)) |
| $3$ | $96$ | kept |
| $1$ | $192$ | kept |

[Sum](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of the surviving right numbers: $24 + 96 + 192 = 312$, and indeed $13 \times 24 = 312$.

**7.** Halving $21$: $21, 10, 5, 2, 1$; doubling $17$: $17, 34, 68, 136, 272$. [Even](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd) lefts $10$ and $2$ are crossed out; survivors $17 + 68 + 272 = 357$. Check: $21 \times 17 = 357$.

**8.** Halving $16$: $16, 8, 4, 2, 1$; doubling $25$: $25, 50, 100, 200, 400$. Every left number except the final $1$ is [even](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd): a single row survives, and the answer is $400$. A left column made of pure doublings keeps only its last row — the method reduces to doubling alone.

**9.** $13 = 12 + 1$, so by distributivity $13 \times 24 = 12 \times 24 + 1 \times 24$; and $12 \times 24 = 6 \times 48$ since halving one factor while doubling the other leaves a [product](https://one-course.com/books/math/1/en/chapter/10-multiplication-first-steps#def-g2-mult-def) unchanged ($12 \times 24 = 6 \times 2 \times 24 = 6 \times 48$). The [odd](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd) left number $13$ split off one copy of the right number: the first row banks $24$.

**10.** $6 \times 48 = 3 \times 96$ (halve–double, no banking: $6$ is [even](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd)). $3 \times 96 = 2 \times 96 + 96 =
1 \times 192 + 96$: the [odd](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd) $3$ banks $96$. Finally $1 \times 192 = 192$: the [odd](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd) $1$ banks $192$ and the table ends. Total banked: $24 + 96 + 192 = 312$. A row banks its right number exactly when its left number is [odd](https://one-course.com/books/math/1/en/chapter/14-numbers-up-to-10-000#def-g3-numbers-evenodd) — so the recipe “keep the odd-left rows and add” is precisely the bookkeeping of distributivity.

**11.** $1 + 4 + 8 = 13$. For $21$, the surviving rows were those of $17$, $68 = 4 \times 17$ and $272 = 16 \times 17$: the doublings $1 + 4 + 16 = 21$.

**12.** $25 = 16 + 8 + 1$ and $42 = 32 + 8 + 2$.

**13.** Take the largest doubling number not exceeding the target and subtract it; what remains is smaller, and smaller than the doubling number just used (otherwise a bigger one would have fitted). Repeating, the [remainder](https://one-course.com/books/math/1/en/chapter/17-sharing-and-division#def-g3-division-remainder) strictly shrinks and must reach $0$: the process stops, and the doublings used are all different. For $100$: $64$ fits ($36$ left), $32$ fits ($4$ left), $4$ fits ($0$ left): $100 = 64 + 32 + 4$.

**14.** Doubling table of $35$: $1 \to 35$, $2 \to 70$, $4 \to 140$, $8 \to 280$, $16 \to 560$. Since $19 = 16 + 2 + 1$, pick those rows: $560 + 70 + 35 = 665$. Check: $19 \times 35 = 665$.

**15.** The same three as the scribe and the peasant: $24 + 96 + 192$ — the doublings of $24$ selected by $13 = 1 + 4 + 8$. Writing numbers as [sums](https://one-course.com/books/math/1/en/chapter/2-addition-first-steps#def-g1-addition-def) of doublings is exactly writing them with $0$s and $1$s; the full story is told in [Problem 56.1](https://one-course.com/books/math/1/en/chapter/56-powers#pb-g8-powers-1).
