Skip to main content
permalink

Section A.5 Order of Operations

permalink

permalinkMathematical 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, and then the result is squared?

  • or that 2 is multiplied by the result of squaring 3?

permalinkEnglish 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.

permalink
Figure A.5.0.1. Alternative Video Lesson
permalink

Subsection A.5.1 Grouping Symbols

permalinkConsider the math expression 2β‹…32. 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β‹…3, and then square the result, you have 36. If you square 3, and then multiply 2 by the result, you have 18. If we want all people everywhere to interpret 2β‹…32 in the same way, then only one of these can be correct.

permalinkThe 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

(2β‹…3)2

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

2β‹…(32)

permalinkclearly tells your reader to do that.

permalinkTo visualize the difference between 2β‹…(32) or (2β‹…3)2, consider these garden plots:

permalinktwo squares, side by side; each square is labeled as 3 yd wide and 3 yd high, and labeled as having area 9 yd^2
Figure A.5.1.2. 3 yd is squared, then doubled: 2β‹…(32)
permalinka square whose width is labeled as 2*3 yd = 6 yd wide and whose height is also 6 yd; the square's area is labeled as being area 36 yd^2
Figure A.5.1.3. 3 yd is doubled, then squared: (2β‹…3)2

permalinkIf we calculate 32, we have the area of one of the small square garden plots on the left. If we then double that, we have 2β‹…(32), the area of the left garden plot.

permalinkBut if we calculate (2β‹…3)2, then first we are doubling 3. 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.

permalinkThe point is that these amounts are different.

permalink
Checkpoint A.5.1.4.
permalink

Subsection A.5.2 Beyond Grouping Symbols

permalinkIf 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β‹…2. Should the addition 5+3 be executed first, or should the multiplication 3β‹…2? We need what's known formally as the order of operations to tell us what to do.

permalinkThe order of operations is nothing more than an agreement that we all have made to prioritize the arithmetic operations in a certain order.

permalink
List A.5.2.5. Order of Operations
(P)arentheses and other grouping symbols

Grouping symbols should always direct you to the highest priority arithmetic first.

(E)xponentiation

After grouping symbols, exponentiation has the highest priority. Execute any exponentiation before other arithmetic operations.

(M)ultiplication, (D)ivision, and Negation

After all exponentiation has been executed, start executing multiplications, divisions, and negations. These things all have equal priority. If there are more than one of them in your expression, the highest priority is the one that is leftmost (which comes first as you read it).

(A)ddition and (S)ubtraction

After all other arithmetic has been executed, these are all that is left. Addition and subtraction have equal priority. If there are more than one of them in your expression, the highest priority is the one that is leftmost (which comes first as you read it).

permalinkA 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.).

permalinkWe'll start with a few examples that only invoke a few operations each.

permalink
Example A.5.2.6.

Use the order of operations to simplify the following expressions.

  1. 10+2β‹…3. 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:

    10+2β‹…3=10+2β‹…3=10+6=16
  2. 4+10Γ·2βˆ’1. 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:

    4+10Γ·2βˆ’1=4+10Γ·2βˆ’1=4+5βˆ’1=9βˆ’1=8
  3. 7βˆ’10+4. 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:

    7βˆ’10+4=7βˆ’10+4=βˆ’3+4=1
  4. 20Γ·4β‹…7. 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:

    20Γ·4β‹…5=20Γ·4β‹…5=5β‹…5=25
  5. (6+7)2. 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:

    (6+7)2=(6+7)2=132=169
  6. 4(2)3. 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. In other words, 4(2)3 and 423 mean very different things. Exponentiation has the higher priority, so we'll apply the exponent first, and then we'll multiply:

    4(2)3=4(2)3=4(8)=32
permalink
Remark A.5.2.7.

There are many different ways that we write multiplication. We can use the symbols β‹…, Γ—, and βˆ— to denote multiplication. We can also use parentheses to denote multiplication, as we've seen in Example A.5.2.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.

permalink
Checkpoint A.5.2.8. Practice with order of operations.
permalink

Subsection A.5.3 Absolute Value Bars, Radicals, and Fraction Bars are Grouping Symbols

permalinkWhen 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 |2βˆ’5|, 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 12βˆ’3.

Fraction Bars

With a horizontal division bar, the numerator is treated as one group and the denominator as another, as with 2+35βˆ’2.

permalinkWe 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.

permalinkWith 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, |βˆ’2|=2, and 9=3.

permalink
Example A.5.3.9.

