Skip to main content
Mathematics LibreTexts

2.5: Order of Operations

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

    For convenience, we repeat the “Rules Guiding Order of Operations” first introduced in Section 1.5.

    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.

    Let’s look at a number of examples that require the use of these rules.

    Example 1

    Simplify: (a) (−3)2 and (b) −32

    Solution

    Recall that for any integer a, we have (−1)a = −a. Because negating is equivalent to multiplying by −1, the “Rules Guiding Order of Operations” require that we address grouping symbols and exponents before negation.

    a) Because of the grouping symbols, we negate first, then square. That is,

    \[ \begin{aligned} (−3)^2 = (−3)(−3) \\ & = 9. \end{aligned}\nonumber \]

    b) There are no grouping symbols in this example. Thus, we must square first, then negate. That is,

    \[ \begin{aligned} −3^2 = −(3 \cdot 3) \\ = −9. \end{aligned}\nonumber \]

    Exercise

    Simplify: −22.

    Answer

    −4

    Example 2

    Simplify: −2 − 3(5 − 7).

    Solution

    Grouping symbols first, then multiplication, then subtraction.

    \[ \begin{aligned} -2-3(5-7)=-2-3(-2) ~ & \textcolor{red}{ \text{ Perform subtraction within parentheses.}} \\ =2 -2-(-6) ~ & \textcolor{red}{ \text{ Multiply: } 3(-2)=-6.} \\ = -2+6 ~ & \textcolor{red}{ \text{ Add the opposite.}} \\ =4 \end{aligned}\nonumber \]

    Exercise

    Simplify: −3 − 2(6 − 8).

    Answer

    1

    Example 3

    Simplify: −2(2 − 4)2 − 3(3 − 5)3.

    Solution

    Grouping symbols first, then multiplication, and subtraction, in that order.

    \[ \begin{aligned} -2(2-4)^2 -3(3-5)^3 = -2(-2)^2 -3(-2)^3 ~ & \textcolor{red}{ \text{ Perform subtraction within parentheses first.} \\ =2 (4) -3(-8) ~ & \textcolor{red}{ \text{ Exponents are next.}} \\ =-8-(-24) ~ & \textcolor{red}{ \text{ Multiplications are next.}} \\ =-8+24 ~ & \textcolor{red}{ \text{ Add the opposite.}} \\ =16 \end{aligned}\nonumber \]

    Exercise

    Simplify: −2(5 − 6)3 − 3(5 − 7)2

    Answer

    -10

    Example 4

    Simplify: −24 ÷ 8(−3).

    Solution

    Division has no preference over multiplication, or vice versa. Divisions and multiplications must be performed in the order that they occur, moving left to right.

    \[ \begin{aligned} -24 \div 8(-3) = -3(-3) ~ & \textcolor{red}{ \text{ Division first: } -24 \div 8 = -3.} \\ =9 \end{aligned}\nonumber \]

    Note that if you multiply first, which would be incorrect, you would get a completely different answer.

    Exercise

    Simplify: −48 ÷ 6(−2).

    Answer

    16

    Example 5

    Simplify: (−2)(−3)(−2)3.

    Solution

    Exponents first, then multiplication in the order that it occurs, moving left to right.

    \[ \begin{aligned} (-2)(-3)(-2)^3 = (-2)(-3)(-8) ~ & \textcolor{red}{ \text{ Exponent first: } (-2)^3 = -8.} \\ =6(-8) ~ & \textcolor{red}{ \text{ Multiply from left to right: } (-2)(-3) = 6.} \\ =-48 \end{aligned}\nonumber \]

    You try it!

    Simplify: (−4)(−2)2(−1)3.

    Answer

    16

    Evaluating Fractions

    If a fraction bar is present, evaluate the numerator and denominator separately according to the “Rules Guiding Order of Operations,” then perform the division in the final step.

    Example 6

    Simplify:

    \[ \frac{-5-5(2-4)^3}{-22 - 3(-5)}\nonumber \]

    Solution

    Evaluate numerator and denominator separately, then divide.

    \[ \begin{aligned} \frac{-5-5(2-4)^3}{-22-3(-5)} = \frac{-5-5(-2)^3}{-22-(-15)} ~ & \begin{array}{l} \textcolor{red}{ \text{ Numerator: parentheses first.}} \\ \textcolor{red}{ \text{ Denominator: multiply } 3(-5)=-15.} \end{array} \\ = \frac{-5-5(-8)}{-22+15} ~ & \begin{array}{l} \textcolor{red}{ \text{ Numerator: exponent } (-2)^3 = -8.} \\ \textcolor{red}{ \text{ Denominator: add the opposite.}} \end{array} \\ = \frac{-5-(-40)}{-7} & \begin{array}{l} \textcolor{red}{ \text{ Numerator: multiply } 5(-8) = -40.} \\ \textcolor{red}{ \text{ Denominator: add } -22 + 15 = -7.} \end{array} \\ = \frac{-5+40}{-7} ~ & \textcolor{red}{ \text{ Numerator: add the opposite.}} \\ = \frac{35}{-7} ~ & \textcolor{red}{ \text{ Numerator: } -5 + 40 = 35.} \\ = -5 ~ & \textcolor{red}{ \text{ Divide: } 35/-7 = -5.} \end{aligned}\nonumber \]

    Exercise

    Simplify:

    \[ \frac{6-2(-6)}{-2-(-2)^2}\nonumber \]

    Answer

    -3

    Absolute Value

    Absolute value calculates the magnitude of the vector associated with an integer, which is equal to the distance between the number and the origin (zero) on the number line. Thus, for example, |4| = 4 and | − 5| = 5.

    But absolute value bars also act as grouping symbols, and according to the “Rules Guiding Order of Operations,” you should evaluate the expression inside a pair of grouping symbols first.

    Example 7

    Simplify: (a) −(−3) and (b) −| − 3|.

    Solution

    There is a huge difference between simple grouping symbols and absolute value.

    a) This is a case of −(−a) = a. Thus, −(−3) = 3.

    b) This case is much different. The absolute value of −3 is 3, and then the negative of that is −3. In symbols,

    −| − 3| = −3

    Exercise

    Simplify: −|−8|.

    Answer

    −8

    Example 8

    Simplify: −3 − 2|5 − 7|.

    Solution

    Evaluate the expression inside the absolute value bars first. Then multiply, then subtract.

    \[ \begin{aligned} -3-2|5-7|=-3-2|-2| ~ & \end{aligned}\nonumber \]

    Exercise

    Simplify: −2 − 4|6 − 8|.

    Answer

    −10

    Exercises

    In Exercises 1-40, compute the exact value of the given expression.

    1. \(7 - \frac{-14}{2}\)

    2. \(-2 - \frac{-16}{4}\)

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

    4. \(-6 - \frac{-7}{7}\)

    5. −54

    6. −33

    7. 9 − 1(−7)

    8. 85 − 8(9)

    9. −63

    10. −35

    11. 3 + 9(4)

    12. 6 + 7(−1)

    13. 10 − 72 ÷ 6 · 3+8

    14. 8 − 120 ÷ 5 · 6+7

    15. \(6 + \frac{14}{2}\)

    16. \(16 + \frac{8}{2}\)

    17. −34

    18. −22

    19. 3 − 24 ÷ 4 · 3+4

    20. 4 − 40 ÷ 5 · 4+9

    21. 64 ÷ 4 · 4

    22. 18 ÷ 6 · 1

    23. −2 − 3(−5)

    24. 64 − 7(7)

    25. 15 ÷ 1 · 3

    26. 30 ÷ 3 · 5

    27. 8 + 12 ÷ 6 · 1 − 5

    28. 9 + 16 ÷ 2 · 4 − 9

    29. 32 ÷ 4 · 4

    30. 72 ÷ 4 · 6

    31. \(-11 + \frac{16}{16}\)

    32. \(4 + \frac{-20}{4}\)

    33. −52

    34. −43

    35. 10 + 12(−5)

    36. 4 + 12(4)

    37. 2+6 ÷ 1 · 6 − 1

    38. 1 + 12 ÷ 2 · 2 − 6

    39. 40 ÷ 5 · 4

    40. 30 ÷ 6 · 5


    In Exercises 41-80, simplify the given expression.

    41. −11 + | − 1 − (−6)2|

    42. 13 + | − 21 − (−4)2|

    43. |0(−4)| − 4(−4)

    44. |10(−3)| − 3(−1)

    45. (2 + 3 · 4) − 8

    46. (11 + 5 · 2) − 10

    47. (8 − 1 · 12) + 4

    48. (9 − 6 · 1) + 3

    49. (6 + 10 · 4) − 6

    50. (8 + 7 · 6) − 12

    51. 10 + (6 − 4)3 − 3

    52. 5 + (12 − 7)2 − 6

    53. (6 − 8)2 − (4 − 7)3

    54. (3 − 8)2 − (4 − 9)3

    55. |0(−10)| + 4(−4)

    56. |12(−5)| + 7(−5)

    57. |8(−1)| − 8(−7)

    58. |6(−11)| − 7(−1)

    59. 3 + (3 − 8)2 − 7

    60. 9 + (8 − 3)3 − 6

    61. (4 − 2)2 − (7 − 2)3

    62. (1 − 4)2 − (3 − 6)3

    63. 8 −|− 25 − (−4)2|

    64. 20 −|− 22 − 42|

    65. −4 − |30 − (−5)2|

    66. −8 −|− 11 − (−6)2|

    67. (8 − 7)2 − (2 − 6)3

    68. (2 − 7)2 − (4 − 7)3

    69. 4 − (3 − 6)3 + 4

    70. 6 − (7 − 8)3 + 2

    71. −3 + | − 22 − 52|

    72. 12 + |23 − (−6)2|

    73. (3 − 4 · 1) + 6

    74. (12 − 1 · 6) + 4

    75. 1 − (1 − 5)2 + 11

    76. 9 − (3 − 1)3 + 10

    77. (2 − 6)2 − (8 − 6)3

    78. (2 − 7)2 − (2 − 4)3

    79. |9(−3)| + 12(−2)

    80. |0(−3)| + 9(−7)


    In Exercises 81-104, simplify the given expression.

    81. \( \frac{4(-10) -5}{-9}\)

    82. \( \frac{-4 \cdot 6 - (-8)}{-4}\)

    83. \(\frac{10^2 - 4^2}{2 \cdot 6 - 10}\)

    84. \(\frac{3^2 - 9^2}{2 \cdot 7 - 5}\)

    85. \( \frac{3^2 + 6^2}{5 - 1 \cdot 8}\)

    86. \( \frac{10^2 + 4^2}{1 - 6 \cdot 5}\)

    87. \( \frac{-8-4}{7 - 13}\)

    88. \( \frac{13-1}{8-4}\)

    89. \( \frac{2^2 + 6^2}{11 - 4 \cdot 4}\)

    90. \( \frac{7^2 + 3^2}{10 - 8 \cdot 1}\)

    91. \(\frac{1^2 - 5^2}{9 \cdot 1 - 5}\)

    92. \( \frac{5^2 - 7^2}{2 \cdot 2 - 12}\)

    93. \( \frac{4^2 - 8^2}{6 \cdot 3 - 2}\)

    94. \( \frac{7^2 - 6^2}{6 \cdot 3 - 5}\)

    95. \( \frac{10^2 + 2^2}{10-2 \cdot 7}\)

    96. \( \frac{2^2 + 10^2}{10 - 2 \cdot 7}\)

    97. \( \frac{16-(-2)}{19-1}\)

    98. \( \frac{-8-20}{-15-(-17}\)

    99. \( \frac{15 -(-15)}{13-(-17)}\)

    100. \( \frac{7-(-9)}{-1-1}\)

    101. \( \frac{4 \cdot 5 - (-19)}{3}\)

    102. \( \frac{10 \cdot 7 - (-11)}{-3}\)

    103. \( \frac{-6 \cdot 9 -(-4)}{2}\)

    104. \( \frac{-6 \cdot 2 - 10}{-11}\)

    Answers

    1. 14

    3. −5

    5. −625

    7. 16

    9. −216

    11. 39

    13. −18

    15. 13

    17. −81

    19. −11

    21. 64

    23. 13

    25. 45

    27. 5

    29. 32

    31. −10

    33. −25

    35. −50

    37. 37

    39. 32

    41. 26

    43. 16

    45. 6

    47. 0

    49. 40

    51. 15

    53. 31

    55. −16

    57. 64

    59. 21

    61. −121

    63. −33

    65. −9

    67. 65

    69. 35

    71. 44

    73. 5

    75. −4

    77. 8

    79. 3

    81. 5

    83. 42

    85. −15

    87. 2

    89. −8

    91. −6

    93. −3

    95. −8

    97. 1

    99. 1

    101. 13

    103. −25


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

    • Was this article helpful?