
## Section1.4Order of Operations

###### ObjectivesPCC Course Content and Outcome Guide

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.

### Subsection1.4.1Grouping 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

\begin{equation*} (2\cdot3)^2 \end{equation*}

clearly tells your reader to do that. And if you intend to execute the power first, then writing

\begin{equation*} 2\cdot\left(3^2\right) \end{equation*}

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.

###### Exercise1.4.4

Try simplifying this expression, focusing on executing the content inside the grouping symbols first.

### Subsection1.4.2Beyond 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.

###### Example1.4.6

Use the order of operations to simplify the following expressions.

1. $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+\overbrace{2\cdot 3}\\ \amp=10+\highlight{6}\\ \amp=\highlight{16} \end{align*}
2. $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\div2-1\amp=4+\overbrace{10\div2}-1\\ \amp=\overbrace{4+\highlight{5}}-1\\ \amp=\highlight{9}-1\\ \amp=\highlight{8} \end{align*}
3. $7-10+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*} 7-10+4\amp=\overbrace{7-10}+4\\ \amp=\highlight{-3}+4\\ \amp=1 \end{align*}
4. $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=\overbrace{20\div 4} \cdot 5\\ \amp=\highlight{5}\cdot5\\ \amp=\highlight{25} \end{align*}
5. $(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= (\overbrace{6+7})^2\\ \amp= \highlight{13}^2 \\ \amp= \highlight{169} \end{align*}
6. $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\overbrace{(2)^3}\\ \amp= 4(\highlight{8})\\ \amp= \highlight{32} \end{align*}
###### Remark1.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.

### Subsection1.4.3Absolute 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 examples has an implied grouping symbol aside from parentheses and brackets: absolute value bars, radicals, and fraction bars.

Absolute Value Bars

The absolute value bars, as in $\abs{2-5}\text{,}$ group the expression inside it just like a set of parentheses would.

The same is true of the radical symbol — everything inside the radical is grouped, as with $\sqrt{12-3}\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}{5-2}\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 the grouping symbols have been executed). For example, $\abs{-2}=2\text{,}$ and $\sqrt{9}=3\text{.}$

###### Example1.4.9

Use the order of operations to simplify the following expressions.

1. $4-3\abs{5-7}\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*} 4-3\abs{5-7} \amp= 4-3\abs{\overbrace{5-7}}\\ \amp= 4-3\overbrace{\abs{\highlight{-2}}}\\ \amp= 4-\overbrace{3(\highlight{2})} \\ \amp= 4-\highlight{6}\\ \amp= \highlight{-2} \end{align*}

We may not do $4-3=1$ first, because $3$ is connected to the absolute value bars by multiplication (although implicitly), which has a higher order than subtraction.

