Skip to main content
Mathematics LibreTexts

1.4: Order of Operations

  • Page ID
    137900
  • \( \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}\)

      

    The order in which we evaluate expressions matters. Take for example, the expression 4 + 3 · 2.

    If we do the addition first, then

    4 + 3 · 2 = 7 · 2

    = 14.

    On the other hand, if we do the multiplication first, then

    4 + 3 · 2 = 4 + 6

    = 10.

    So, what are we to do? If this expression had grouping symbols, we would start there.

    Grouping Symbols

    Parentheses, brackets, or curly braces can be used to group parts of an expression. Each of the following are equivalent:

    (4 + 3) · 2 or [4 + 3] · 2 or {4+3} · 2

    In each case, the rule is “evaluate the expression inside the grouping symbols first.” If grouping symbols are nested, evaluate the expression in the innermost pair of grouping symbols first.

    Thus, for example,

    (4 + 3) · 2 = 7 · 2

    = 14.

    Note how the expression contained in the parentheses was evaluated first. Another way to avoid ambiguities in evaluating expressions is to establish an order in which operations should be performed. The following guidelines should always be strictly enforced when evaluating expressions.

    Rules Guiding Order of Operations

    When evaluating expressions, proceed in the following order.

    1. Evaluate expressions contained in grouping symbols first. If grouping symbols are nested, evaluate the expression in the innermost pair of grouping symbols first.
    2. Evaluate all exponents that appear in the expression.
    3. Perform all multiplications and divisions in the order that they appear in the expression, moving left to right.
    4. Perform all additions and subtractions in the order that they appear in the expression, moving left to right.

    Example 1

    Evaluate 4 + 3 · 2.

    Solution

    Because of the established Rules Guiding Order of Operations, this expression is no longer ambiguous. There are no grouping symbols or exponents, so we immediately go to rule three, evaluate all multiplications and divisions in the order that they appear, moving left to right. After that we invoke rule four, performing all additions and subtractions in the order that they appear, moving left to right.

    \[ \begin{aligned} 4+3 \dot\ 2= 4 + 6 \\ = 10 \end{aligned}\nonumber \]

    Thus, 4 + 3 · 2 = 10.

    Exercise

    Simplify: 8 + 2 · 5.

    Answer

    18

    Example 2

    Evaluate 18 − 2 + 3.

    Solution

    Follow the Rules Guiding Order of Operations. Addition has no precedence over subtraction, nor does subtraction have precedence over addition. We are to perform additions and subtractions as they occur, moving left to right.

    \[ \begin{aligned} 18 − 2 + 3 = 16 + 3 & \textcolor{red}{ \text{ Subtract: 18 − 2 = 16.}} \\ = 19 & \textcolor{red}{ \text{ Add: 16 + 3 = 19. }} \end{aligned}\nonumber \]

    Thus, 18 − 2 + 3 = 19.

    Exercise

    Simplify: 17 − 8 + 2.

    Answer

    11

    Example 3

    Evaluate 54 ÷ 9 · 2.

    Solution

    Follow the Rules Guiding Order of Operations. Division has no precedence over multiplication, nor does multiplication have precedence over division. We are to perform divisions and multiplications as they occur, moving left to right.

    \[ \begin{aligned} 54 \div 9 \cdot 2=6 \dot\ 2 & \textcolor{red}{ \text{ Divide: 54 } \div \text{ 9 = 6. }} \\ = 12 & \textcolor{red}{ \text{ Multiply: 6 } \cdot \text{ 2 = 12. }} \end{aligned}\nonumber \]

    Thus, 54 ÷ 9 · 2 = 12.

    Exercise

    Simplify: 72 ÷ 9 · 2.

    Answer

    16

    Example 4

    Evaluate 2 · 32 − 12.

    Solution

    Follow the Rules Guiding Order of Operations, exponents first, then multiplication, then subtraction.

    \[ \begin{aligned} 2 \cdot 3^2 - 12 = 2 \dot\ 9 - 12 & \textcolor{red}{ \text{ Evaluate the exponent: 3^2 = 9. }} \\ = 18 - 12 & \textcolor{red}{ \text{ Perform the multiplication: } 2 \cdot 9 = 18. } \\ = 6 & \textcolor{red}{ \text{ Perform the subtraction: } 18 - 12 = 6.} \end{aligned}\nonumber \]

    Thus, 2 · 32 − 12 = 6.

    Exercise

    Simplify: 14 + 3 · 42

    Answer

    62

    Example 5

    Evaluate 12 + 2(3 + 2 · 5)2.

    Solution

    Follow the Rules Guiding Order of Operations, evaluate the expression inside the parentheses first, then exponents, then multiplication, then addition.

    \[ \begin{aligned} 12 + 2(3 + 5 \cdot 5 )^2 = 12 + 2(3 + 10)^2 ~ & \textcolor{red}{ \text{ Multiply inside parentheses: 2 } \cdot 5 = 10.} \\ = 12 + 2(13)^2 ~ & \textcolor{red}{ \text{ Add inside parentheses: } 3 + 10 = 13.} \\ = 12 + 2(169) ~ & \textcolor{red}{ \text{ Exponents are next: } (13)^2 = 169.} \\ = 12 + 338 ~ & \textcolor{red}{ \text{ Multiplication is next: } 2(169) = 338.} \\ = 350 ~ & \textcolor{red}{ \text{ Time to add: } 12 + 338 = 350.} \end{aligned}\nonumber \]

    Thus, 12 + 2(3 + 2 · 5) 2 = 350.

    Exercise

    Simplify: 3(2 + 3 · 4)2 − 11.

    Answer

    577

    Example 6

    Evaluate 2{2 + 2[2 + 2]}.

    Solution

    When grouping symbols are nested, evaluate the expression between the pair of innermost grouping symbols first.

    \[ \begin{aligned} 2( 2 + 2[2 + 2]) = 2(2 + 2[4]) ~ & \textcolor{red}{ \text{ Innermost grouping first: } 2 + 2 = 4.} \\ = 2(2+8) ~ & \textcolor{red}{ \text{ Multiply next: } 2[4] = 8.} \\ = 2(10) ~ & \textcolor{red}{ \text{ Add inside braces: } 2 + 8 = 10.} \\ = 20 ~ & \textcolor{red}{ \text{ Multiply: } 2(10) = 20} \end{aligned}\nonumber \]

    Thus, 2(2 + 2[2 + 2]) = 20.

    Exercise

    Simplify: 2{3 + 2[3 + 2]}.

    Answer

    26

    Fraction Bars

    Consider the expression

    \[ \frac{6^{2}+8^{2}}{(2+3)^{2}}\nonumber \]

    Because a fraction bar means division, the above expression is equivalent to

    \[\left(6^{2}+8^{2}\right) \div(2+3)^{2}\nonumber \]

    The position of the grouping symbols signals how we should proceed. We should simplify the numerator, then the denominator, then divide.

    Fractional Expressions

    If a fractional expression is present, evaluate the numerator and denominator first, then divide.

    Example 7

    Evaluate the expression

    \[ \frac{6^{2}+8^{2}}{(2+3)^{2}}.\nonumber \]

    Solution

    Simplify the numerator and denominator first, then divide.

    \[ \begin{aligned} \frac{6^{2}+8^{2}}{(2+3)^{2}}=\frac{6^{2}+8^{2}}{(5)^{2}} ~ & \textcolor{red}{ \text{ Parentheses in denominator first: } 2 + 3 = 5} \\ = \frac{36+64}{25} ~ & \textcolor{red}{ \text{Exponents are next: } 6^2 = 36,~ 8^2 = 64,~ 5^2 = 25.} \\ = \frac{100}{25} ~ & \textcolor{red}{ \text{ Add in numerator: } 36 + 64 = 100} \\ = 4 ~ & \textcolor{red}{ \text{ Divide: } 100 \div 25 = 4.} \end{aligned}\nonumber \]

    Thus, \(\frac{6^{2}+8^{2}}{(2+3)^{2}}=4\).

    Exercise

    Simplify: \(\frac{12+3 \cdot 2}{6}\)

    Answer

    3

     

     

     

    Exercises

    In Exercises 1-12, simplify the given expression.

    7. 6 · 5+4 · 3

    12. 24 − 2 · 5

    18. 27 ÷ 3 · 3

    25. 22 − 10 + 7

    27. 20 · 10 + 15 ÷ 5 − 7 · 6

    31. 7 · [8 − 5] − 10

    39. 9+6 · (12 + 3)

    48. 9 − 8[6 − (2 + 3)]

    53. 3{8[6 + 5] − 8[7 + 3]}

    57. (5 − 2)2

    65. 12 · 52 + 8 · 9+4

    67. 9 − 3 · 2 + 12 · 102

    73. 19 + 3[12 − (23 + 1)]

    84. \( \frac{19-(4 \cdot 3-2)}{6 \cdot 3-9}\)

     

     

     

    Answers

    7. 42

    12. 14

    18. 27

    25. 19

    27. 161

    31. 11

    39. 99

    48. 1

    53. 24

    57. 9

    65. 376

    67. 1203

    73. 28

    84. 1

     


    1Later, we’ll see that this property applies to all numbers, not just whole numbers


    This page titled 1.4: Order of Operations is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by David Arnold.