Skip to main content
Logo image

Elementary Algebra

Section 1.5 Order of Operations

So far we have looked at equations in which the variable is involved in only one operation, but soon we will consider equations that involve two or more operations. To solve such equations we need to know the correct order in which to "undo" those operations. Let’s begin by reviewing the rules for simplifying expressions.

Subsection Addition and Multiplication

If you add together three or more numbers, such as
\begin{equation*} 2+5+8 \end{equation*}
it doesn’t matter which addition you do first; you will get the same answer either way.

Example 1.66.

  1. A sum of three or more terms can be added in any order. In the sums below, the parentheses tell us which part of the expression to simplify first.
    \begin{align*} (\blert{2} \amp \blert{+5})+8 \amp \text{and}~~~~~~~~~~2 \amp + (\blert{5+8})\\ \amp = \blert{7}+8=15 \amp \amp = 2+\blert{13}=15 \end{align*}
  2. Similarly, a product of three factors can be multiplied in any order. Thus
    \begin{align*} (\blert{3} \amp \blert{\cdot 2}) \cdot 4 \amp \text{and}~~~~~~~~~~3 \cdot \amp (\blert{2 \cdot 4})\\ \amp = \blert{6}\cdot 4=24 \amp \amp = 3 \cdot \blert{8}=24 \end{align*}
These two facts illustrate the associative laws for addition and multiplication.

Associative Laws for Addition and Multiplication.

If \(a, b\) and \(c\) are any numbers, then
\begin{align*} \blert{(a+b)+c} \amp = \blert{a+(b+c)}\\ \blert{(a \cdot b) \cdot c} \amp = \blert{a \cdot (b \cdot c)} \end{align*}

Subsection Subtraction and Division

What about a string of subtractions or a string of divisions, such as
\begin{equation*} 20-8-5~~~~~~~~~~\text{or}~~~~~~~~~~36 \div 6 \div 2 \end{equation*}
In these calculations, we get different answers, depending on which operations we perform first, as you can see in Example 1.67.

Example 1.67.

  1. Subtraction:
    \begin{equation*} (\blert{20-8})-5=\blert{12}-5=7 \end{equation*}
    but
    \begin{equation*} 20-(\blert{8-5})=20-\blert(3)=17 \end{equation*}
  2. Division:
    \begin{equation*} (\blert{36 \div 6}) \div 2 =\blert{6}\div 2=3 \end{equation*}
    but
    \begin{equation*} 36 \div(\blert{6 \div 2})=36-\blert(3)=12 \end{equation*}

Subtraction and Division.

The associative laws do not hold for subtraction or division.
So, if there are no parentheses in the expression, how do we know which operations to perform first?

First Rule.

  1. In a string of additions and subtractions, we perform the operations in order from left to right.
  2. Similarly, we perform multiplications and divisions in order from left to right.

Example 1.68.

Simplify each expression.
  1. \(\displaystyle 20-8-5\)
  2. \(\displaystyle 36 \div 6 \div 2\)

Solution.

Perform the operations in order from left to right.
  1. \(\displaystyle \blert{20-8}-5=\blert{12}-5=7\)
  2. \(\displaystyle \blert{36 \div 6} \div 2 =\blert{6}\div 2=3\)

QuickCheck 1.69.

What do the associative laws tell us?
Answer.
A sum of three or more terms, or a product of three or more factors, can be calculated in any order.

QuickCheck 1.70.

Which two operations are not associative?
Answer.
Subtraction and division

QuickCheck 1.71.

In what order should we perform a string of additions and subtractions?
Answer.
In order from left to right.

Subsection Combined Operations

How should we simplify the expression \(~~4+6 \cdot 2\) ?
If we do the addition first, we get
\begin{equation*} (\blert{4+6}) \cdot 2 = \blert{10} \cdot 2 = 20 \end{equation*}
If we do the multiplication first, we get
\begin{equation*} 4+(\blert{6 \cdot 2}) = 4 + \blert{12} = 48 \end{equation*}
Which one is correct? In order to avoid confusion, we make the following agreement.

Second Rule.

Always perform multiplications and divisions before additions and subtractions.

Example 1.72.