Use the order of operations to simplify the following expressions.

  1. 4βˆ’3|5βˆ’7|. 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:

    4βˆ’3|5βˆ’7|=4βˆ’3|5βˆ’7|=4βˆ’3|βˆ’2|=4βˆ’3(2)=4βˆ’6=βˆ’2

    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βˆ’52βˆ’8β‹…2. This expression has an expression inside the radical of 52βˆ’8β‹…2. 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:

    8βˆ’52βˆ’8β‹…2=8βˆ’52βˆ’8β‹…2=8βˆ’25βˆ’8β‹…2=8βˆ’25βˆ’16=8βˆ’9=8βˆ’3=5
  3. 24+3β‹…65βˆ’18Γ·2. 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 (24+3β‹…6)Γ·(15βˆ’18Γ·2). 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).

    24+3β‹…65βˆ’18Γ·2=24+3β‹…65βˆ’18Γ·2=16+3β‹…65βˆ’9=16+18βˆ’4=34βˆ’4=βˆ’172
permalink
Checkpoint A.5.3.10. More Practice with Order of Operations.
permalink

Subsection A.5.4 Negation and Distinguishing (βˆ’a)m from βˆ’am

permalinkWe 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β‹…23=βˆ’23, just for one example. So negating 23 gives the same result as multiplying 23 by βˆ’1. For this reason, negation has the same priority in the order of operations as multiplication. This can be a source of misunderstandings.

permalinkHow would you write a math expression that takes the number βˆ’4 and squares it?

βˆ’42?(βˆ’4)2?it doesn't matter?

permalinkIt does matter. The second option, (βˆ’4)2 is squaring the number βˆ’4. The parentheses emphasize this.

permalinkBut the expression βˆ’42 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 βˆ’42 applies to the 4 before the negative sign (multiplication by βˆ’1) is taken into account.

βˆ’42=βˆ’42=βˆ’16

permalinkand this is not the same as (βˆ’4)2, which is positive 16.

permalink
Warning A.5.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, the negative of 42.

  • But entering (-4)^2 into a calculator will result in 16, the square of βˆ’4.

Go ahead and try entering these into your own calculator.

permalink
Checkpoint A.5.4.12. Negating and Raising to Powers.
permalink
Remark A.5.4.13.

You might observe in the previous example that there is no difference between βˆ’43 and (βˆ’4)3. It's true that the results are the same, βˆ’64, but the two expressions still do say different things. With βˆ’43, you raise to a power first, then negate. With (βˆ’4)3, you negate first, then raise to a power.

permalinkAs was discussed in Subsection A.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.

permalink

Subsection A.5.5 More Examples

permalinkHere 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.

permalink
Example A.5.5.14.

Simplify 10βˆ’4(5βˆ’7)3.

Explanation

For the expression \(10-4(5-7)^3\text{,}\) we have simplify what's inside parentheses first, then we'll apply the exponent, then multiply, and finally subtract:

\begin{align*} 10-4(5-7)^3\amp=10-4(\nextoperation{5-7})^3\\ \amp=10-4\nextoperation{(\highlight{-2})^3}\\ \amp=10-\nextoperation{4(\highlight{-8})}\\ \amp=10-\highlight{(-32)}\\ \amp=10+32\\ \amp=\highlight{42} \end{align*}
permalink
Checkpoint A.5.5.15.
permalink
Example A.5.5.16.

Simplify 6βˆ’(βˆ’8)2Γ·4+1.

Explanation

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 left-to-right:

\begin{align*} 6-(-8)^2\div 4+1 \amp= 6-\nextoperation{(-8)^2}\div 4+1\\ \amp=6-\nextoperation{(\highlight{64})\div 4}+1\\ \amp=\nextoperation{6-\highlight{16}}+1\\ \amp=\highlight{-10}+1\\ \amp=\highlight{-9} \end{align*}
permalink
Checkpoint A.5.5.17.
permalink
Checkpoint A.5.5.18.
permalink

Exercises A.5.6 Exercises

Review and Warmup
permalink
1.

Multiply the following.

  1. (βˆ’9)β‹…(βˆ’1)

  2. (βˆ’7)β‹…3

  3. 9β‹…(βˆ’4)

  4. (βˆ’8)β‹…0

permalink
2.

Multiply the following.

  1. (βˆ’9)β‹…(βˆ’2)

  2. (βˆ’5)β‹…7

  3. 9β‹…(βˆ’7)

  4. (βˆ’7)β‹…0

