Skip to main content
Mathematics LibreTexts

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}}\)

    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.

    Order of Operations

    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\]

    Note

    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.

    Note

    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}\).

    Example \(\PageIndex{1}\)

    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\]

    Example \(\PageIndex{2}\)

    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\]

    Note

    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.

    Example \(\PageIndex{3}\)

    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.

    Example \(\PageIndex{4}\)

    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.

    Example \(\PageIndex{5}\)

    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\]

    Note

    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.

    Exercise \(\PageIndex{1}\)

    \(-6\cdot 4(-1)\)

    Exercise \(\PageIndex{2}\)

    \(3+(8)\div |4|\)

    Exercise \(\PageIndex{3}\)

    \(8\div 4\cdot 2\)

    Exercise \(\PageIndex{4}\)

    \([−9 − (2 − 5)] \div (−6)\)

    Exercise \(\PageIndex{5}\)

    \(-6+(-3-3)^2\div |3|\)

    Exercise \(\PageIndex{6}\)

    \(4-2|3^2-16|\)

    Exercise \(\PageIndex{7}\)

    \([−1 − (−5)]|3 + 2|\)

    Exercise \(\PageIndex{8}\)

    \(\frac{2+4|7+2^2|}{4\cdot 2+5\cdot 3}\)

    Exercise \(\PageIndex{9}\)

    \([6\cdot 2+2-(-6)]\left(-5+\left|\frac{-18}{6}\right|\right)\)

    Exercise \(\PageIndex{10}\)

    \(\frac{-13-2}{2-(-1)^3+(-6)-[-1-(-3)]}\)

    Exercise \(\PageIndex{11}\)

    \(6\cdot\frac{-8-4+(-4)-[-4-(-3)]}{(4^2+3^2)\div 5}\)

    Exercise \(\PageIndex{12}\)

    \(\frac{2^3+4}{-18-6+(-4)-[-5(-1)(-5)]}\)

    Exercise \(\PageIndex{13}\)

    \(\frac{5+3^2-24\div 6\cdot 2}{[5+3(2^2-5)]+|2^2-5|^2}\)

    Exercise \(\PageIndex{14}\)

    \((-6\div 6)^3\)

    Exercise \(\PageIndex{15}\)

    \(5(-5+6)\cdot 6^2\)

    Exercise \(\PageIndex{16}\)

    \(7-5+6\)

    Exercise \(\PageIndex{17}\)

    \((-2\cdot 2^3\cdot 2)\div (-4)\)

    Exercise \(\PageIndex{18}\)

    \((-7-5)\div [-2-2-(-6)]\)

    Exercise \(\PageIndex{19}\)

    \(\frac{-10-6}{(-2)^2}-5\)

    Exercise \(\PageIndex{20}\)

    \(−3 − \{3 − [−3(2 + 4) − (−2)]\}\)

    Exercise \(\PageIndex{21}\)

    \(-4-[2+4(-6)-4-|2^2-5\cdot 2|]\)

    Exercise \(\PageIndex{22}\)

    \(2\cdot (-3)+3-6[-2-(-1-3)]\)

    Exercise \(\PageIndex{23}\)

    \(\frac{-5^2+(-5)^2}{|4^2-2^5|-2\cdot 3}\)

    Exercise \(\PageIndex{24}\)

    \(\frac{-9\cdot 2-(3-6)}{1-(-2+1)-(-3)}\)

    Exercise \(\PageIndex{25}\)

    \(\frac{13+(-3)^2+4(-3)+1-[-10-(-6)]}{\{[4+5]\div [4^2-3^2(4-3)-8]\}+12}\)


    This page titled 0.3: Order of Operations is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Darlene Diaz (ASCCC Open Educational Resources Initiative) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.