The correct way to simplify the expression \(~~4+6 \cdot 2~~\) is
\begin{align*} 4 \amp + \blert{6 \cdot 2} \amp \amp \blert{\text{Multiply first.}}\\ \amp = 4 + 12 \amp \amp \blert{\text{Then add.}}\\ \amp = 16 \end{align*}

Look Closer.

In longer expressions, it can be helpful to group the expression into its terms before beginning. Terms are expressions separated by addition or subtraction symbols. We simplify each term before combining them.

Example 1.73.

Simplify \(~~6 + 2 \cdot 5 - 12 \div 3 \cdot 2\)

Solution.

We start by underlining each term of the expression separately. Then we simplify each term.
\begin{align*} \underline{6} \amp + \underline{2 \cdot 5} - \underline{12 \div 3 \cdot 2} \amp \amp \blert{\text{Perform multiplications and divisions.}}\\ \amp = 6 + 10 - 8 \amp \amp \blert{\text{Perform additions and subtractions.}}\\ \amp = 16 - 8 = 8 \end{align*}

Caution 1.74.

  1. In Example 1.73, we do not start by adding \(6+2\text{.}\) We must perform multiplications before additions.
  2. We simplify \(12 \div 3 \cdot 2\) by performing the operations from left to right:
    \begin{equation*} \blert{12 \div 3} \cdot 2 = \blert{4} \cdot 2 = 8 \end{equation*}

Subsection Parentheses

What if the addition should come first in a particular calculation? In that case, we use parentheses to enclose the sum, like this:
\begin{equation*} (4+6) \cdot 2 \end{equation*}

Third Rule.

Perform any operations inside parentheses first.

Example 1.75.

Simplify each expression.
  1. \(\displaystyle 2 + 5 (7 - 3)\)
  2. \(\displaystyle 6(10-2\cdot 4)\div 4\)

Solution.

  1. We start with the expression inside parentheses.
    \begin{align*} 2 + \amp 5 (\blert{7 - 3}) \amp \amp \blert{\text{Subtract inside parentheses.}}\\ \amp = 2 + \blert{5(4)} \amp \amp \blert{\text{Multiply.}}\\ \amp = 2+20 = 22 \amp \amp \blert{\text{Add.}} \end{align*}
  2. We start with the product inside parentheses.
    \begin{align*} 6(\amp 10- \blert{2\cdot 4}) \div 4 \amp \amp \blert{\text{Multiply inside parentheses.}}\\ \amp = 6(\blert{10-8}) \div 4 \amp \amp \blert{\text{Subtract inside parentheses.}}\\ \amp = \blert{6(2)} \div 4 \amp \amp \blert{\text{Multiply and divide from left to right.}}\\ \amp = 12 \div 4 = 3 \end{align*}

QuickCheck 1.76.

Is it true that multiplications should be performed before divisions? Why or why not?
Answer.
Perform multiplications and divisions in order from left to right.

QuickCheck 1.77.

What do parentheses tell us?
Answer.
Perform any operations inside parentheses first.

QuickCheck 1.78.

If there are no parentheses, in what order should we perform multiplications and divisions?
Answer.
In order from left to right.

Subsection Fraction Bars

Like parentheses, a fraction bar is a grouping device.

Fourth Rule.

Expressions that appear above or below a fraction bar should be simplified first.

Example 1.79.

Simplify \(~~\dfrac{24+6}{12+6}\)

Solution.

We begin by computing the sums above and below the fraction bar. Then we can reduce the fraction. Thus,
\begin{equation*} \dfrac{24+6}{12+6} = \dfrac{30}{18}=\dfrac{5}{3} \end{equation*}

Caution 1.80.

Do not be tempted to "cancel" the terms in Example 1.79. For example, it would be incorrect to write
\begin{equation*} \dfrac{24+6}{12+6} = \dfrac{\Ccancel[blue]{24} +6}{\Ccancel[blue]{12} +6} = \dfrac{2+6}{1+6}~~~~~~~~\alert {\leftarrow \text{Incorrect!}} \end{equation*}
According to the order of operations, we must simplify the numerator and denominator first, before dividing.

QuickCheck 1.81.

Besides parentheses, what other symbol serves as a grouping device?
Answer.
Fraction bar

QuickCheck 1.82.

When adding fractions, which should you do first: reduce each fraction, or find an LCD?
Answer.
Find an LCD