permalink
3.

Multiply the following.

  1. (βˆ’1)β‹…(βˆ’6)β‹…(βˆ’2)

  2. 5β‹…(βˆ’6)β‹…(βˆ’3)

  3. (βˆ’90)β‹…(βˆ’68)β‹…0

permalink
4.

Multiply the following.

  1. (βˆ’1)β‹…(βˆ’4)β‹…(βˆ’4)

  2. 4β‹…(βˆ’6)β‹…(βˆ’5)

  3. (βˆ’88)β‹…(βˆ’56)β‹…0

permalink
5.
  1. Compute βˆ’82.

  2. Calculate the power βˆ’32.

  3. Find βˆ’62.

  4. Calculate (βˆ’1)19.

permalink
6.
  1. Compute βˆ’140.

  2. Calculate the power (βˆ’2)4.

  3. Find βˆ’44.

  4. Calculate βˆ’82.

Order of Operations Skills
permalink
7.

Evaluate the following.

6+7(3)=

permalink
8.

Evaluate the following.

2+4(4)=

permalink
9.

Evaluate the following.

5(3+3)=

permalink
10.

Evaluate the following.

4(4+5)=

permalink
11.

Evaluate the following.

(3β‹…2)2=

permalink
12.

Evaluate the following.

(4β‹…4)2=

permalink
13.

Evaluate the following.

5β‹…32=

permalink
14.

Evaluate the following.

5β‹…23=

permalink
15.

Evaluate the following.

(12βˆ’2)β‹…5=

permalink
16.

Evaluate the following.

(8βˆ’2)β‹…3=

permalink
17.

Evaluate the following.

14βˆ’3β‹…2=

permalink
18.

Evaluate the following.

17βˆ’3β‹…5=

permalink
19.

Evaluate the following.

6+4β‹…8=

permalink
20.

Evaluate the following.

7+2β‹…6=

permalink
21.

Evaluate the following.

4βˆ’5β‹…8=

permalink
22.

Evaluate the following.

5βˆ’3β‹…10=

permalink
23.

Evaluate the following.

5βˆ’2(βˆ’7)=

permalink
24.

Evaluate the following.

1βˆ’5(βˆ’9)=

permalink
25.

Evaluate the following.

βˆ’[1βˆ’(2βˆ’5)2]=

permalink
26.

Evaluate the following.

βˆ’[10βˆ’(2βˆ’7)2]=

permalink
27.

Evaluate the following.

7βˆ’5[10βˆ’(1+4β‹…3)]=

permalink
28.

Evaluate the following.

7βˆ’3[4βˆ’(8+4β‹…5)]=

permalink
29.

Evaluate the following.

6+3(59βˆ’2β‹…33)=

permalink
30.

Evaluate the following.

6+2(110βˆ’4β‹…33)=

permalink
31.

Evaluate the following.

βˆ’5[4βˆ’(5βˆ’2β‹…5)2]=

permalink
32.

Evaluate the following.

βˆ’5[10βˆ’(3βˆ’4β‹…2)2]=

permalink
33.

Evaluate the following.

42βˆ’3[42βˆ’(5βˆ’1)]=

permalink
34.

Evaluate the following.

74βˆ’2[62βˆ’(4βˆ’2)]=

permalink
35.

Evaluate the following.

(9βˆ’2)2+3(9βˆ’22)=

permalink
36.

Evaluate the following.

(13βˆ’3)2+4(13βˆ’32)=

permalink
37.

Evaluate the following.

(4β‹…3)2βˆ’4β‹…32=

permalink
38.

Evaluate the following.

(4β‹…5)2βˆ’4β‹…52=

permalink
39.

Evaluate the following.

8β‹…42βˆ’125Γ·52β‹…4+5=

permalink
40.

Evaluate the following.

9β‹…22βˆ’36Γ·32β‹…4+9=

permalink
41.

Evaluate the following.

5(9βˆ’4)2βˆ’5(9βˆ’42)=

permalink
42.

Evaluate the following.

6(6βˆ’2)2βˆ’6(6βˆ’22)=

permalink
43.

Evaluate the following.

5+13βˆ’2=

permalink
44.

Evaluate the following.

4+67βˆ’2=

permalink
45.

Evaluate the following.

82βˆ’323+8=

permalink
46.

Evaluate the following.

82βˆ’227+3=

permalink
47.

Evaluate the following.

27βˆ’(βˆ’4)33βˆ’10=

permalink
48.

Evaluate the following.

