Lesson Library> Order of Operations

Order of Operations

What is $3+4\cdot2$ ?

Imagine that you wanted to calculate $3+4\cdot2$. The most logical thing might be to read from left to right, just like you do when you read a book. Let's try it! The first number is just a three: $$3$$Then we have plus four:$$3 + 4 = 7$$And finally, we have that result times two:$$7\cdot2 = 14$$So it seems that $3+4\cdot2 = 14$. But this is not the only way of doing it. We could read from right to left instead. After all, some languages are written that way. In that case the first number in $3+4\cdot2$ is a two: $$2$$And then we multiply by four:$$4\cdot2 = 8$$And finally, the result plus three:$$8+3 = 11$$So $3+4\cdot2 = 11$. But that can't be right! Before we had $3+4\cdot2 = 14$! It can't be equal to both $11$ and $14$ at the same time. To fix this, we have to decide which method we mean when we write things like $3+4\cdot2$. Moreover, everyone has to use the same method. Imagine how confusing it would be if people did this differently. They would be speaking completely different languages.



Before we move on to the rule for calculation I want to explain why we get different answers to begin with. (Skip this part if it doesn't make sense).

I shall try to illustrate the two different ways of calculating $2+1\cdot3$. 

Left to right. First we take two plus one: 


Then all that times three:


But in ``right to left", $2+1\cdot3$ is one times three:


And then plus two:


You could say that in ``right to left" the $2$ does not get the effect of the multiplication.


The Rule

The rule is actually neither of those I suggested above (left to right and right to left). The rule is like this: multiplication and division goes first. I'll explain what I mean using an example.

Say that I wanted to calculate $4\cdot4 + 3\cdot2$. Here numbers are being multiplied in two places: 


I have to do these multiplications first, and then I can add the products together. The multiplications are $4\cdot4 = 16$ and $3\cdot2=6$, so

The same rule is true when division or subtraction is involved: 


This method might seem a bit random, while the ``left to right" method seems more logical. However, the ``multiplication first" method is what people mean when they write things like $4\cdot4-6/2$, and that is how you should calculate it.


Exercise 1

Calculate. You can circle each multiplication/division if that helps you.

a) $3\cdot4+8$

b) $9/3+3\cdot5$

c) $1+10/2-2\cdot2$

d) $4\cdot4\cdot2 - 6/3$

a)  First do the multiplication, then the addition: 

b) $9/3 + 3\cdot5 = 3 + 3\cdot5 = 3+ 15 = \mathbf{18}$. It is common to write repeated equals signs like this, to break the problem into smaller parts.

c) $1+10/2-2\cdot2 = 1 + 5 - 4 = \mathbf{2}$

d) $4\cdot4\cdot2 - 6/3$=$16\cdot2 - 6/3$=$32-6/3$=$32 - 2$=$\mathbf{30}$




Parentheses

I have five pencil cases. Each case contains $2$ red pens, $1$ green pen and $1$ yellow pen. How many pens are there in total? 

To answer this question, it seems like the best way is to first find out how many pens there are in one case. Then we multiply that value by $5$, since there are five cases. So the number of pens is $2+1+1\cdot5$. But that isn't what we mean! Because of the ``multiplication first", this means two, plus one, plus the product of one and five:

Instead we want to sum $2$, $1$ and $1$ before we multiply by $5$. This is where parentheses come in. If we put parentheses around something, that means that we want the things inside the parentheses to be calculated first, even if this breaks the ``multiplication and division first" rule. We can therefore express the number of pens as$$\boldsymbol{(}2+1+1\boldsymbol{)}\cdot5.$$


Exercise 1

Calculate.

a) $6\cdot(6-4)$

b) $(4+1)\cdot(12-6)$

a) $6\cdot(6-4) = 6\cdot2 = \mathbf{12}$

b) $(4+1)\cdot(12-6) = 5\cdot6 = \mathbf{30}$


Exercise 2

Which statements are true and which are false?