2. $8-\sqrt{5^2-8\cdot 2}\text{.}$ This expression has an expression inside the radical of $5^2-8\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^2-8\cdot 2} \amp= 8-\sqrt{\overbrace{5^2}-8\cdot 2}\\ \amp= 8-\sqrt{\highlight{25}-\overbrace{8\cdot 2}}\\ \amp= 8-\sqrt{\overbrace{25-\highlight{16}}}\\ \amp= 8-\overbrace{\sqrt{\highlight{9}}}\\ \amp= 8-\highlight{3}\\ \amp= \highlight{5} \end{align*}
3. $\dfrac{2^4+3\cdot 6}{5-18\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(15-18\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}{5-18\div 2} \amp= \frac{\overbrace{2^4}+3\cdot 6}{5-\underbrace{18\div 2}}\\ \amp=\frac{\highlight{16}+\overbrace{3\cdot 6}}{5-\highlight{9}}\\ \amp=\frac{16+\highlight{18}}{\highlight{-4}}\\ \amp=\frac{\highlight{34}}{-4}\\ \amp=-\frac{17}{2} \end{align*}

### Subsection1.4.4Negation and Distinguishing $(-a)^m$ from $-a^m$

We noted in the 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?

Well, it does matter. Certainly the second option, $(-4)^2$ is squaring the number $-4\text{.}$ The parentheses empasize this.

But the expression $-4^2$ is something 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$ is going to apply to the $4$ before the negative sign (multiplication by $-1$) ever gets taken into account. We would have:

\begin{align*} -4^2\amp=-\overbrace{4^2}\\ \amp=-16 \end{align*}

and this is not the same as $(-4)^2\text{,}$ which is positive $16\text{.}$

###### Warning1.4.11Negative 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{.}$

###### Remark1.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.

### Subsection1.4.5More 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.

###### Exercise1.4.14Complications

Simplify $10-4(5-7)^3\text{.}$

###### Exercise1.4.16Complications

Simplify $6-(-8)^2\div 4+1\text{.}$

### Subsection1.4.6Exercises

Practice order of operations by simplifying these expressions.

###### 1

Evaluate this expression:

$\displaystyle{ 3+8(8)= }$

###### 2

Evaluate this expression:

$\displaystyle{ 6+5(9)= }$

###### 3

Evaluate this expression:

$\displaystyle{ 2(2+5)= }$

###### 4

Evaluate this expression:

$\displaystyle{ 4(2+3)= }$

###### 5

Evaluate this expression:

$\displaystyle{ (2\cdot3)^{2}= }$

###### 6

Evaluate this expression:

$\displaystyle{ (3\cdot2)^{2}= }$

###### 7

Evaluate this expression:

$\displaystyle{ 3\cdot3^{3}= }$

###### 8

Evaluate this expression:

$\displaystyle{ 4\cdot2^{2}= }$

###### 9

Evaluate this expression:

$\displaystyle{ (14-4)\cdot3= }$

###### 10

Evaluate this expression:

$\displaystyle{ (12-5)\cdot5= }$

###### 11

Evaluate this expression:

$\displaystyle{ 19-5\cdot3= }$

###### 12

Evaluate this expression:

$\displaystyle{ 18-2\cdot5= }$

###### 13

Evaluate this expression:

$\displaystyle{ 2+4\cdot6= }$

###### 14

Evaluate this expression:

$\displaystyle{ 3+2\cdot8= }$

###### 15

Evaluate this expression:

$\displaystyle{ 2-5\cdot10= }$

###### 16

Evaluate this expression:

$\displaystyle{ 3-4\cdot7= }$

###### 17

Evaluate this expression:

$\displaystyle{ 3-2(-10)= }$

###### 18

Evaluate this expression:

$\displaystyle{ 4-5(-7)= }$

###### 19

Evaluate this expression:

$\displaystyle{ -[7-(3-7)^{2}]= }$

###### 20

Evaluate this expression:

$\displaystyle{ -[8-(4-7)^{2}]= }$

###### 21

Evaluate this expression:

$\displaystyle{ 5-4 [ 5-(6+2\cdot3)]= }$

###### 22

Evaluate this expression:

$\displaystyle{ 5-3 [ 9-(3+2\cdot5)]= }$

###### 23

Evaluate this expression:

$\displaystyle{ 2+4(19-2\cdot2^{3})= }$

###### 24

Evaluate this expression:

$\displaystyle{ 2+4(45-5\cdot2^{3})= }$

###### 25

Evaluate this expression:

$\displaystyle{ -3 [ 5-(2-4\cdot2)^{2}]= }$

###### 26

Evaluate this expression:

$\displaystyle{ -4 [ 1-(5-5\cdot2)^{2}]= }$

###### 27

Evaluate this expression:

$\displaystyle{ 162-5[6^{2}-(8-4)] = }$

###### 28

Evaluate this expression:

$\displaystyle{ 29-4[3^{2}-(7-5)] = }$

###### 29

Evaluate this expression:

$\displaystyle{ (17-4)^{2}+5(17-4^{2}) }$

###### 30

Evaluate this expression:

$\displaystyle{ (8-2)^{2}+2(8-2^{2}) }$

###### 31

Evaluate this expression:

$\displaystyle{ (2\cdot3)^{2} - 2\cdot3^{2} = }$

###### 32

Evaluate this expression:

$\displaystyle{ (2\cdot5)^{2} - 2\cdot5^{2} = }$

###### 33

Evaluate this expression:

$\displaystyle{ 5\cdot4^{2}-27\div3^{2}\cdot2+5 = }$

###### 34

Evaluate this expression:

$\displaystyle{ 6\cdot3^{2}-150\div5^{2}\cdot2+9 = }$

###### 35

Evaluate this expression:

$\displaystyle{ 5(8-3)^{2} - 5(8-3^{2}) = }$

###### 36

Evaluate this expression:

$\displaystyle{ 5(8-4)^{2} - 5(8-4^{2}) = }$

###### 37

Evaluate this expression:

$\displaystyle{ \frac{2+4}{7-5} }$

###### 38

Evaluate this expression:

$\displaystyle{ \frac{9+16}{11-6} }$

###### 39

Evaluate this expression:

$\displaystyle{ \frac{6^{2}-4^{2}}{7+3} = }$

###### 40

Evaluate this expression:

$\displaystyle{ \frac{6^{2}-2^{2}}{3+5} = }$

###### 41

Evaluate this expression:

$\displaystyle{ \frac{1-(-4)^{3}}{9-14} = }$

###### 42

Evaluate this expression:

$\displaystyle{ \frac{1-(-2)^{3}}{3-6} = }$

###### 43

Evaluate this expression:

$\displaystyle{ \frac{(-6)\cdot(-9)-(-4)\cdot5}{(-2)^{2}+(-6)} = }$

###### 44

Evaluate this expression:

$\displaystyle{ \frac{(-6)\cdot(-1)-(-10)\cdot3}{(-2)^{2}+(-6)} = }$

###### 45

Evaluate this expression:

$\displaystyle{ -\left| 4-7 \right| = }$

###### 46

Evaluate this expression:

$\displaystyle{ -\left| 4-5 \right| = }$

###### 47

Evaluate this expression:

$\displaystyle{ 5-9\left\lvert 2-5 \right\rvert + 8 = }$

###### 48

Evaluate this expression:

$\displaystyle{ 1-5\left\lvert 4-5 \right\rvert + 8 = }$

###### 49

Evaluate this expression:

$\displaystyle{ -8^{2}-\left\lvert 2\cdot(-9)\right\rvert = }$

###### 50

Evaluate this expression:

$\displaystyle{ -7^{2}-\left\lvert 6\cdot(-5)\right\rvert = }$

###### 51

Evaluate this expression:

$\displaystyle{ 4-4\left\lvert -1+(2-7)^{3}\right\rvert = }$

###### 52

Evaluate this expression:

$\displaystyle{ 5-2\left\lvert -5+(4-7)^{3}\right\rvert = }$

###### 53

Evaluate this expression:

$\displaystyle{ \frac{\left\lvert 27+(-4)^{3}\right\rvert }{-1} = }$

###### 54

Evaluate this expression:

$\displaystyle{ \frac{\left\lvert 27+(-2)^{3}\right\rvert }{-1} = }$

###### 55

Evaluate this expression:

$\displaystyle{ \left| \frac{27+(-4)^{3}}{-1} \right| = }$

###### 56

Evaluate this expression:

$\displaystyle{ \left| \frac{27+(-4)^{3}}{-1} \right| = }$

###### 57

Evaluate this expression:

$\displaystyle{ \frac{-2\left\lvert 1-2 \right\rvert}{23-(-5)^2} = }$

###### 58

Evaluate this expression:

$\displaystyle{ \frac{2\left\lvert 8-20 \right\rvert}{7-(-2)^2} = }$

###### 59

Evaluate this expression:

$\displaystyle{ {{\frac{4}{7}}}+4\cdot{{\frac{1}{14}}}= }$

###### 60

Evaluate this expression:

$\displaystyle{ {{\frac{4}{3}}}+8\cdot{{\frac{2}{3}}}= }$

###### 61

Evaluate this expression:

$\displaystyle{ \left({{\frac{1}{2}}}-{{\frac{1}{10}}}\right)-4\left({{\frac{1}{10}}}-{{\frac{1}{2}}}\right)= }$

###### 62

Evaluate this expression:

$\displaystyle{ \left({{\frac{7}{6}}}-{{\frac{7}{12}}}\right)-4\left({{\frac{7}{12}}}-{{\frac{7}{6}}}\right)= }$

###### 63

Evaluate this expression:

$\displaystyle{ \left| {{\frac{7}{2}}}-{{\frac{9}{10}}}\right| -4\left| {{\frac{9}{10}}}-{{\frac{7}{2}}}\right| = }$

###### 64

Evaluate this expression:

$\displaystyle{ \left| {{\frac{9}{10}}}-{{\frac{1}{8}}}\right| -4\left| {{\frac{1}{8}}}-{{\frac{9}{10}}}\right| = }$

###### 65

Evaluate this expression:

$\displaystyle{ {{\frac{4}{9}}}+10\left({{\frac{5}{9}}}\right)^{2}= }$

###### 66

Evaluate this expression:

$\displaystyle{ {{\frac{1}{3}}}+4\left({{\frac{2}{3}}}\right)^{2}= }$

###### 67

Evaluate this expression:

$\displaystyle{{{\frac{1}{5}}} + {{\frac{4}{5}}} \div {{\frac{3}{2}}} - {{\frac{5}{4}}}=}$

###### 68

Evaluate this expression:

$\displaystyle{{{\frac{2}{3}}} + {{\frac{1}{4}}} \div {{\frac{3}{4}}} - {{\frac{1}{2}}}=}$

###### 69

Evaluate this expression:

$\displaystyle{ 3\sqrt{49 - 48}= }$

###### 70

Evaluate this expression:

$\displaystyle{ 3\sqrt{91 - 27}= }$

###### 71

Evaluate this expression:

$\displaystyle{ 4\sqrt{-12+4\cdot7}= }$

###### 72

Evaluate this expression:

$\displaystyle{ 4\sqrt{-34+7\cdot5}= }$

###### 73

Evaluate this expression:

$\displaystyle{ 2-5\sqrt{16+48}= }$

###### 74

Evaluate this expression:

$\displaystyle{ 9-5\sqrt{58 - 42}= }$

###### 75

Evaluate this expression:

$\displaystyle{ \sqrt{4} -4\sqrt{-7+128}= }$

###### 76

Evaluate this expression:

$\displaystyle{ \sqrt{9} -3\sqrt{-4+68}= }$

###### 77

Evaluate this expression:

$\displaystyle{ \sqrt{77+2^2}= }$

###### 78

Evaluate this expression:

$\displaystyle{ \sqrt{-75+10^2}= }$

###### 79

Evaluate this expression:

$\displaystyle{ \sqrt{12^2+9^2}= }$

###### 80

Evaluate this expression:

$\displaystyle{ \sqrt{9^2+12^2}= }$

###### 81

Evaluate this expression:

$\displaystyle{ \frac{\sqrt{25}+10}{\sqrt{25}-10}= }$

###### 82

Evaluate this expression:

$\displaystyle{ \frac{\sqrt{64}+6}{\sqrt{64}-6}= }$

###### 83

Evaluate this expression:

$\displaystyle{ \frac{ \sqrt{69+3\cdot4} + \left\lvert -16 - 3 \right\rvert }{-129-(-5)^3} }$

###### 84

Evaluate this expression:

$\displaystyle{ \frac{ \sqrt{9+3\cdot9} + \left\lvert -11 - 3 \right\rvert }{-130-(-5)^3} }$

###### 85

Evaluate this expression:

$\displaystyle{ 2[18-3(7+4)] = }$

###### 86

Evaluate this expression:

$\displaystyle{ 2[16-5(5+4)] = }$

###### 87

Evaluate this expression:

$\displaystyle{ -4^{2}-9[ 10-( 2-2^{3} ) ] = }$

###### 88

Evaluate this expression:

$\displaystyle{ -6^{2}-7[ 5-( 7-2^{3} ) ] = }$