Skip to main content
Logo image

Section A.5 Order of Operations

When you write something down, itโ€™s important that the people who read it will understand what you actually meant. But language can be ambiguous. If we say in English, โ€œtwo times three squaredโ€, do we mean that:
  • 2 is multiplied by 3, and then the result is squared? That would mean first we have 6, and then we square 6 to end with 36.
  • Or that 2 is multiplied by โ€œthree squaredโ€? That would mean first we square 3 to get 9, and then we multiply by 2 to end with 18.
So it makes a difference, and the English phrase โ€œtwo times three squaredโ€ is arguably ambiguous.
English is allowed to be ambiguous. But math needs to be unambiguous and mean the same thing for everyone who reads it. So for this reason, there are some rules that weโ€™ve all agreed to that control what a math expression really means. These rules are called the โ€œorder of operationsโ€, which we review here.
Figure A.5.1. Alternative Video Lesson

Subsection A.5.1 Grouping Symbols

Consider the expression 2โ‹…32. There are two math operations here: at some point two things will be multiplied, and at some point something will be raised to a power. The result depends on which operation you decide to do first: If you multiply 2โ‹…3, and then square the result, you end with 36. If you square 3, and then multiply that result by 2, you end with 18. So if we want all people everywhere to interpret 2โ‹…32 in the same way, then only one of these can be correct.
One tool that we have to clearly tell readers which thing to do first is a pair of grouping symbols, like parentheses and brackets. If you intend to do the multiplication first, then writing (2โ‹…3)2clearly tells your reader to do that. And if you intend to execute the power first, then writing 2โ‹…(32) clearly tells your reader to do that.
To visualize the difference between 2โ‹…(32) or (2โ‹…3)2, consider these garden plots:
two 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.2. 3 ydis squared, then doubled: 2โ‹…(32)
a 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.3. 3 yd is doubled, then squared: (2โ‹…3)2
If we find 32, we have the area of one of the small square garden plots on the left. Then if we double that, we have 2โ‹…(32), the area of the entire left garden plot.
But if we find (2โ‹…3)2, then first we are doubling 3. So we are getting the area of a large square garden plot whose sides are twice as long. We end up with the area of the entire garden plot on the right.
The point is that these amounts are different.

Checkpoint A.5.4.

Calculate the value of 30โˆ’((2+3)โ‹…2), respecting the order that the grouping symbols are telling you to execute the arithmetic operations.
Explanation.
The grouping symbols tell us what to work on first. In this exercise, we have grouping symbols within grouping symbols, so any operation in there (the addition) should be executed first:
30โˆ’((2+3)โ‹…2)=30โˆ’(5โ‹…2)=30โˆ’10=20

Subsection A.5.2 Order of Operations

If math expressions used grouping symbols for every arithmetic operation, we wouldnโ€™t need โ€œorder of operationsโ€. Some computer systems work that way, requiring the use of grouping symbols all the time. But it is more common to allow math expressions that donโ€™t have grouping symbols everywhere, like 5+3โ‹…2. Should the addition 5+3 be done first, or should the multiplication 3โ‹…2 be done first? We have a set of rules the world has agreed to, known as the โ€œorder of operationsโ€. They tell us what to do first.
The order of operations is nothing more than an agreement that we all have made to prioritize doing arithmetic operations in a certain order.
List A.5.5. Order of Operations
(P)arentheses and other grouping symbols
Grouping symbols โ€œgroupโ€ the expression inside them, and the arithmetic within that group needs to be done first.
(E)xponentiation
After grouping symbols, exponentiation has the highest priority. Raise things to powers before doing any other arithmetic.
(M)ultiplication, (D)ivision, and Negation
After all exponentiation is done, start doing multiplication, division, and negation. These things all have equal priority. If there are more than one of them in your expression, do these things in order from left to right as you would naturally read the expression.
(A)ddition and (S)ubtraction
After all other arithmetic is done, addition and subtraction are all that is left. They have equal priority. If there are more than one of them in your expression, do these things in order from left to right as you would naturally read the expression.
To help remember the order of operations, consider the acronym PEMDAS. You might use mnemonic devices to help remember this 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 A.5.6.