a) $4/2+2 = 4/(2+2)$

b) $(54\cdot12)+86 = 54\cdot12+86$

a) $4/2+2 = 2+2=4$ but $4/(2+2)=4/4=1$, so the statement is false.

b) The parentheses in $(54\cdot12)+86$ don't really do anything; $54\cdot12$ is calculated first even without the parentheses. Therefore $(54\cdot12)+86 = 54\cdot12+86$, so the statement is true.


Exercise 3

Which is larger, $2 + 2\cdot2$ or $(2+2)\cdot2$? What about $2 + 2/2$ and $(2+2)/2$? Experiment with other expressions.

$2+2\cdot2 = 2+4=6$, but $(2+2)\cdot2 = 4\cdot2=8$, so the second one is larger. 

In the second example, $2+2/2 = 2+1 = 3$, and $(2+2)/2 = 4/2 = 2$, so the first one is larger.


Distribution

Earlier in the lesson I made this illustration of $(2+1)\cdot3$:


But we could also view this as $2\cdot3 + 1\cdot3$:


This means that $(2+1)\cdot3 = 2\cdot3 + 1\cdot3$, since they both represent the same circles. And this rule is true in general! As soon as we multiply a whole parentheses, we can instead multiply each term inside the parentheses. This is called distribution.



Exercise 1

Which statements are true?

a) $6\cdot(2+7) = 6\cdot2 + 6\cdot7$

b) $3\cdot7 = 3\cdot4 + 3\cdot3$

a) True.

b) Either you can calculate both sides and get $3\cdot7=21$ and $3\cdot4+3\cdot3 = 12 + 9 = 21$. Since they're both equal to $21$ the statement is true. Or you can see that $3\cdot7 = 3\cdot(4+3) = 3\cdot4 + 3\cdot3$.



Exercise 2

John wants to calculate $4 + 20 \cdot4$. However, he hasn't read this lesson, so he does it the wrong way. He calculates as if it was $(4+20)\cdot4$. By how much is his answer wrong?

We want to compare $4 + 20 \cdot4$ with $(4+20)\cdot4$. But $(4+20)\cdot4$ is the same as $4\cdot4 + 20\cdot4$. Now we are comparing$$4 + 20 \cdot4$$and$$4\cdot4 + 20\cdot4.$$Both of these has the term $20\cdot4$. Adding $20\cdot4$ to two numbers doesn't change the difference between them, so we can ignore that term and the difference will still be the same. Now we just have to compare $4$ with $4\cdot4$. Since $4\cdot4 = 16$ and $16-4=12$, John's answer was $12$ too large.

Note that the $20$ in $4+20\cdot4$ didn't make any difference. We could have compared $4 + 395820 \cdot4$ with $(4 + 395820)\cdot4$ and the difference would still have been $12$.


Confusion

There is a gap in the rule I have taught so far. See if you can find it yourself by calculating $12/3\cdot2$ in different ways.

Can you see it? $(12/3)\cdot2 = 4\cdot2 = 8$, but $12/(3\cdot2)= 12/6 =2$. When there is only multiplication the order doesn't matter, but when there's also division we can get different answers. The rule I have taught so far doesn't say which of these is correct.

If you type $12/3\cdot2$ into a calculator it will calculate $(12/3)\cdot2$. However, people can't quite agree whether this is right. Therefore, to avoid confusion, the safest thing is to always use parentheses. 

A different notation that avoids parentheses is $12/(3\cdot2) = \frac{12}{3\cdot2}$ and $(12/3)\cdot2 = \frac{12}{3}\cdot2$. Everything below the line divides everything above the line, even without parentheses. This also works for addition: $12/(3+2) = \frac{12}{3+2}$. 



Exercise 1

Calculate.

a) $8/2 + 3\cdot6/9$

b) $\frac{9}{2+28/4}$

a) $8/2 + 3\cdot6/9$$=$$4 + 3\cdot6/9$$=$$4 + 18/9$$=$$4 + 2$$=$$\mathbf{6}$. We get the same result however we calculate it.

