# 1.2: Order of Operations

## Learning Objectives

- Evaluate algebraic expressions with grouping symbols.
- Evaluate algebraic expressions with fraction bars.
- Evaluate algebraic expressions using a graphing calculator.

## Introduction

Look at and evaluate the following expression:

How many different ways can we interpret this problem, and how many different answers could someone possibly find for it?

The *simplest* way to evaluate the expression is simply to start at the left and work your way across:

This is the answer you would get if you entered the expression into an ordinary calculator. But if you entered the expression into a scientific calculator or a graphing calculator you would probably get 29 as the answer.

In mathematics, the order in which we perform the various **operations** (such as adding, multiplying, etc.) is important. In the expression above, the operation of **multiplication** takes precedence over **addition**, so we evaluate it first. Let’s re-write the expression, but put the multiplication in brackets to show that it is to be evaluated first.

First evaluate the brackets: . Our expression becomes:

When we have only addition and subtraction, we start at the left and work across:

Algebra students often use the word **“PEMDAS”** to help remember the order in which we evaluate the mathematical expressions: **P**arentheses, **E**xponents, **M**ultiplication, **D**ivision, **A**ddition and **S**ubtraction.

## Order of Operations

- Evaluate expressions within
**P**arentheses (also all brackets and braces { }) first. - Evaluate all
**E**xponents (terms such as or ) next. -
**M**ultiplication*and***D**ivision is next - work from left to right completing**both**multiplication and division in the order that they appear. - Finally, evaluate
**A**ddition*and***S**ubtraction - work from left to right completing**both**addition and subtraction in the order that they appear.

## Evaluate Algebraic Expressions with Grouping Symbols

The first step in the order of operations is called **parentheses**, but we include all **grouping symbols** in this step—not just parentheses , but also square brackets and curly braces { }.

**Example 1**

*Evaluate the following:*

a)

b)

c)

Each of these expressions has the same numbers and the same mathematical operations, in the same order. The placement of the various grouping symbols means, however, that we must evaluate everything in a different order each time. Let's look at how we evaluate each of these examples.

a) This expression doesn't have parentheses, exponents, multiplication, or division. **PEMDAS** states that we treat addition and subtraction as they appear, starting at the left and working right (it’s NOT addition *then* subtraction).

b) This expression has parentheses, so we first evaluate . Remember that when we subtract a negative it is equivalent to adding a positive:

c) An expression can contain any number of sets of parentheses. Sometimes expressions will have sets of parentheses **inside** other sets of parentheses. When faced with **nested parentheses**, start at the innermost parentheses and work outward.

Brackets may also be used to group expressions which already contain parentheses. This expression has both brackets and parentheses. We start with the innermost group: . Then we complete the operation in the brackets.

**Example 2**

*Evaluate the following:*

a)

b)

c)

a) There are no grouping symbols. **PEMDAS** dictates that we multiply and divide first, working from left to right: and . (NOTE: It’s not multiplication *then* division.) Next we subtract:

b) First, we evaluate the expression inside the parentheses: . Then work from left to right:

c) First, we evaluate the expressions inside parentheses: and . Then work from left to right:

Note that adding parentheses didn’t change the expression in part c, but did make it easier to read. Parentheses can be used to change the order of operations in an expression, but they can also be used simply to make it easier to understand.

We can also use the order of operations to simplify an expression that has variables in it, after we substitute specific values for those variables.

**Example 3**

*Use the order of operations to evaluate the following:*

a) when

b) when

c) when and

a) The first step is to substitute the value for into the expression. We can put it in parentheses to clarify the resulting expression.

(Note: is the same as .)

Follow **PEMDAS** - first parentheses. Inside parentheses follow **PEMDAS** again.

b) The first step is to substitute the value for into the expression.

Follow **PEMDAS**: we cannot simplify the expressions in parentheses, so exponents come next.

c) The first step is to substitute the values for and into the expression.

Follow **PEMDAS**:

In parts (b) and (c) we left the parentheses around the negative numbers to clarify the problem. They did not affect the order of operations, but they did help avoid confusion when we were multiplying negative numbers.

Part (c) in the last example shows another interesting point. When we have an expression inside the parentheses, we use **PEMDAS** to determine the order in which we evaluate the contents.