Use the order of operations to simplify the following expressions.
  1. 10+2โ‹…3. With this expression, we have addition and multiplication. The order of operations says the multiplication has higher priority, so do that first:
    10+2โ‹…3=10+2โ‹…3=10+6=16
  2. 4+10รท2โˆ’1. According to the order of operations, the first thing to do is the division. 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 expression only has subtraction and addition. These operations tie for priority (even though โ€œAโ€ comes before โ€œSโ€ in PEMDAS). So we work left to right to do them:
    7โˆ’10+4=7โˆ’10+4=โˆ’3+4=1
  4. 20รท4โ‹…7. This expression has only division and multiplication. Again, we have two operations that tie for priority, so we do them in order from left to right:
    20รท4โ‹…5=20รท4โ‹…5=5โ‹…5=25
  5. (6+7)2. Here we have addition inside parentheses, and an exponent of 2 outside. We must do the arithmetic inside the parentheses first:
    (6+7)2=(6+7)2=132=169
  6. 4(2)3. This expression has multiplication and an exponent. There are parentheses, but no operation inside them. Parentheses used this way are just to make it clear that the 4 and 2 are separate numbers, not to be confused with the number 42. Exponentiation has the higher priority, so weโ€™ll do that part first, and then multiply:
    4(2)3=4(2)3=4(8)=32

Remark A.5.7.

There are several different ways to write multiplication. We can use the symbols โ‹…, ร—, and โˆ— to mean multiplication. We can also write two things right next to each other with no symbol in between them to mean multiplication. That is what is happening in Item f, where the 4 is written right next to the (2)3 with no symbol in between.
Using a symbol for multiplication is called โ€œexplicit multiplicationโ€ and not writing any symbol at all is called โ€œimplicit multiplicationโ€. For this textbook, explicit and implicit multiplication have the same priority in the order of operations. However there are some conventions out in the real world where implicit multiplication has a higher priority in the order of operations than explicit multiplication. You may have seen memes with expressions like 6รท2(3) that play on how the real world has more than one convention for the order of operations.

Checkpoint A.5.8. Practice with order of operations.

Simplify this expression one step at a time, using the order of operations.

(a)

5โˆ’3(7โˆ’4)2=
Explanation.
5โˆ’3(7โˆ’4)2=5โˆ’3(3)2

(b)

5โˆ’3(7โˆ’4)2=
Explanation.
=5โˆ’3(9)

(c)

5โˆ’3(7โˆ’4)2=
Explanation.
=5โˆ’27

(d)

5โˆ’3(7โˆ’4)2=
Explanation.
=โˆ’22

Checkpoint A.5.9.

Simplify 24รท(15รท3+1)+2.
Explanation.
With the expression 24รท(15รท3+1)+2, weโ€™ll simplify whatโ€™s inside the parentheses according to the order of operations, and then take 24 divided by that expression as our last step:
24รท(15รท3+1)+2=24รท(15รท3+1)+2=24รท(5+1)+2=24รท6+2=4+2=6

Checkpoint A.5.10.

Simplify (20โˆ’42)รท(4โˆ’6)3.
Explanation.
The expression (20โˆ’42)(4โˆ’6)3 has two sets of parentheses, so our first step will be to simplify whatโ€™s inside each of those first according to the order of operations. Once weโ€™ve done that, weโ€™ll apply the exponent and then finally divide:
(20โˆ’42)รท(4โˆ’6)3=(20โˆ’42)(4โˆ’6)3=(20โˆ’16)(4โˆ’6)3=4(4โˆ’6)3=4(โˆ’2)3=4(โˆ’8)=โˆ’32

Subsection A.5.3 Absolute Value and Implied Grouping

Grouping symbols are more than just parentheses and brackets. Each of the following operations implies some grouping.
Absolute Value Bars
Absolute value bars group the expression inside just like a set of parentheses would. In the expression 3|2โˆ’5|, the first thing to do is subtract 2โˆ’5 since that is inside the absolute value bars.
Radicals
The same is true with a radical symbol. Everything inside the radical is grouped. For example with 4+212โˆ’3, the first arithmetic to do is subtract 12โˆ’3.
Fraction Bars
A fraction bar can create two groups, one in the numerator and one in the denominator. With the expression 2+35โˆ’2รท4, the first arithmetic to take care of is adding 2+3 and subtracting 5โˆ’2. These two groups can be worked on separately in any order.
Exponents
Content that is inside an exponent is treated as one group, as with 2+2โ‹…3. In that example, the first arithmetic to take care of is multiplying 2โ‹…3.
Each of these implied groupings also ask you to do something once the arithmetic on the inside is completed. Actually taking the absolute value or the square root, perhaps. Doing the division in the case of a fraction. Raising something to a power. But before doing those things, all of the arithmetic inside the groups should be take care of.