b) $\frac{9}{2+28/4} = \frac{9}{2+7} = \frac{9}{9} = 1$


This still isn't the whole story. For example, $4^2$ is a shorthand for $4\cdot4$, but does $-4^2$ equal $(-4)^2$ or $-(4^2)$? And later on you will learn about something called cosine, but does $\cos x+1$ equal $(\cos x) +1$ or $\cos(x+1)$? Usually there's a clear answer, but sometimes not. Then parentheses can be important, to show what you really mean. This isn't anything you need to worry about though. For now, you know everything you need to know about the order of operations.

Problems to Solve

Exercise 1

Calculate $3\cdot(3+3\cdot(3+3))$.

To calculate what's inside the outer parentheses we have to first  calculate the inner parentheses. This means that we start with the innermost parentheses and then work ourselves outwards: $3\cdot (3 + 3\cdot(3+3))$$=$$3\cdot(3+3\cdot6)$$=$$3\cdot (3 + 18)$$=$$3\cdot21$$=$$\mathbf{63}$


Exercise 2

I have bought loads of  tea. I bought $5$ types of black tea and $2$ types of green tea. I bought $4$ teabags of each type. However, I also wanted to try some red tea, so I bought $2$ teabags of that. How many teabags did I buy in total?

Concentrate on the black and green teabags first. There were $5$ black types and $2$ green types, which means a total of $5+2$ types. There were $4$ bags of each type, which means $4\cdot(5+2)$ teabags. In addition to this, I also bought $2$ bags of red tea. Therefore the total number is ${4\cdot(5+2)+2}$. We can calculate this: $4\cdot(5+2)+2 = 4\cdot7+2 = 28+2 = \mathbf{30}$.



Exercise 3

Add parentheses to $8+4/3+1$ so that it becomes equal to $3$.

$\mathbf{(8+4)/(3+1)}$


Exercise 4

Add parentheses to $7\cdot12+45$ so that it becomes as large as possible.

If we put parentheses around $12+45$, then the $45$ also gets the effect of the multiplication. Therefore $7\cdot(12+45)$ is larger than $7\cdot12+45$. There are no more alternatives, so $\boldsymbol{7\cdot(12+45)}$ must be the largest.


Exercise 5

True or false: $54\cdot(13+20) = 13\cdot(54+20)$. 

If the statement is true, both sides of the equals sign must be the same. The left hand side is $54\cdot(13+20)$, which is the same as $54\cdot13 + 54\cdot20$. The right hand side is $13\cdot(54+20)$, which is the same as $13\cdot54 + 13\cdot20$. So we are comparing$$54\cdot13 + 54\cdot20$$and$$13\cdot54 + 13\cdot20.$$These two have the same first term, but the second terms are different. Therefore the sums are different, so the statement is false.


Exercise 6

Why is multiplication commutative? In other words, explain why $3\cdot2=2\cdot3$, and why this is true for any numbers.

Hint: Try to draw a picture.

Draw a picture of a $3$ by $2$ grid:

    

The total number of circles can be viewed either as the sum of the rows, or as the sum of the columns. Since it's a $3$ by $2$ grid, there are two rows with three circles each, and three columns with two circles each:

   

Since $3+3$ and $2+2+2$ both represent the same circles, they are equal. This argument works for any two numbers, not just $2$ and $3$, if we choose the right size for the grid.

(A similar argument in 3D can explain that multiplication is associative.)


Exercise 7

Add parentheses to $2+6/3-1$ so that it becomes as large as possible.

There are two things we can do: put parentheses round $2+6$, and round $3-1$. Putting parentheses around $3-1$ is good, since this means the $6$ is divided by $2$ instead of $3$, and we're no longer subtracting $1$. However, putting parentheses round $2+6$ is bad, because then the $2$ gets the effect of the division, making it smaller. Therefore the best way is $\boldsymbol{2+6/(3-1)}$, which equals $5$.