Section 1.4 Order of Operations
¶Mathematical symbols are a means of communication, and it's important that when you write something, everyone else knows exactly what you intended. For example, if we say in English, “two times three squared,” do we mean that:
\(2\) is multiplied by \(3\text{,}\) and then the result is squared?
or that \(2\) is multiplied by the result of squaring \(3\text{?}\)
English is allowed to have ambiguities like this. But mathematical language needs to be precise and mean the same thing to everyone reading it. For this reason, a standard order of operations has been adopted, which we review here.
Subsection 1.4.1 Grouping Symbols
Consider the math expression \(2\cdot3^2\text{.}\) There are two mathematical operations here: a multiplication and an exponentiation. The result of this expression will change depending on which operation you decide to execute first: the multiplication or the exponentiation. If you multiply \(2\cdot3\text{,}\) and then square the result, you have \(36\text{.}\) If you square \(3\text{,}\) and then multiply \(2\) by the result, you have \(18\text{.}\) If we want all people everywhere to interpret \(2\cdot3^2\) in the same way, then only one of these can be correct.
The first tools that we have to tell readers what operations to execute first are grouping symbols, like parentheses and brackets. If you intend to execute the multiplication first, then writing
clearly tells your reader to do that. And if you intend to execute the power first, then writing
clearly tells your reader to do that.
To visualize the difference between \(2\cdot \left(3^2\right)\) or \((2\cdot 3)^2\text{,}\) consider these garden plots:
If we calculate \(3^2\text{,}\) we have the area of one of the small square garden plots on the left. If we then double that, we have \(2\cdot\left(3^2\right)\text{,}\) the area of the left garden plot.
But if we calculate \((2\cdot3)^2\text{,}\) then first we are doubling \(3\text{.}\) So we are calculating the area of a square garden plot whose sides are twice as long. We end up with the area of the garden plot on the right.
The point is that these amounts are different.
Checkpoint 1.4.4
Subsection 1.4.2 Beyond Grouping Symbols
If all math expressions used grouping symbols for each and every arithmetic operation, we wouldn't need to say anything more here. In fact, some computer systems work that way, requiring the use of grouping symbols all the time. But it is much more common to permit math expressions with no grouping symbols at all, like \(5+3\cdot2\text{.}\) Should the addition \(5+3\) be executed first, or should the multiplication \(3\cdot2\text{?}\) We need what's known formally as the order of operations to tell us what to do.
The order of operations is nothing more than an agreement that we all have made to prioritize the arithmetic operations in a certain order.
A common acronym to help you remember this order of operations is PEMDAS. There are a handful of mnemonic devices for remembering this ordering (such as Please Excuse My Dear Aunt Sally, People Eat More Donuts After School, etc.).
We'll start with a few examples that only invoke a few operations each.
Example 1.4.6
Use the order of operations to simplify the following expressions.

