0.3: Order of Operations
- Page ID
- 45023
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)When simplifying expressions, it is important that we simplify them in the correct order. Consider the following problem done two different ways:
\[\begin{array}{ccccc}\underbrace{2+5}\cdot 3&\text{Add first}&\qquad&2+\underbrace{5\cdot 3}&\text{Multiply} \\ \underbrace{7\cdot 3}&\text{Multiply}&\qquad&\underbrace{2+15}&\text{Add} \\ 21&\text{Result}&\qquad&17&\text{Result}\end{array}\nonumber\]
The previous example illustrates that if the same problem is done two different ways, we will arrive at two different results. However, only one method is correct. We can think about writing a sentence: it matters where we put punctuation, capital letter, etc. Well, mathematics is very similar and we must follow an order. It turns out the second method, 17, is the correct method. The order of operations ends with the most basic of operations, addition (or subtraction). Before addition is completed, we must do multiplication (or division). Before multiplication is completed, we must do exponents. When we want to do something out of this order, we use grouping symbols, e.g., parenthesis, brackets, absolute value, radical, etc.
We can use the word PEMDAS to remember the order of operations, as the first letter of each operation creates the word PEMDAS. Another way to remember the order of operations is to think of a phrase such as “Please Excuse My Dear Aunt Sally,” where each word starts with the same letter as the operation. However, it is the author’s suggestion to think about PEMDAS as a vertical word written as
\[\begin{array}{rl}\mathbf{P}&\text{Parenthesis}\\ \mathbf{E}&\text{Exponents} \\ \mathbf{MD}&\text{Multiplication & Division} \\ \mathbf{AS}&\text{Addition & Subtraction} \end{array}\nonumber\]
Multiplying and dividing are done at the same step because they are the same operation (division is just multiplying by the reciprocal). This means multiplication and division must be done in order, left to right. So, some problems we will divide first, others we will multiply first. For adding and subtracting (subtracting is just adding the opposite), we have a similar case.
The first use of grouping symbols is found in 1646 from the Dutch mathematician’s, Franciscus van Schooten’s, textbook, Vieta. The part of the expression first to be evaluated was represented by a bar. So problems like \(2 (3 + 5)\) were written as \(2 \cdot \overline{3 + 5}\).
Simplify the expression completely: \(2 + 3 (9 - 4)^2\)
Solution
\[\begin{array}{rl} 2 + 3 (\underbrace{9 - 4})^2 & \text{Parenthesis} \\ 2 + 3 \underbrace{(5)^2} & \text{Exponents} \\ 2 + \underbrace{3 (25)} & \text{Multiply} \\ \underbrace{2 + 75} & \text{Add} \\ 77 & \text{Result} \end{array}\nonumber\]
Simplify the expression completely: \(30 \div 3 \cdot 2\)
Solution
\[\begin{array}{rl} \underbrace{30 \div 3} \cdot 2 & \text{Divide} \\ \underbrace{10 \cdot 2} & \text{Multiply} \\ 20 & \text{Result} \end{array}\nonumber\]
It is very important to remember to multiply and divide from left to right! In Example \(\PageIndex{2}\), if we had multiplied first, we would have obtained 5 as the answer, which is incorrect.
Grouping symbols \((\quad ), \{\quad \}, [\quad ]\)
If there are several parenthesis in a problem, we will start with the inner most parenthesis and work our way out as we apply order of operations to the expression. To avoid confusion with multiple parenthesis, we use different types of grouping symbols such as { } and [ ] and ( ). These grouping symbols all mean the same thing and imply the expression inside must be evaluated first.
Simplify the expression completely: \(2 \bigl\{8^2 - 7 [32 - 4 (3^2 + 1)] (- 1)\bigr\}\)
Solution
\[\begin{array}{rl} 2 \bigl\{8^2 - 7 [32 - 4 (\underbrace{3^2} + 1)] (- 1) \bigr\} & \text{Innermost parenthesis; exponents} \\ 2 \{8^2 - 7 [32 - 4 (\underbrace{9 + 1})] (- 1)\} & \text{Add} \text{ inside } \text{those } \text{parenthesis} \\ 2 \{8^2 - 7 [32 \underbrace{- 4 (10)}] (- 1)\} & \text{Multiply } \text{inside } \text{inner } \text{most } \text{parenthesis} \\ 2 \{8^2 - 7 [\underbrace{32 - 40}] (- 1)\} & \text{Subtract inside those parenthesis }\\ 2 \{ \underbrace{8^2} - 7 [- 8] (- 1)\} & \text{Exponents next}\\ 2 \{64 \underbrace{- 7 [- 8]} (- 1)\} & \text{Multiply left to right, sign with the number}\\ 2 \{64 + \underbrace{56 (- 1)} \} & \text{Finish multiplying}\\ 2 \{ \underbrace{64 - 56} \} & \text{Subtract inside parenthesis}\\ \underbrace{2 \{8\}} & \text{Multiply}\\ 16 & \text{Result} \end{array}\nonumber\]
Example \(\PageIndex{3}\) illustrates that it can take several steps to complete a problem. The key to successfully simplifying when applying order of operations is to take the time to show your work and do one step at a time. This will reduce the chance of making a mistake along the way.
Grouping symbols– fraction bar
There are several types of grouping symbols that can be used besides parenthesis. One type is a fraction bar. If we have a fraction, the entire numerator and the entire denominator must be evaluated prior to reducing the fraction. In these cases, we can simplify the numerator and denominator simultaneously.
Simplify the expression completely: \(\dfrac{2^4 - (- 8) \cdot 3}{15 \div 5 - 1}\)
Solution
\[\begin{array}{rl} \dfrac{\underbrace{2^4} - (- 8) \cdot 3}{\underbrace{15 \div 5} - 1} & \text{Exponent } \text{in } \text{the } \text{numerator, } \text{divide } \text{in } \text{denominator} \\ & & \\ \dfrac{16 - \underbrace{(- 8) \cdot 3}}{\underbrace{3 - 1}} & \text{Multiply } \text{in } \text{the } \text{numerator, } \text{subtract } \text{in } \text{denominator} \\ & & \\ \dfrac{\underbrace{16 - (- 24)}}{2} & \text{Add } \text{the } \text{opposite } \text{to } \text{simplify } \text{numerator} \\ & & \\ \dfrac{40}{2} & \text{Reduce} \\ & & \\ 20 & \text{Result} \end{array}\nonumber\]
Grouping symbols– absolute value \(|\quad |\)
Another type of grouping symbol that also has an operation is absolute value. When there is absolute value, we evaluate the expression inside the absolute value first, just as if it were a normal parenthesis. Then take the absolute value.
Recall. The absolute value of a number is the distance from zero; hence, the absolute value of a number is always positive because distance is always positive. E.g., there’s no such thing as running \(-3\) miles, only 3 miles.
Simplify the expression completely: \(1 + 3|-4^2 - (- 8) | + 2 |3 + (- 5)^2|\)
Solution
\[\begin{array}{rl} 1 + 3| - \underbrace{4^2} - (- 8) | + 2 |3 + \underbrace{(- 5)^2} | & \text{Evaluate absolute values first, exponents}\\ 1 + 3 | \underbrace{- 16 - (- 8)} | + 2 | \underbrace{3 + 25} | & \text{Add inside absolute values}\\ 1 + 3 \underbrace{| - 8|} + 2 \underbrace{|28|} & \text{Evaluate absolute values}\\ 1 + \underbrace{3 (8)} + 2 (28) & \text{Multiply left to right}\\ 1 + 24 + \underbrace{2 (28)} & \text{Finish multiplying}\\ \underbrace{1 + 24} + 56 & \text{Add left to right}\\ \underbrace{25 + 56} & \text{Add}\\ 81 & \text{Our Solution} \end{array}\nonumber\]
Example \(\PageIndex{5}\) illustrates an important point about exponents. Exponents are solely attached to its base number. This means when we see \(- 4^2\), only the 4 is squared, giving us \(- (4^2)\) or \(-16\), but when the negative is in parentheses, such as \((- 5)^2\) the negative is part of the base number and is also squared, giving us a positive solution, 25. Be sure to know the difference to minimize future errors.
Order of Operations Homework
Simplify the expressions completely.
\(-6\cdot 4(-1)\)
\(3+(8)\div |4|\)
\(8\div 4\cdot 2\)
\([−9 − (2 − 5)] \div (−6)\)
\(-6+(-3-3)^2\div |3|\)
\(4-2|3^2-16|\)
\([−1 − (−5)]|3 + 2|\)
\(\frac{2+4|7+2^2|}{4\cdot 2+5\cdot 3}\)
\([6\cdot 2+2-(-6)]\left(-5+\left|\frac{-18}{6}\right|\right)\)
\(\frac{-13-2}{2-(-1)^3+(-6)-[-1-(-3)]}\)
\(6\cdot\frac{-8-4+(-4)-[-4-(-3)]}{(4^2+3^2)\div 5}\)
\(\frac{2^3+4}{-18-6+(-4)-[-5(-1)(-5)]}\)
\(\frac{5+3^2-24\div 6\cdot 2}{[5+3(2^2-5)]+|2^2-5|^2}\)
\((-6\div 6)^3\)
\(5(-5+6)\cdot 6^2\)
\(7-5+6\)
\((-2\cdot 2^3\cdot 2)\div (-4)\)
\((-7-5)\div [-2-2-(-6)]\)
\(\frac{-10-6}{(-2)^2}-5\)
\(−3 − \{3 − [−3(2 + 4) − (−2)]\}\)
\(-4-[2+4(-6)-4-|2^2-5\cdot 2|]\)
\(2\cdot (-3)+3-6[-2-(-1-3)]\)
\(\frac{-5^2+(-5)^2}{|4^2-2^5|-2\cdot 3}\)
\(\frac{-9\cdot 2-(3-6)}{1-(-2+1)-(-3)}\)
\(\frac{13+(-3)^2+4(-3)+1-[-10-(-6)]}{\{[4+5]\div [4^2-3^2(4-3)-8]\}+12}\)