27βˆ’(βˆ’2)37βˆ’12=

permalink
49.

Evaluate the following.

(βˆ’2)β‹…(βˆ’9)βˆ’(βˆ’10)β‹…9(βˆ’6)2+(βˆ’38)=

permalink
50.

Evaluate the following.

(βˆ’2)β‹…(βˆ’3)βˆ’(βˆ’6)β‹…7(βˆ’6)2+(βˆ’38)=

permalink
51.

Evaluate the following.

βˆ’|1βˆ’5|=

permalink
52.

Evaluate the following.

βˆ’|1βˆ’2|=

permalink
53.

Evaluate the following.

2βˆ’7|4βˆ’9|+3=

permalink
54.

Evaluate the following.

3βˆ’6|1βˆ’6|+3=

permalink
55.

Evaluate the following.

βˆ’52βˆ’|8β‹…(βˆ’5)|=

permalink
56.

Evaluate the following.

βˆ’42βˆ’|6β‹…(βˆ’9)|=

permalink
57.

Evaluate the following.

8βˆ’4|βˆ’5+(4βˆ’5)3|=

permalink
58.

Evaluate the following.

9βˆ’8|βˆ’1+(3βˆ’5)3|=

permalink
59.

Evaluate the following.

|27+(βˆ’4)3|βˆ’1=

permalink
60.

Evaluate the following.

|1+(βˆ’2)3|βˆ’1=

permalink
61.

Evaluate the following.

|1+(βˆ’4)3βˆ’3|=

permalink
62.

Evaluate the following.

|1+(βˆ’4)3βˆ’3|=

permalink
63.

Evaluate the following.

βˆ’3|5βˆ’12|6βˆ’(βˆ’3)2=

permalink
64.

Evaluate the following.

βˆ’3|1βˆ’7|7βˆ’(βˆ’1)2=

permalink
65.

Evaluate the following.

87+8β‹…37=

permalink
66.

Evaluate the following.

83+2β‹…23=

permalink
67.

Evaluate the following.

(910βˆ’750)βˆ’2(750βˆ’910)=

permalink
68.

Evaluate the following.

(32βˆ’18)βˆ’2(18βˆ’32)=

permalink
69.

Evaluate the following.

|32βˆ’56|βˆ’2|56βˆ’32|=

permalink
70.

Evaluate the following.

|38βˆ’916|βˆ’2|916βˆ’38|=

permalink
71.

Evaluate the following.

15+4(35)2=

permalink
72.

Evaluate the following.

35+8(25)2=

permalink
73.

Evaluate the following.

34+13Γ·13βˆ’45=

permalink
74.

Evaluate the following.

43+35Γ·15βˆ’52=

permalink
75.

Evaluate the following.

494βˆ’93=

permalink
76.

Evaluate the following.

536+28=

permalink
77.

Evaluate the following.

5βˆ’8+8β‹…3=

permalink
78.

Evaluate the following.

273+3β‹…9=

permalink
79.

Evaluate the following.

7βˆ’261βˆ’25=

permalink
80.

Evaluate the following.

4βˆ’32+7=

permalink
81.

Evaluate the following.

36βˆ’3βˆ’9+130=

permalink
82.

Evaluate the following.

49βˆ’56+58=

permalink
83.

Evaluate the following.

33+42=

permalink
84.

Evaluate the following.

βˆ’36+102=

permalink
85.

Evaluate the following.

82+62=

permalink
86.

Evaluate the following.

92+122=

permalink
87.

Evaluate the following.

81+381βˆ’3=

permalink
88.

Evaluate the following.

4+64βˆ’6=

permalink
89.

Evaluate the following.

βˆ’8+6β‹…4+|βˆ’16βˆ’7|βˆ’67βˆ’(βˆ’4)3=

permalink
90.

Evaluate the following.

1+8β‹…3+|βˆ’18βˆ’7|βˆ’2βˆ’(βˆ’2)3=

permalink
91.

Evaluate the following.

4[17βˆ’5(3+8)]=

permalink
92.

Evaluate the following.

4[15βˆ’3(1+8)]=

permalink
93.

Evaluate the following.

βˆ’82βˆ’9[5βˆ’(6βˆ’43)]=

permalink
94.

Evaluate the following.

βˆ’102βˆ’5[9βˆ’(4βˆ’43)]=

Challenge
permalink
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β‹…3βˆ’4.

  1. The greatest value that it is possible to create under these conditions is .

  2. The least value that it is possible to create under these conditions is .