\(10+2\cdot 3\text{.}\) With this expression, we have the operations of addition and multiplication. The order of operations says the multiplication has higher priority, so execute that first:
\begin{align*} 10+2\cdot 3\amp =10+\nextoperation{2\cdot 3}\\ \amp=10+\highlight{6}\\ \amp=\highlight{16} \end{align*} 
\(4+10\div 2  1\text{.}\) With this expression, we have addition, division, and subtraction. According to the order of operations, the first thing we need to do is divide. After that, we'll apply the addition and subtraction, working left to right:
\begin{align*} 4+10\div21\amp=4+\nextoperation{10\div2}1\\ \amp=\nextoperation{4+\highlight{5}}1\\ \amp=\highlight{9}1\\ \amp=\highlight{8} \end{align*} 
\(710+4\text{.}\) This example only has subtraction and addition. While the acronym PEMDAS may mislead you to do addition before subtraction, remember that these operations have the same priority, and so we work left to right when executing them:
\begin{align*} 710+4\amp=\nextoperation{710}+4\\ \amp=\highlight{3}+4\\ \amp=1 \end{align*} 
\(20\div 4\cdot 7\text{.}\) This expression has only division and multiplication. Again, remember that although PEMDAS shows “MD,” the operations of multiplication and division have the same priority, so we'll apply them left to right:
\begin{align*} 20\div 4\cdot 5\amp=\nextoperation{20\div 4} \cdot 5\\ \amp=\highlight{5}\cdot5\\ \amp=\highlight{25} \end{align*} 
\((6+7)^2\text{.}\) With this expression, we have addition inside a set of parentheses, and an exponent of \(2\) outside of that. We must compute the operation inside the parentheses first, and after that we'll apply the exponent:
\begin{align*} (6+7)^2\amp= (\nextoperation{6+7})^2\\ \amp= \highlight{13}^2 \\ \amp= \highlight{169} \end{align*} 
\(4(2)^3\text{.}\) This expression has multiplication and an exponent. There are parentheses too, but no operation inside them. Parentheses used in this manner make it clear that the \(4\) and \(2\) are separate numbers, not to be confused with \(42\text{.}\) In other words, \(4(2)^3\) and \(42^3\) mean very different things. Exponentiation has the higher priority, so we'll apply the exponent first, and then we'll multiply:
\begin{align*} 4(2)^3 \amp= 4\nextoperation{(2)^3}\\ \amp= 4(\highlight{8})\\ \amp= \highlight{32} \end{align*}
Remark 1.4.7
There are many different ways that we write multiplication. We can use the symbols \(\cdot\text{,}\) \(\times\text{,}\) and \(*\) to denote multiplication. We can also use parentheses to denote multiplication, as we've seen in Example 1.4.6, Item f. Once we start working with variables, there is even another way. No matter how multiplication is written, it does not change the priority that multiplication has in the order of operations.
Checkpoint 1.4.8 Practice with order of operations
Subsection 1.4.3 Absolute Value Bars, Radicals, and Fraction Bars are Grouping Symbols
When we first discussed grouping symbols, we only mentioned parentheses and brackets. Each of the following operations has an implied grouping symbol aside from parentheses and brackets.
 Absolute Value Bars
The absolute value bars, as in \(\abs{25}\text{,}\) group the expression inside it just like a set of parentheses would.
 Radicals
The same is true of the radical symbol — everything inside the radical is grouped, as with \(\sqrt{123}\text{.}\)
 Fraction Bars
With a horizontal division bar, the numerator is treated as one group and the denominator as another, as with \(\frac{2+3}{52}\text{.}\)
We don't need parentheses for these three things since the absolute value bars, radical, and horizontal division bar each denote this grouping on their own. As far as priority in the order of operations goes, it's important to remember that these work just like our most familiar grouping symbols, parentheses.
With absolute value bars and radicals, these grouping symbols also do something to what's inside (but only after the operations inside have been executed). For example, \(\abs{2}=2\text{,}\) and \(\sqrt{9}=3\text{.}\)
Example 1.4.9
Use the order of operations to simplify the following expressions.

\(43\abs{57}\text{.}\) For this expression, we'll treat the absolute value bars just like we treat parentheses. This implies we'll simplify what's inside the bars first, and then compute the absolute value. After that, we'll multiply and then finally subtract:
\begin{align*} 43\abs{57} \amp= 43\abs{\nextoperation{57}}\\ \amp= 43\nextoperation{\abs{\highlight{2}}}\\ \amp= 4\nextoperation{3(\highlight{2})} \\ \amp= 4\highlight{6}\\ \amp= \highlight{2} \end{align*}We may not do \(43=1\) first, because \(3\) is connected to the absolute value bars by multiplication (although implicitly), which has a higher order than subtraction.