Example A.5.11.

Use the order of operations to simplify the following expressions.
  1. 4โˆ’3|5โˆ’7|. The absolute value bars group the 5โˆ’7 so we must do that subtraction first. Then we take the absolute value and continue:
    4โˆ’3|5โˆ’7|=4โˆ’3|5โˆ’7|=4โˆ’3|โˆ’2|=4โˆ’3(2)=4โˆ’6=โˆ’2
    It would be a mistake to subtract 4โˆ’3 first, because that 3 is multiplied by the |5โˆ’7|. So subtracting 4โˆ’3 would violate the order of operations.
  2. 8โˆ’52โˆ’8โ‹…2. The radical is grouping 52โˆ’8โ‹…2, which must be simplified first. Then we take the square root and continue:
    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. We recognize that the fraction bar is creating two groups. We should simplify the numerator and denominator separately according to the order of operations, and proceed from there:
    24+3โ‹…65โˆ’18รท2=24+3โ‹…65โˆ’18รท2=16+3โ‹…65โˆ’9=16+18โˆ’4=34โˆ’4=โˆ’172

Checkpoint A.5.12. Implied Grouping.

Use the order of operations to evaluate
33โˆ’1+3|9โˆ’10|3+18รท3.
Explanation.
We start by identifying the innermost, highest priority operations:
33โˆ’1+3|9โˆ’10|3+18รท3=33โˆ’1+3|9โˆ’10|3+18รท3=32+3|โˆ’1|3+6=32+3(1)9=9+3(1)9=9+33=123=4

Checkpoint A.5.13.

Simplify 2|9โˆ’15|+1(โˆ’5)2+122.
Explanation.
To simplify this expression, the first thing we want to recognize is the role of the main fraction bar, which groups the numerator and denominator. This implies weโ€™ll simplify the numerator and denominator separately according to the order of operations, and then reduce the fraction that results:
2|9โˆ’15|+1(โˆ’5)2+122=2|9โˆ’15|+1(โˆ’5)2+122=2|โˆ’6|+125+122=2(6)+125+144=12+1169=1313=1

Subsection A.5.4 Understanding (โˆ’a)m versus โˆ’am

We noted in the order of operations that using the minus sign to negate a number has the same priority as multiplication and division.
How would you write a math expression that takes the number โˆ’4 and squares it? Is it OK to write โˆ’42? How about (โˆ’4)2?
These expressions mean very different things. The second option, (โˆ’4)2 is squaring the number โˆ’4. The parentheses make this clear. The result is 16.
The first expression โˆ’42 is different. There are two actions here: a negation and exponentiation. According to the order of operations, the exponentiation has higher priority, so we should do 42 first.
โˆ’42=โˆ’42=โˆ’16
and this is not the same as (โˆ’4)2, which is positive 16.

Warning A.5.14. 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 above, then you may get incorrect results.
  • Entering -4^2 into a calculator or computer will result in โˆ’16.
  • Entering (-4)^2 into a calculator or computer will result in 16.
Try entering these into your own calculator.

Checkpoint A.5.15. Negating and Raising to Powers.

Compute the following. In each part, the first expression asks you to exponentiate and then negate the result. The second expression has a negative number raised to a power.

(a)

โˆ’34= and (โˆ’3)4=
Explanation.
โˆ’34=โˆ’81 and (โˆ’3)4=81

(b)

โˆ’43= and (โˆ’4)3=
Explanation.
โˆ’43=โˆ’64 and (โˆ’4)3=โˆ’64

(c)

โˆ’1.12= and (โˆ’1.1)2=
Explanation.
โˆ’1.12=โˆ’1.21 and (โˆ’1.1)2=1.21
You might notice in Checkpoint 15 that โˆ’43 and (โˆ’4)3 each have the same result, โˆ’64. Itโ€™s true that the results are the same, but the two expressions say different things. With โˆ’43, you raise to a power first, then negate. With (โˆ’4)3, you negate first, then raise to a power. Itโ€™s like two different roads that happen to lead to the same place, which happens sometimes.

Exercises A.5.5 Exercises

Skills

Exercise Group.

Use the order of operations to simplify the expression.

Exercise Group.

Use the order of operations to simplify the expression that has grouping symbols.

Exercise Group.

Use the order of operations to simplify the expression that has absolute value or implied grouping.

Challenge

69.

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 .
You have attempted 1 of 72 activities on this page.