Subsection Summary

Combining all our guidelines for simplifying expressions, we state the rules for the order of operations.

Order of Operations.

  1. First, perform any operations that appear inside parentheses, or above or below a fraction bar.
  2. Next, perform all multiplications and divisions in order from left to right.
  3. Finally, perform all additions and subtractions in order from left to right.

Subsection Algebraic Expressions

The order of operations applies to variables as well as constants. For example, the expression
\begin{equation*} 5+2x \end{equation*}
tells us to multiply \(x\) by 2, then add 5 to the result. Thus, to evaluate the expression for \(x=\alert{8}\) for example, we write
\begin{align*} \text{For }x=\alert{8},~~~~~~~~~~5+2x \amp = 5+2(\alert{8}) \amp \amp \blert{\text{Multiply first.}}\\ \amp = 5+16=21 \end{align*}
In the Example below, note how parentheses change the meaning of an expression.

Example 1.83.

Write algebraic expressions for each of the following phrases. Then evaluate each phrase for \(x=2\) and \(y=6\text{.}\)
  1. Three times the sum of \(x\) and \(y\)
  2. The sum of \(3x\) and \(y\)

Solution.

  1. We write the sum of \(x\) and \(y\) inside parentheses.
    \begin{align*} \amp 3(x+y)\\ \amp 3(\alert{2}+\alert{6})=3(8)=24 \end{align*}
  2. We multiply first, then add.
    \begin{align*} \amp 3x+y\\ \amp 3(\alert{2})+\alert{6}=6+6=12 \end{align*}

Skills Warm-Up 1.84.

Perform the operations on fractions as indicated.
    1. \(\displaystyle \dfrac{5}{4} + \dfrac{3}{4}\)
    2. \(\displaystyle \dfrac{5}{4} - \dfrac{3}{4}\)
    3. \(\displaystyle \dfrac{5}{4} \cdot \dfrac{3}{4}\)
    4. \(\displaystyle \dfrac{5}{4} \div \dfrac{3}{4}\)
    1. \(\displaystyle \dfrac{1}{2} + \dfrac{1}{6}\)
    2. \(\displaystyle \dfrac{1}{2} - \dfrac{1}{6}\)
    3. \(\displaystyle \dfrac{1}{2} \cdot \dfrac{1}{6}\)
    4. \(\displaystyle \dfrac{1}{2} \div \dfrac{1}{6}\)
    1. \(\displaystyle \dfrac{2}{3} + \dfrac{1}{4}\)
    2. \(\displaystyle \dfrac{2}{3} - \dfrac{1}{4}\)
    3. \(\displaystyle \dfrac{2}{3} \cdot \dfrac{1}{4}\)
    4. \(\displaystyle \dfrac{2}{3} \div \dfrac{1}{4}\)

Answer.

    1. \(\displaystyle 2\)
    2. \(\displaystyle \dfrac{1}{2}\)
    3. \(\displaystyle \dfrac{15}{16}\)
    4. \(\displaystyle \dfrac{5}{3}\)
    1. \(\displaystyle \dfrac{2}{3}\)
    2. \(\displaystyle \dfrac{1}{3}\)
    3. \(\displaystyle \dfrac{1}{12}\)
    4. \(\displaystyle 3\)
    1. \(\displaystyle \dfrac{11}{12}\)
    2. \(\displaystyle \dfrac{5}{12}\)
    3. \(\displaystyle \dfrac{1}{6}\)
    4. \(\displaystyle \dfrac{8}{3}\)

Subsection Lesson

Activity 1.17. Which Operations Come First?

In the Reading assignment, we established the following rules.
  1. Operations.
    1. In a string of additions and subtractions, we perform the operations in order from left to right
    2. Similarly, we perform multiplications and divisions in order from left to right.
    Simplify each expression.
    1. \(\displaystyle 30-17-5+4\)
    2. \(\displaystyle 72 \div 4 \cdot 3 \div 6\)
  2. Combined operations and grouping into terms
    Always perform multiplications and divisions before additions and subtractions.
    Simplify each expression.
    1. \(\displaystyle 12-6\left(\dfrac{1}{2}\right)\)
    2. \(\displaystyle 2(3.5)+10(1.4)\)
    3. \(\displaystyle ~~12+24 \div 4 \cdot 3 + 16-10-4\)

