Skip to main content
Mathematics LibreTexts

9.4.1: Order of Operations

  • Page ID
    64044
  • \( \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}\)
    Learning Objectives
    • Use the order of operations to simplify expressions.
    • Simplify expressions containing absolute values.

    Introduction

    People need a common set of rules for performing basic calculations. What does \(\ 3+5 \cdot 2\) equal? Is it 16 or 13? Your answer depends on how you understand the order of operations — a set of rules that tell you the order in which addition, subtraction, multiplication, and division are performed in any calculation.

    Mathematicians have developed a standard order of operations that tells you which calculations to make first in an expression with more than one operation. Without a standard procedure for making calculations, two people could get two different answers to the same problem.

    The Four Basic Operations

    The building blocks of the order of operations are the arithmetic operations: addition, subtraction, multiplication, and division. The order of operations states:

    • multiply or divide first, going from left to right
    • then add or subtract in order from left to right

    What is the correct answer for the expression \(\ 3+5 \cdot 2\)? Use the order of operations listed above.

    Multiply first. \(\ 3+5 \cdot 2=3+10\)

    Then add. \(\ 3+10=13\)

    This order of operations is true for all real numbers.

    Example

    Simplify \(\ 7-5+3 \cdot 8\).

    Solution

    \(\ 7-5+3 \cdot 8\) According to the order of operations, multiplication comes before addition and subtraction. Multiply \(\ 3 \cdot 8\).
    \(\ 7-5+24\) Now, add and subtract from left to right. \(\ 7-5\) comes first.
    \(\ 2+24=26\) Finally, add \(\ 2+24\).

    \(\ 7-5+3 \cdot 8=26\)

    When you are applying the order of operations to expressions that contain fractions, decimals, and negative numbers, you will need to recall how to do these computations as well.

    Example

    Simplify: \(\ 3 \cdot \frac{1}{3}-8 \div \frac{1}{4}\)

    Solution

    \(\ 3 \cdot \frac{1}{3}-8 \div \frac{1}{4}\) According to the order of operations, multiplication comes before addition and subtraction. Multiply \(\ 3 \cdot \frac{1}{3}\) first.
    \(\ 1-8 \div \frac{1}{4}\) Now, divide \(\ 8 \div \frac{1}{4}\).
    \(\ 8 \div \frac{1}{4}=\frac{8}{1} \cdot \frac{4}{1}=32\)
    \(\ 1-32=-31\) Subtract.

    \(\ 3 \cdot \frac{1}{3}-8 \div \frac{1}{4}=-31\)

    Exponents

    When you are evaluating expressions, you will sometimes see exponents used to represent repeated multiplication. Recall that an expression such as \(\ 7^{2}\) is exponential notation for \(\ 7 \cdot 7\). (Exponential notation has two parts: the base and the exponent or the power. In \(\ 7^{2}\), 7 is the base and 2 is the exponent; the exponent determines how many times the base is multiplied by itself.)

    Exponents are a way to represent repeated multiplication; the order of operations places it before any other multiplication, division, subtraction, and addition is performed.

    Example

    Simplify: \(\ 3^{2} \cdot 2^{3}\)

    Solution

    \(\ 3^{2} \cdot 2^{3}\) This problem has exponents and multiplication in it. According to the order of operations, simplifying \(\ 3^{2}\) and \(\ 2^{3}\) comes before multiplication.
    \(\ 9 \cdot 2^{3}\) \(\ 3^{2}\) is \(\ 3 \cdot 3\), which equals \(\ 9\).
    \(\ 9 \cdot 8\) \(\ 2^{3}\) is \(\ 2 \cdot 2 \cdot 2\), which equals \(\ 8\).
    \(\ 9 \cdot 8=72\) Multiply.

    \(\ 3^{2} \cdot 2^{3}=72\)

    Example

    Simplify: \(\ \left(\frac{1}{2}\right)^{2}+\left(\frac{1}{4}\right)^{3} \cdot 32\)

    Solution

    \(\ \left(\frac{1}{2}\right)^{2}+\left(\frac{1}{4}\right)^{3} \cdot 32\) This problem has exponents, multiplication, and addition in it. According to the order of operations, simplify the terms with the exponents first, then multiply, then add.
    \(\ \frac{1}{4}+\left(\frac{1}{4}\right)^{3} \cdot 32\) Evaluate: \(\ \left(\frac{1}{2}\right)^{2}=\frac{1}{2} \cdot \frac{1}{2}=\frac{1}{4}\)
    \(\ \frac{1}{4}+\frac{1}{64} \cdot 32\) Evaluate: \(\ \left(\frac{1}{4}\right)^{3}=\frac{1}{4} \cdot \frac{1}{4} \cdot \frac{1}{4}=\frac{1}{64}\)
    \(\ \frac{1}{4}+\frac{32}{64}\) Multiply.
    \(\ \frac{1}{4}+\frac{1}{2}=\frac{3}{4}\) Simplify. \(\ \frac{32 \div 32}{64 \div 32}=\frac{1}{2}\), so you can add \(\ \frac{1}{4}+\frac{1}{2}\).

    \(\ \left(\frac{1}{2}\right)^{2}+\left(\frac{1}{4}\right)^{3} \cdot 32=\frac{3}{4}\)

    Exercise

    Simplify: \(\ 100-5^{2} \cdot 4\)

    1. -300
    2. 0
    3. 100
    4. 300
    Answer
    1. Incorrect. You may have found \(\ 4 \cdot 5=20\), squared 20, and then subtracted 400 from 100. The order of operations states that you should simplify the term with the exponent first, then multiply, then subtract. \(\ 5^{2}=25\), and \(\ 25 \cdot 4=100\), and \(\ 100-100=0\). The correct answer is 0.
    2. Correct. To simplify this expression, simplify the term with the exponent first, then multiply, then subtract. \(\ 5^{2}=25\), and \(\ 25 \cdot 4=100\), and \(\ 100-100=0\).
    3. Incorrect. The order of operations states that you should simplify the term with the exponent first, then multiply, then subtract. \(\ 5^{2}=25\), and \(\ 25 \cdot 4=100\), and \(\ 100-100=0\). The correct answer is 0.
    4. Incorrect. You may have found that \(\ 5^{2}=25\), subtracted that from 100, and multiplied by 4. The order of operations states that you should simplify the term with the exponent first, then multiply, then subtract. \(\ 5^{2}=25\), and \(\ 25 \cdot 4=100\), and \(\ 100-100=0\). The correct answer is 0.

    Grouping Symbols

    The final piece that you need to consider in the order of operations is grouping symbols. These include parentheses \(\ (\quad)\), brackets \(\ [\quad]\), braces \(\ \{\quad\}\), and even fraction bars. These symbols are often used to help organize mathematical expressions (you will see them a lot in algebra).

    Grouping symbols are used to clarify which operations to do first, especially if a specific order is desired. If there is an expression to be simplified within the grouping symbols, follow the order of operations.

    The Order of Operations
    • Perform all operations within grouping symbols first. Grouping symbols include parentheses \(\ (\quad)\), brackets \(\ [\quad]\), braces \(\ \{\quad\}\), and fraction bars.
    • Evaluate exponents or square roots.
    • Multiply or divide, from left to right.
    • Add or subtract, from left to right.

    When there are grouping symbols within grouping symbols, calculate from the inside to the outside. That is, begin simplifying within the innermost grouping symbols first.

    Remember that parentheses can also be used to show multiplication. In the example that follows, both uses of parentheses—as a way to represent a group, as well as a way to express multiplication—are shown.

    Example

    Simplify: \(\ (3+4)^{2}+(8)(4)\)

    Solution

    \(\ (3+4)^{2}+(8)(4)\) This problem has parentheses, exponents, multiplication, and addition in it. The first set of parentheses is a grouping symbol. The second set indicates multiplication.
    \(\ (3+4)^{2}+(8)(4)\) Grouping symbols are handled first. Add numbers in parentheses.
    \(\ 7^{2}+(8)(4)\) Simplify \(\ 7^{2}\).
    \(\ 49+\bf(8)(4)\) Perform multiplication.
    \(\ 49+32=81\) Perform addition.

    \(\ (3+4)^{2}+(8)(4)=81\)

    Example

    Simplify: \(\ (1.5+3.5)-2(0.5 \cdot 6)^{2}\)

    Solution

    \(\ (1.5+3.5)-2(0.5 \cdot 6)^{2}\) This problem has parentheses, exponents, multiplication, subtraction, and addition in it.
    \(\ 5-2(0.5 \cdot 6)^{2}\)

    Grouping symbols are handled first. Add numbers in the first set of parentheses.

    Multiply numbers in the second set of parentheses.

    \(\ 5-2(3)^{2}\) Evaluate exponents.
    \(\ 5-2 \cdot 9\) Multiply.
    \(\ 5-18=-13\) Subtract.

    \(\ (1.5+3.5)-2(0.5 \cdot 6)^{2}=-13\)

    Example

    Simplify: \(\ \frac{5-[3+(2 \cdot(-6))]}{3^{2}+2}\)

    Solution

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

    This problem has brackets, parentheses, fractions, exponents, multiplication, subtraction, and addition in it.

    Grouping symbols are handled first. The parentheses around the -6 aren’t a grouping symbol, they are simply making it clear that the negative sign belongs to the 6. Start with the innermost set of parentheses that are a grouping symbol, here it is in the numerator of the fraction, (\(\ 2 \cdot-6\)), and begin working out. (The fraction line acts as a type of grouping symbol, too; you simplify the numerator and denominator independently, and then divide the numerator by the denominator at the end.)

    \(\ \frac{5-[3+(-12)]}{3^{2}+2}\) Add the values in the brackets.
    \(\ \frac{5-[-9]}{3^{2}+2}\) Subtract \(\ 5-[-9]=5+9=14\).
    \(\ \frac{14}{3^{2}+2}\) The top of the fraction is all set, but the bottom (denominator) has remained untouched. Apply the order of operations to that as well. Begin by evaluating \(\ 3^{2}=9\).

    \(\ \frac{14}{9+2}\)

    \(\ \frac{14}{11}\)

    Now add. \(\ 9+2=11\).

    \(\ \frac{5-[3+(2 \cdot(-6))]}{3^{2}+2}=\frac{14}{11}\)

    Exercise

    Simplify \(\ \left[\frac{3^{3}+3}{(-2)(-3)}\right]^{2}+1\).

    1. \(\ 25\)
    2. \(\ 26\)
    3. \(\ 151\)
    4. \(\ \frac{11}{6}\)
    Answer
    1. Incorrect. You may have forgotten to add the 1! Simplify the expressions within the grouping symbols first (5), then square that expression (25), then add 1. The correct answer is 26.
    2. Correct. The entire quantity within the brackets is \(\ 5 \cdot 5^{2}\) is 25, and \(\ 25+1=26\).
    3. Incorrect. You may have squared the numerator of the fraction without simplifying the entire fraction first! Simplify the entire expression within the grouping symbols first (5), then square that expression (25), then add 1. The correct answer is 26.
    4. Incorrect. You may have squared the denominator of the fraction without simplifying the entire fraction first! Simplify the entire expression within the grouping symbols first (5), then square that expression (25), then add 1. The correct answer is 26.

    Remembering the Order of Operations

    The Order of Operations
    • Perform all operations within grouping symbols first. Grouping symbols include parentheses \(\ (\quad)\), brackets \(\ [\quad]\), braces \(\ \{\quad\}\), and fraction bars.
    • Evaluate exponents or square roots.
    • Multiply or divide, from left to right.
    • Add or subtract, from left to right.

    The order of operations is important to know, but it is sometimes hard to remember. Some people use a saying to help them remember the order of operations. This saying is “Please Excuse My Dear Aunt Sally,” or PEMDAS for short. The first letter of each word begins with the same letter of an arithmetic operation.

    The P in Please stands for Parentheses (and other grouping symbols).

    The E in Excuse stands for Exponents.

    The M and D in My Dear stand for Multiplication and Division (from left to right).

    The A and S in Aunt Sally stand for Addition and Subtraction (from left to right).

    Note: Even though multiplication comes before division in the saying, division could be performed first. Whether multiplication or division is performed first is determined by which comes first when reading from left to right. The same is true of addition and subtraction. Don’t let the saying confuse you about this!

    Absolute Value Expressions

    Absolute value expressions are one final method of grouping that you may see. Recall that the absolute value of a quantity is always positive or 0.

    When you see an absolute value expression included within a larger expression, follow the regular order of operations and evaluate the expression within the absolute value sign. Then take the absolute value of that expression. The example below shows how this is done.

    Example

    Simplify: \(\ \frac{3+|2-6|}{2|3 \cdot 1.5|-(-3)}\)

    Solution

    \(\ \frac{3+|2-6|}{2|3 \cdot 1.5|-(-3)}\)

    This problem has absolute values, decimals, multiplication, subtraction, and addition in it.

    Grouping symbols, including absolute value, are handled first. Simplify the numerator, then the denominator. Evaluate \(\ |2-6|\).

    \(\ \frac{3+|-4|}{2|3 \cdot 1.5|-(-3)}\) Take the absolute value of \(\ |-4|\).
    \(\ \frac{3+4}{2|3 \cdot 1.5|-(-3)}\) Add the numbers in the numerator.
    \(\ \frac{7}{2|3 \cdot 1.5|-(-3)}\) Now that the numerator is simplified, turn to the denominator. Evaluate the absolute value expression first.

    \(\ \frac{7}{2|4.5|-(-3)}\)

    \(\ \frac{7}{2 \cdot 4.5-(-3)}\)

    The expression "\(\ 2|4.5|\)" reads "2 times the absolute value of 4.5." Multiply 2 times 4.5.

    \(\ \frac{7}{9-(-3)}\)

    \(\ \frac{7}{12}\)

    Subtract.

    \(\ \frac{3+|2-6|}{2|3 \cdot 1.5|-(-3)}=\frac{7}{12}\)

    Exercise

    Simplify: \(\ (5|3-4|)^{3}\).

    1. -125
    2. 1331
    3. -49
    4. 125
    Answer
    1. Incorrect. You may have forgotten to take the absolute value of the expression \(\ |3-4|\). Remember that the absolute value will be either 0 or a positive number. \(\ |3-4|=|-1|=1\) and 5 times 1 is 5. The correct answer is 125.
    2. Incorrect. You may have ignored the absolute value expression and found \(\ 11^{3}\). Evaluate \(\ |3-4|\), multiply that by 5, and then cube that number: \(\ |3-4|=|-1|=1\) and 5 times 1 is 5; \(\ 5^{3}=125\). The correct answer is 125.
    3. Incorrect. You may have subtracted \(\ 4^{3}\) from \(\ 5(3)\). Evaluate \(\ |3-4|\), multiply that by 5, and then cube that number: \(\ |3-4|=|-1|=1\) and 5 times 1 is 5; \(\ 5^{3}=125\) The correct answer is 125.
    4. Correct. \(\ |3-4|=|-1|=1\) and 5 times 1 is 5. 5 cubed is 125.

    Summary

    The order of operations gives us a standard, consistent method to use when simplifying strings of numbers and algebraic expressions. Without the order of operations, different people could come up with different answers to the same computation problem. Some people remember the order of operations by using the phrase “Please Excuse My Dear Aunt Sally” or, more simply, PEMDAS.


    This page titled 9.4.1: Order of Operations is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by The NROC Project via source content that was edited to the style and standards of the LibreTexts platform.