## Evaluate Algebraic Expressions with Fraction Bars

Fraction bars count as grouping symbols for **PEMDAS**, so we evaluate them in the first step of solving an expression. All numerators and all denominators can be treated as if they have invisible parentheses around them. When **real** parentheses are also present, remember that the innermost grouping symbols come first. If, for example, parentheses appear on a numerator, they would take precedence over the fraction bar. If the parentheses appear outside of the fraction, then the fraction bar takes precedence.

**Example 4**

*Use the order of operations to evaluate the following expressions:*

a) when

b) when and

c) when and

a) We substitute the value for into the expression.

Although this expression has no parentheses, the fraction bar is also a grouping symbol—it has the same effect as a set of parentheses. We can write in the “invisible parentheses” for clarity:

Using **PEMDAS**, we first evaluate the numerator:

We can convert to a mixed number:

Then evaluate the expression:

b) We substitute the values for and into the expression:

This expression has nested parentheses (remember the effect of the fraction bar). The innermost grouping symbol is provided by the fraction bar. We evaluate the numerator and denominator first.

c) We substitute the values for and into the expression:

This complicated expression has several layers of nested parentheses. One method for ensuring that we start with the innermost parentheses is to use more than one type of parentheses. Working from the outside, we can leave the outermost brackets as parentheses . Next will be the “invisible brackets” from the fraction bar; we will write these as . The third level of nested parentheses will be the { }. We will leave negative numbers in round brackets.

## Evaluate Algebraic Expressions with a TI-83/84 Family Graphing Calculator

A graphing calculator is a very useful tool in evaluating algebraic expressions. Like a scientific calculator, a graphing calculator follows **PEMDAS**. In this section we will explain two ways of evaluating expressions with the graphing calculator.

**Example 5**

*Evaluate when .*

**Method 1:** Substitute for the variable first. Then evaluate the numerical expression with the calculator.

*Substitute the value into the expression.*

*Input this in the calculator just as it is and press* **[ENTER]**. *(Note: use to enter exponents)*

*The answer is* -13.

**Method 2:** Input the original expression in the calculator first and then evaluate.

*First, store the value in the calculator. Type -3* **[STO]** *(The letter can be entered using the ***[VAR]** *button or* **[ALPHA] + [STO]**). *Then type the original expression in the calculator and press* **[ENTER]**.

*The answer is* -13.

The second method is better because you can easily evaluate the same expression for any value you want. For example, let’s evaluate the same expression using the values and .

For , store the value of in the calculator: **[STO]** . Press **[2nd] [ENTER]** twice to get the previous expression you typed in on the screen without having to enter it again. Press **[ENTER]** to evaluate the expression.

The answer is 62.

For , store the value of in the calculator: **[STO]** . Press **[2nd] [ENTER]** twice to get the expression on the screen without having to enter it again. Press **[ENTER]** to evaluate.

The answer is 13.21, or in fraction form.

**Note:** On graphing calculators there is a difference between the minus sign and the negative sign. When we stored the value negative three, we needed to use the negative sign which is to the left of the **[ENTER]** button on the calculator. On the other hand, to perform the subtraction operation in the expression we used the minus sign. The minus sign is right above the plus sign on the right.

You can also use a graphing calculator to evaluate expressions with more than one variable.

**Example 7**

*Evaluate the expression for .*

**Solution**

Store the values of and : -2 **[STO]** , 1 **[STO]** . (The letters and can be entered using **[ALPHA] + [KEY]**.) Input the expression in the calculator. When an expression includes a fraction, be sure to use parentheses: .

Press **[ENTER]** to obtain the answer or .

## Additional Resources

For more practice, you can play an algebra game involving order of operations online at http://www.funbrain.com/algebra/index.html.

## Review Questions

- Use the order of operations to evaluate the following expressions.
- Evaluate the following expressions involving variables.
- when and
- when and
- when
- when and
- when and

- Evaluate the following expressions involving variables.
- when
- when and
- when and
- when and

- Insert parentheses in each expression to make a true equation.
- Evaluate each expression using a graphing calculator.
- when and
- when and
- when and
- when and
- when and