Activity 1.18. Parentheses and Fraction Bars.

  1. Parentheses: Simplify each expression.
    1. \(\displaystyle 28-3(12-2 \cdot 4)\)
    2. \(\displaystyle 12+36 \div 4(9-2 \cdot 3)\)
  2. Fraction Bars: Follow the steps to simplify \(~~\dfrac{8-2(6-4)}{(8-2)6-4}\)
    1. Perform operations inside parentheses.
    2. Simplify above the fraction bar — multiplication first.
    3. Simplify below the fraction bar — multiplication first.
    4. Reduce the fraction.
  3. If an expression involves more than one type of grouping symbol (say, both parentheses and brackets), we start with the innermost grouping symbols and work outward.
    Follow the steps to simplify \(~~6+2\left[3(12-5)-4(7-3)\right]\)
    1. Subtract inside parentheses. \(~~~~6+2\left[3(\blert{12-5})-4(\blert{7-3})\right] \)
    2. Multiply inside the brackets.
    3. Subtract inside the brackets.
    4. Multiply, then add.
  4. Follow the steps to simplify \(~~19+5\left[4(22-19)-\dfrac{12}{2}\right]\)
    1. Subtract inside parentheses. \(~~~~19+5\left[4(\blert{22-19})-\dfrac{12}{2}\right] \)
    2. Multiply inside the brackets, divide inside the brackets.
    3. Subtract inside the brackets.
    4. Multiply, then add.

Activity 1.19. Algebraic Expressions.

  1. Choose the correct algebraic expression for each phrase.
    1. 6 times the sum of \(x\) and 5
      \begin{equation*} 6x+5 \qquad \text{or} \qquad 6(x+5) \end{equation*}
    2. \(\dfrac{1}{2}\) the difference of \(p\) and \(q\)
      \begin{equation*} \dfrac{1}{2}\left(p-q\right) \qquad \text{or} \qquad \dfrac{1}{2}p-q \end{equation*}
    3. 4 less than the product of 6 and \(w\)
      \begin{equation*} 6w-4 \qquad \text{or} \qquad 4-6w \end{equation*}
    4. 2 less than the product of 10 and \(z\)
      \begin{equation*} \dfrac{10}{z}-2 \qquad \text{or} \qquad 2-\dfrac{10}{z} \end{equation*}
  2. Use the tables to evaluate each of the following expressions in two steps. (The first one is done for you.) Note especially how the order of operations differs in parts (a) and (b).
    1. \(\displaystyle 8+3t\)
      \(~t~\) \(3t\) \(8+3t\)
      \(0\) \(0\) \(8\)
      \(2\) \(\hphantom{0000}\) \(\hphantom{0000}\)
      \(7\) \(\hphantom{0000}\) \(\hphantom{0000}\)
    2. \(\displaystyle 3(t+8)\)
      \(~t~\) \(t+8\) \(3(t+8)\)
      \(0\) \(8\) \(24\)
      \(2\) \(\hphantom{0000}\) \(\hphantom{0000}\)
      \(7\) \(\hphantom{0000}\) \(\hphantom{0000}\)
    3. \(\displaystyle 6+\dfrac{x}{2}\)
      \(~x~\) \(\dfrac{x}{2}\) \(6+\dfrac{x}{2}\)
      \(4\) \(2\) \(8\)
      \(8\) \(\hphantom{0000}\) \(\hphantom{0000}\)
      \(9\) \(\hphantom{0000}\) \(\hphantom{0000}\)
    4. \(\displaystyle \dfrac{6+x}{2}\)
      \(~x~\) \(6+x\) \(\dfrac{6+x}{2}\)
      \(4\) \(10\) \(5\)
      \(8\) \(\hphantom{0000}\) \(\hphantom{0000}\)
      \(9\) \(\hphantom{0000}\) \(\hphantom{0000}\)

Activity 1.20. Using Your Calculator.

