Order of Operations
When you see a math problem with multiple operations (addition, subtraction, multiplication, division, exponents, and parentheses) all mixed together—which do you do first? Does it even matter? Well, yes, it matters a lot! If you don't follow the correct order, you'll get the wrong answer every time.
The order of operations is a set of rules that tells us exactly which calculations to perform first when evaluating an expression. These rules ensure that everyone gets the same answer to the same problem. Without them, the expression \(3 + 4 \times 2\) could equal either 14 or 11, depending on what you did first. But with the order of operations, there's only one correct answer: 11.
PEMDAS: Your Guide to the Order
The order of operations is often remembered using the acronym PEMDAS, which stands for:
- Parentheses
- Exponents
- Multiplication and Division (left to right)
- Addition and Subtraction (left to right)
Some people like to remember it with the phrase "Please Excuse My Dear Aunt Sally." Others use GEMDAS (Grouping symbols, Exponents, Multiplication/Division, Addition/Subtraction), which means the exact same thing—parentheses are just one type of grouping symbol.
Here's what each step means:
Parentheses (or Grouping Symbols) come first. Do whatever is inside parentheses, brackets, or other grouping symbols before anything else. If you have nested parentheses (parentheses inside parentheses!), work from the inside out.
Exponents are next. Calculate any powers or square roots after you've handled the parentheses.
Multiplication and Division are equal priority, so you work from left to right. Don't automatically do all multiplication before division—just go left to right and do whichever comes first.
Addition and Subtraction are also equal priority. Again, work left to right.
Why Does Order Matter?
Let's see why the order of operations is so important by looking at a simple example:
$$3 + 4 \times 2$$
If you work left to right without thinking about order, you might do: $$3 + 4 = 7$$ $$7 \times 2 = 14$$
But that's wrong! Multiplication comes before addition in PEMDAS, so you should do: $$4 \times 2 = 8$$ $$3 + 8 = 11$$
The correct answer is 11. See how different that is? This is why we all agree to follow the same order—so we all get the same answer.
Working Through Examples
Let's practice with some examples, working step by step.
Example 1: Evaluate \(20 - 3 \times 4\)
Following PEMDAS, multiplication comes before subtraction: $$20 - 3 \times 4$$ $$20 - 12$$ $$8$$
Example 2: Evaluate \(15 \div 3 + 2\)
Division and addition are here. Division comes first: $$15 \div 3 + 2$$ $$5 + 2$$ $$7$$
Example 3: Evaluate \((8 - 3) \times 2\)
Parentheses first, then multiplication: $$(8 - 3) \times 2$$ $$5 \times 2$$ $$10$$
Notice how different this is from \(8 - 3 \times 2\), which would equal \(8 - 6 = 2\). The parentheses completely change the answer!
Example 4: Evaluate \(2^3 + 4 \times 5\)
Exponents first, then multiplication, then addition: $$2^3 + 4 \times 5$$ $$8 + 4 \times 5$$ $$8 + 20$$ $$28$$
A More Complex Example
Let's try something with multiple steps to really see PEMDAS in action.
Example: Evaluate \(18 \div (7 - 4) + 2^2 \times 3\)
Let's work through this carefully, one step at a time:
Step 1 - Parentheses: \(7 - 4 = 3\) $$18 \div 3 + 2^2 \times 3$$
Step 2 - Exponents: \(2^2 = 4\) $$18 \div 3 + 4 \times 3$$
Step 3 - Division (going left to right): \(18 \div 3 = 6\) $$6 + 4 \times 3$$
Step 4 - Multiplication: \(4 \times 3 = 12\) $$6 + 12$$
Step 5 - Addition: \(6 + 12 = 18\)
The final answer is 18.
Multiplication and Division: Left to Right
One thing that trips people up is that multiplication and division have the same priority. You don't do all multiplication first and then all division. Instead, you work from left to right, doing whichever operation comes first.
Example: Evaluate \(20 \div 4 \times 5\)
Working left to right: $$20 \div 4 \times 5$$ $$5 \times 5$$ $$25$$
If you incorrectly did multiplication first, you'd get: $$20 \div 4 \times 5$$ $$20 \div 20$$ $$1$$
That's wrong! Always go left to right for operations of equal priority.
The same rule applies to addition and subtraction.
Example: Evaluate \(10 - 3 + 2\)
Working left to right: $$10 - 3 + 2$$ $$7 + 2$$ $$9$$
Using Order of Operations with Variables
The order of operations applies to algebraic expressions too. When you substitute values for variables, you follow PEMDAS to evaluate the expression.
Example 1: Evaluate \(3x + 2\) when \(x = 5\)
Substitute 5 for \(x\): $$3(5) + 2$$
Now follow PEMDAS—multiplication before addition: $$15 + 2 = 17$$
Example 2: Evaluate \(2(x + 4)\) when \(x = 3\)
Substitute 3 for \(x\): $$2(3 + 4)$$
Parentheses first: $$2(7)$$ $$14$$
Example 3: Evaluate \(x^2 - 2x + 1\) when \(x = 4\)
Substitute 4 for \(x\): $$4^2 - 2(4) + 1$$
Exponents first: $$16 - 2(4) + 1$$
Multiplication next: $$16 - 8 + 1$$
Finally, work left to right with subtraction and addition: $$8 + 1 = 9$$
Practice Problems
Try these on your own, then check your answers below.
- \(6 + 3 \times 4\)
- \((6 + 3) \times 4\)
- \(20 - 12 \div 4\)
- \(5 + 2^3\)
- \(16 \div 4 \times 2\)
- \(3 + 4 \times 2 - 1\)
- Evaluate \(4x - 3\) when \(x = 2\)
- Evaluate \(x^2 + 3x\) when \(x = 5\)
Solutions
- \(6 + 3 \times 4 = 6 + 12 = 18\) (multiply first)
- \((6 + 3) \times 4 = 9 \times 4 = 36\) (parentheses first)
- \(20 - 12 \div 4 = 20 - 3 = 17\) (divide first)
- \(5 + 2^3 = 5 + 8 = 13\) (exponent first)
- \(16 \div 4 \times 2 = 4 \times 2 = 8\) (left to right)
- \(3 + 4 \times 2 - 1 = 3 + 8 - 1 = 11 - 1 = 10\) (multiply, then left to right)
- \(4(2) - 3 = 8 - 3 = 5\)
- \(5^2 + 3(5) = 25 + 15 = 40\)
Common Mistakes to Avoid
Working strictly left to right: The biggest mistake is ignoring PEMDAS and just calculating from left to right. You have to do multiplication and division before addition and subtraction, no matter where they appear in the expression.
Mixing up Multiplication and Division: Remember that multiplication and division are equal priority (work left to right), and addition and subtraction are equal priority (work left to right). Don't always do multiplication before division.
Forgetting about parentheses: Always do what's inside parentheses first, even if it seems like it would be easier to do something else.
Mixing up exponents and multiplication: \(2 \times 3^2\) is not the same as \((2 \times 3)^2\). The first equals \(2 \times 9 = 18\), while the second equals \(6^2 = 36\).
What's Next?
Understanding the order of operations is critical for all the algebra you'll do from here on out. Every time you simplify an expression or solve an equation, you'll need to follow these rules. In our next lesson, we'll look at properties of numbers—special rules that can make calculations easier and help you understand how numbers behave.