\(8\sqrt{5^28\cdot 2}\text{.}\) This expression has an expression inside the radical of \(5^28\cdot 2\text{.}\) We'll treat this radical like we would a set of parentheses, and simplify that internal expression first. We'll then apply the square root, and then our last step will be to subtract that expression from \(8\text{:}\)
\begin{align*} 8\sqrt{5^28\cdot 2} \amp= 8\sqrt{\nextoperation{5^2}8\cdot 2}\\ \amp= 8\sqrt{\highlight{25}\nextoperation{8\cdot 2}}\\ \amp= 8\sqrt{\nextoperation{25\highlight{16}}}\\ \amp= 8\nextoperation{\sqrt{\highlight{9}}}\\ \amp= 8\highlight{3}\\ \amp= \highlight{5} \end{align*} 
\(\dfrac{2^4+3\cdot 6}{518\div 2}\text{.}\) For this expression, the first thing we want to do is to recognize that the main fraction bar serves as a separator that groups the numerator and groups the denominator. Another way this expression could be written is \((2^4+3\cdot6)\div(1518\div 2)\text{.}\) This implies we'll simplify the numerator and denominator separately according to the order of operations (since there are implicit parentheses around each of these). As a final step we'll simplify the resulting fraction (which is division).
\begin{align*} \frac{2^4+3\cdot 6}{518\div 2} \amp= \frac{\nextoperation{2^4}+3\cdot 6}{5\nextoperation{18\div 2}}\\ \amp=\frac{\highlight{16}+\nextoperation{3\cdot 6}}{\nextoperation{5\highlight{9}}}\\ \amp=\frac{\nextoperation{16+\highlight{18}}}{\highlight{4}}\\ \amp=\frac{\highlight{34}}{4}\\ \amp=\frac{17}{2} \end{align*}
Checkpoint 1.4.10 More Practice with Order of Operations
Subsection 1.4.4 Negation and Distinguishing \((a)^m\) from \(a^m\)
We noted in the order of operations that using the negative sign to negate a number has the same priority as multiplication and division. To understand why this is, observe that \(1\cdot 23=23\text{,}\) just for one example. So negating \(23\) gives the same result as multiplying \(23\) by \(1\text{.}\) For this reason, negation has the same priority in the order of operations as multiplication. This can be a source of misunderstandings.
How would you write a math expression that takes the number \(4\) and squares it?
It does matter. The second option, \((4)^2\) is squaring the number \(4\text{.}\) The parentheses emphasize this.
But the expression \(4^2\) is different. There are two actions in this expression: a negation and and exponentiation. According to the order of operations, the exponentiation has higher priority than the negation, so the exponent of \(2\) in \(4^2\) applies to the \(4\) before the negative sign (multiplication by \(1\)) is taken into account.
and this is not the same as \((4)^2\text{,}\) which is positive \(16\text{.}\)
Warning 1.4.11 Negative Numbers Raised to Powers
You may find yourself needing to raise a negative number to a power, and using a calculator to do the work for you. If you do not understand the issue described here, then you may get incorrect results.
For example, entering
4^2
into a calculator will result in \(16\text{,}\) the negative of \(4^2\text{.}\)But entering
(4)^2
into a calculator will result in \(16\text{,}\) the square of \(4\text{.}\)
Go ahead and try entering these into your own calculator.
Checkpoint 1.4.12 Negating and Raising to Powers
Remark 1.4.13
You might observe in the previous example that there is no difference between \(4^3\) and \((4)^3\text{.}\) It's true that the results are the same, \(64\text{,}\) but the two expressions still do say different things. With \(4^3\text{,}\) you raise to a power first, then negate. With \((4)^3\text{,}\) you negate first, then raise to a power.
As was discussed in Subsection 1.1.5, if the base of a power is negative, then whether or not the result is positive or negative depends on if the exponent is even or odd. It depends on whether or not the factors can all be paired up to “cancel” negative signs, or if there will be a lone factor left by itself.
Subsection 1.4.5 More Examples
Here are some example exercises that involve applying the order of operations to more complicated expressions. Try these exercises and read the steps given in each solution.
Example 1.4.14
Simplify \(104(57)^3\text{.}\)
For the expression \(104(57)^3\text{,}\) we have simplify what's inside parentheses first, then we'll apply the exponent, then multiply, and finally subtract:
Checkpoint 1.4.15
Example 1.4.16
Simplify \(6(8)^2\div 4+1\text{.}\)
To simplify \(6(8)^2\div 4+1\text{,}\) we'll first apply the exponent of \(2\) to \(8\text{,}\) making sure to recall that \((8)^2=64\text{.}\) After this, we'll apply division. As a final step, we'll be have subtraction and addition, which we'll apply working lefttoright:
Checkpoint 1.4.17
Checkpoint 1.4.18
Subsection 1.4.6 Exercises
Review and Warmup
1
Multiply the following.
\(\displaystyle{ (9)\cdot(1)= }\)
\(\displaystyle{ (4)\cdot6= }\)
\(\displaystyle{ 8\cdot(6)= }\)
\(\displaystyle{ (4)\cdot0= }\)
2
Multiply the following.
\(\displaystyle{ (8)\cdot(3)= }\)
\(\displaystyle{ (7)\cdot4= }\)
\(\displaystyle{ 8\cdot(3)= }\)
\(\displaystyle{ (3)\cdot0= }\)
3
Multiply the following.
\(\displaystyle{ (1)\cdot(4)\cdot(3) = }\)
\(\displaystyle{ 2\cdot(7)\cdot(4)= }\)
\(\displaystyle{ (81)\cdot(56)\cdot0= }\)
4
Multiply the following.
\(\displaystyle{ (1)\cdot(5)\cdot(5) = }\)
\(\displaystyle{ 7\cdot(7)\cdot(2)= }\)
\(\displaystyle{ (80)\cdot(74)\cdot0= }\)
5
Compute \(1^{96}\text{.}\)
Calculate the power \((3)^{4}\text{.}\)
Find \((5)^{3}\text{.}\)
Calculate \(6^{3}\text{.}\)
6
Compute \(2^{3}\text{.}\)
Calculate the power \(8^{2}\text{.}\)
Find \((7)^{2}\text{.}\)
Calculate \((3)^{2}\text{.}\)
Order of Operations Skills
7
Evaluate the following.
\(\displaystyle{ 4+6(3)= }\)
8
Evaluate the following.
\(\displaystyle{ 7+3(4)= }\)
9
Evaluate the following.
\(\displaystyle{ 5(3+2)= }\)
10
Evaluate the following.
\(\displaystyle{ 4(4+4)= }\)
11
Evaluate the following.
\(\displaystyle{ (4\cdot2)^{2}= }\)
12
Evaluate the following.
\(\displaystyle{ (4\cdot4)^{2}= }\)
13
Evaluate the following.
\(\displaystyle{ 5\cdot3^{3}= }\)
14
Evaluate the following.
\(\displaystyle{ 2\cdot2^{2}= }\)
15
Evaluate the following.
\(\displaystyle{ (112)\cdot4= }\)
16
Evaluate the following.
\(\displaystyle{ (82)\cdot2= }\)
17
Evaluate the following.
\(\displaystyle{ 113\cdot2= }\)
18
Evaluate the following.
\(\displaystyle{ 253\cdot5= }\)
19
Evaluate the following.
\(\displaystyle{ 6+3\cdot7= }\)
20
Evaluate the following.
\(\displaystyle{ 7+2\cdot9= }\)
21
Evaluate the following.
\(\displaystyle{ 44\cdot6= }\)
22
Evaluate the following.
\(\displaystyle{ 53\cdot8= }\)
23
Evaluate the following.
\(\displaystyle{ 12(10)= }\)
24
Evaluate the following.
\(\displaystyle{ 14(8)= }\)
25
Evaluate the following.
\(\displaystyle{ [2(15)^{2}]= }\)
26
Evaluate the following.
\(\displaystyle{ [3(29)^{2}]= }\)
27
Evaluate the following.
\(\displaystyle{ 75 [ 7(5+3\cdot2)]= }\)
28
Evaluate the following.
\(\displaystyle{ 73 [ 1(2+3\cdot4)]= }\)
29
Evaluate the following.
\(\displaystyle{ 4+4(1395\cdot3^{3})= }\)
30
Evaluate the following.
\(\displaystyle{ 4+3(1144\cdot3^{3})= }\)
31
Evaluate the following.
\(\displaystyle{ 5 [ 3(43\cdot3)^{2}]= }\)
32
Evaluate the following.
\(\displaystyle{ 2 [ 9(74\cdot4)^{2}]= }\)
33
Evaluate the following.
\(\displaystyle{ 95[2^{2}(41)] = }\)
34
Evaluate the following.
\(\displaystyle{ 644[4^{2}(32)] = }\)
35
Evaluate the following.
\(\displaystyle{ (143)^{2}+5(143^{2}) }\)
36
Evaluate the following.
\(\displaystyle{ (123)^{2}+3(123^{2}) }\)
37
Evaluate the following.
\(\displaystyle{ (4\cdot2)^{2}  4\cdot2^{2} = }\)
38
Evaluate the following.
\(\displaystyle{ (4\cdot5)^{2}  4\cdot5^{2} = }\)
39
Evaluate the following.
\(\displaystyle{ 9\cdot3^{2}32\div4^{2}\cdot4+3 = }\)
40
Evaluate the following.
\(\displaystyle{ 10\cdot2^{2}75\div5^{2}\cdot6+3 = }\)
41
Evaluate the following.
\(\displaystyle{ 4(72)^{2}  4(72^{2}) = }\)
42
Evaluate the following.
\(\displaystyle{ 6(62)^{2}  6(62^{2}) = }\)
43
Evaluate the following.
\(\displaystyle{ \frac{1+3}{32}= }\)
44
Evaluate the following.
\(\displaystyle{ \frac{8+20}{73}= }\)
45
Evaluate the following.
\(\displaystyle{ \frac{8^{2}3^{2}}{1+10} = }\)
46
Evaluate the following.
\(\displaystyle{ \frac{8^{2}2^{2}}{5+5} = }\)
47
Evaluate the following.
\(\displaystyle{ \frac{27(4)^{3}}{1017} = }\)
48
Evaluate the following.
\(\displaystyle{ \frac{27(2)^{3}}{510} = }\)
49
Evaluate the following.
\(\displaystyle{ \frac{(2)\cdot(1)(8)\cdot3}{(8)^{2}+(66)} = }\)
50
Evaluate the following.
\(\displaystyle{ \frac{(2)\cdot(3)(8)\cdot3}{(8)^{2}+(66)} = }\)
51
Evaluate the following.
\(\displaystyle{ \left 14 \right = }\)
52
Evaluate the following.
\(\displaystyle{ \left 210 \right = }\)
53
Evaluate the following.
\(\displaystyle{ 27\left\lvert 35 \right\rvert + 1 = }\)
54
Evaluate the following.
\(\displaystyle{ 35\left\lvert 59 \right\rvert + 1 = }\)
55
Evaluate the following.
\(\displaystyle{ 5^{2}\left\lvert 8\cdot(7)\right\rvert = }\)
56
Evaluate the following.
\(\displaystyle{ 4^{2}\left\lvert 6\cdot(5)\right\rvert = }\)
57
Evaluate the following.
\(\displaystyle{ 82\left\lvert 9+(25)^{3}\right\rvert = }\)
58
Evaluate the following.
\(\displaystyle{ 98\left\lvert 5+(45)^{3}\right\rvert = }\)
59
Evaluate the following.
\(\displaystyle{ \frac{\left\lvert 27+(4)^{3}\right\rvert }{1} = }\)
60
Evaluate the following.
\(\displaystyle{ \frac{\left\lvert 1+(2)^{3}\right\rvert }{1} = }\)
61
Evaluate the following.
\(\displaystyle{ \left \frac{1+(4)^{3}}{3} \right = }\)
62
Evaluate the following.
\(\displaystyle{ \left \frac{1+(2)^{3}}{1} \right = }\)
63
Evaluate the following.
\(\displaystyle{ \frac{3\left\lvert 1737 \right\rvert}{22(4)^2} = }\)
64
Evaluate the following.
\(\displaystyle{ \frac{3\left\lvert 1022 \right\rvert}{18(3)^2} = }\)
65
Evaluate the following.
\(\displaystyle{ {{\frac{8}{5}}}+6\cdot{{\frac{2}{5}}}= }\)
66
Evaluate the following.
\(\displaystyle{ {{\frac{8}{3}}}+10\cdot{{\frac{8}{15}}}= }\)
67
Evaluate the following.
\(\displaystyle{ \left({{\frac{9}{8}}}{{\frac{5}{24}}}\right)5\left({{\frac{5}{24}}}{{\frac{9}{8}}}\right)= }\)
68
Evaluate the following.
\(\displaystyle{ \left({{\frac{9}{4}}}{{\frac{9}{8}}}\right)5\left({{\frac{9}{8}}}{{\frac{9}{4}}}\right)= }\)
69
Evaluate the following.
\(\displaystyle{ \left {{\frac{3}{2}}}{{\frac{3}{10}}}\right 5\left {{\frac{3}{10}}}{{\frac{3}{2}}}\right = }\)
70
Evaluate the following.
\(\displaystyle{ \left {{\frac{3}{8}}}{{\frac{7}{32}}}\right 5\left {{\frac{7}{32}}}{{\frac{3}{8}}}\right = }\)
71
Evaluate the following.
\(\displaystyle{ {{\frac{2}{5}}}+2\left({{\frac{3}{5}}}\right)^{2}= }\)
72
Evaluate the following.
\(\displaystyle{ {{\frac{1}{5}}}+6\left({{\frac{4}{5}}}\right)^{2}= }\)
73
Evaluate the following.
\(\displaystyle{{{\frac{3}{4}}} + {{\frac{5}{4}}} \div {{\frac{5}{2}}}  {{\frac{1}{2}}}=}\)
74
Evaluate the following.
\(\displaystyle{{{\frac{4}{3}}} + {{\frac{2}{3}}} \div {{\frac{5}{4}}}  {{\frac{2}{5}}}=}\)
75
Evaluate the following.
\(\displaystyle{ 5\sqrt{67+33}= }\)
76
Evaluate the following.
\(\displaystyle{ 5\sqrt{9+27}= }\)
77
Evaluate the following.
\(\displaystyle{ 5\sqrt{27+6\cdot6}= }\)
78
Evaluate the following.
\(\displaystyle{ 2\sqrt{64+9\cdot4}= }\)
79
Evaluate the following.
\(\displaystyle{ 12\sqrt{34  9}= }\)
80
Evaluate the following.
\(\displaystyle{ 83\sqrt{76  72}= }\)
81
Evaluate the following.
\(\displaystyle{ \sqrt{36} 2\sqrt{5+95}= }\)
82
Evaluate the following.
\(\displaystyle{ \sqrt{49} 4\sqrt{9+7}= }\)
83
Evaluate the following.
\(\displaystyle{ \sqrt{40+3^2}= }\)
84
Evaluate the following.
\(\displaystyle{ \sqrt{17+9^2}= }\)
85
Evaluate the following.
\(\displaystyle{ \sqrt{8^2+6^2}= }\)
86
Evaluate the following.
\(\displaystyle{ \sqrt{9^2+12^2}= }\)
87
Evaluate the following.
\(\displaystyle{ \frac{\sqrt{49}+9}{\sqrt{49}9}= }\)
88
Evaluate the following.
\(\displaystyle{ \frac{\sqrt{9}+5}{\sqrt{9}5}= }\)
89
Evaluate the following.
\(\displaystyle{ \frac{ \sqrt{4+2\cdot6} + \left\lvert 14  18 \right\rvert }{4(2)^3}=}\)
90
Evaluate the following.
\(\displaystyle{ \frac{ \sqrt{94+2\cdot3} + \left\lvert 17  45 \right\rvert }{19(3)^3}=}\)
91
Evaluate the following.
\(\displaystyle{ 4[175(5+6)] = }\)
92
Evaluate the following.
\(\displaystyle{ 4[157(3+6)] = }\)
93
Evaluate the following.
\(\displaystyle{ 8^{2}7[ 2( 23^{3} ) ] = }\)
94
Evaluate the following.
\(\displaystyle{ 10^{2}5[ 6( 73^{3} ) ] = }\)
Challenge
95
In this challenge, your job is to create expressions, using addition, subtraction, multiplication, and parentheses. You may use the numbers, \(1, 2, 3,\) and \(4\) in your expression, using each number only once. For example, you could make the expression: \(1+2 \cdot 3  4\text{.}\)
The greatest value that it is possible to create under these conditions is .
The least value that it is possible to create under these conditions is .