Simplify each expression two ways: by hand, and with a calculator. Follow the order of operations.
  1. \(9+2 \cdot 5 - 3\cdot 4\)
    1. By hand
    2. With a calculator
  2. \(6(10-2 \cdot 4) \div 4\)
    1. By hand
    2. With a calculator
  3. \(2.4\left[25-3(6.7)\right]+5.5\)
    1. By hand
    2. With a calculator
  4. Most calculators cannot use a fraction bar as a grouping symbol. Consider the expression \(~~\dfrac{24}{6-4}~~\text{,}\) which simplifies to \(~~\dfrac{24}{2}~~\) or \(12\text{.}\) If we enter the expression into a calculator as
    \begin{equation*} 24 \div 6 - 4 \end{equation*}
    we get 0, which is not correct. This is because the calculator follows the order of operations and calculates \(24 \div 6\) first.
    If we use a calculator to compute \(\dfrac{24}{6-4}\text{,}\) we must tell the calculator that \(6-4\) should be computed first. To do this, we use parentheses and enter the expression as
    \begin{equation*} 24 \div (6-4) \end{equation*}
    We call this way of writing the expression the in-line form.
    When using a calculator, we must enclose in parentheses any expression that appears above or below a fraction bar.
    Use a scientific calculator to simplify the expression \(~~\dfrac{16.2}{(2.4)(1.5)}\text{.}\)

Subsubsection Wrap-Up

Objectives.
In this Lesson we practiced the following skills:
  • Simplifying expressions by following the order of operations
  • Using a calculator to simplify expressions
Questions.
  1. Give examples to show that the associative laws do not hold for subtraction or division.
  2. Why should we separate an expression into its terms?
  3. True or false: always start simplifying from left to right.
  4. True or false: we should perform multiplications before divisions.
  5. How do we enter expressions with fraction bars into a calculator?

Activity 1.21. Homework Preview.

Simplify.
    1. \(\displaystyle 20 - 3(2)\)
    2. \(\displaystyle (20-3) \cdot 2\)
    1. \(\displaystyle 20 - 8-2\)
    2. \(\displaystyle 20- (8 - 2)\)
    1. \(\displaystyle 20 - 3(2 + 4)\)
    2. \(\displaystyle 20-(3 \cdot 2 + 4)\)
    1. \(\displaystyle \dfrac{20+12}{4+2}\)
    2. \(\displaystyle \dfrac{20}{4} + \dfrac{12}{2}\)
    1. \(\displaystyle \dfrac{25-8}{5}\)
    2. \(\displaystyle \dfrac{40}{8} + \dfrac{18}{6}\)
Answers to Homework Preview
    1. \(\displaystyle 14\)
    2. \(\displaystyle 34\)
    1. \(\displaystyle 10\)
    2. \(\displaystyle 14\)
    1. \(\displaystyle 2\)
    2. \(\displaystyle 10\)
    1. \(\displaystyle \dfrac{16}{3}\)
    2. \(\displaystyle 11\)
    1. \(\displaystyle 3.4\)
    2. \(\displaystyle 2\)

Exercises Homework 1.5

Exercise Group.

For Problems 1–12, simplify each expression by following the order of operations.
1.
\(2+4(3)\)
2.
\(15-\dfrac{3}{4}(16)\)
3.
\(6 \div \dfrac{1}{4} \cdot 3\)
4.
\(3+3(2+3)\)
5.
\(\dfrac{1}{3} \cdot 12 - 3\left(\dfrac{5}{6}\right)\)
6.
\(2+3 \cdot 8-6+3\)
7.
\(\dfrac{3(8)}{12}-\dfrac{6+4}{5}\)
8.
\(28+6 \div 2 - 2(5+3 \cdot 2)\)
9.
\(3[3(3+2)-8]-17\)
10.
\(\dfrac{3(3)+5}{6-2(2)}+\dfrac{2(5)-4}{9-4-2}\)

Exercise Group.

11.
\(7[15-24 \div 2]-9[5(4+2)-4(6+1)]\)
12.
\(20-4(9-3 \cdot 2)+8-5 \cdot 3\)

Exercise Group.

For Problems 13–16, use your calculator to simplify each expression. Round your answers to three decimal places if necessary.
13.
\(\dfrac{6.4+3.5}{3.6(3.2)}\)
14.
\(\dfrac{14.6-6.8}{7.3+3.4}\)
15.
\(\dfrac{26.2-9.1}{8.4 \div 7.7}+ 5.1(6.9-1.6)\)
16.
\(\dfrac{1728(847-603)}{216(98-38)}+ 6(876-514)\)

Exercise Group.

For Problems 17–22, evaluate each pair of expressions mentally.
17.
  1. \(\displaystyle 8+2 \cdot 5\)
  2. \(\displaystyle (8+2) \cdot 5\)
18.
  1. \(\displaystyle \dfrac{24}{2+6}\)
  2. \(\displaystyle \dfrac{24}{2}+6\)
19.
  1. \(\displaystyle (9-4)-3\)
  2. \(\displaystyle 9-(4-3)\)
20.
  1. \(\displaystyle 6 \cdot 8 - 6\)
  2. \(\displaystyle 6(8-6)\)
21.
  1. \(\displaystyle \dfrac{36}{6(3)}\)
  2. \(\displaystyle \dfrac{36}{6}(3)\)
22.
  1. \(\displaystyle (30-5)(5)\)
  2. \(\displaystyle 30-(5)(5)\)

Exercise Group.

For Problems 23–24, fill in the table to evaluate the expression in two steps.
23.
\(5z-3\)
\(~z~\) \(5z\) \(5z-3\)
\(2\) \(\hphantom{00}\) \(\hphantom{00}\)
\(4\) \(\hphantom{00}\) \(\hphantom{00}\)
\(5\) \(\hphantom{00}\) \(\hphantom{00}\)
24.
\(2(12+Q)\)
\(~Q~\) \(12+Q\) \(2(12+Q)\)
\(0\) \(\hphantom{00}\) \(\hphantom{00}\)
\(4\) \(\hphantom{00}\) \(\hphantom{00}\)
\(8\) \(\hphantom{00}\) \(\hphantom{00}\)

Exercise Group.

For Problems 25–30, evaluate for the given values.
25.
\(2y+x~~~~~~~~\)for \(x=8\) and \(y=9\)
26.
\(4a+3b~~~~~~~~\)for \(a=8\) and \(b=7\)
27.
\(\dfrac{a}{b}-\dfrac{b}{a}~~~~~~~~\)for \(a=8\) and \(b=6\)
28.
\(\dfrac{24-2x}{2+y}-\dfrac{4x+1}{3y}~~~~~~~~\)for \(x=4\) and \(y=6\)
29.
\(\dfrac{a}{1-r}~~~~~~~~\)for \(a=6\) and \(r=0.2 \)
30.
\(mx+b~~~~~~~~\)for \(m=\dfrac{3}{5},~x=\dfrac{2}{3}\) and \(b=\dfrac{9}{10}\)

31.

Consider the expression \(20-2 \cdot 8 + 1\text{.}\) How would you change the expression if you wanted:
  1. The subtraction performed first?
  2. The addition performed first?
  3. The multiplication performed first?

32.

Write an algebraic expression for the following instructions:
"Multiply the sum of 5 and 7 by 4, then divide by the difference of 10 and 8."

33.

Write two algebraic expressions for "the difference of 20 and 8, divided by the sum of 6 and 4 and 10":
  1. Using a fraction bar
  2. Using a division symbol

34.

Without performing the calculations, write down the steps you would use to simplify the expression: \(~~825-32(12)\div 4+2\)

Exercise Group.

For Problems 35–38, choose the correct algebraic expression for each English phrase.
\begin{align*} \amp \dfrac{m}{12}-3 \amp\amp\amp \amp \dfrac{m-3}{12}\\ \amp \dfrac{12}{m-3} \amp\amp\amp\amp 3-\dfrac{12}{m} \end{align*}
35.
Twelve divided by 3 less than \(m\text{.}\)
36.
Three less than the quotient of \(m\) divided by 12.
37.
The quotient of 3 less than \(m\) divided by 12.
38.
Subtract from 3 the quotient of 12 and \(m\text{.}\)

39.

Find and correct the error in the calculation:
\begin{equation*} \begin{aligned} (5+4)\amp -3(8-3 \cdot 2)\\ \amp = 9-3(8-6)\\ \amp = 6(2)=12 \end{aligned} \end{equation*}

38.

Think of the region shown below as a rectangle with a smaller rectangle removed, and write an expression for its area. Then simplify your expression to find the area. (The measurements given are in centimeters.)
rectangle with rectangular hole