The Order of Operations (with Variables)
When an expression includes several operations, you must follow a consistent order so everyone gets the same value. Variables do not change the order; you simply substitute a number for the variable first, then compute using the same rules.
Order to follow
- Parentheses (and grouping symbols like brackets)
- Exponents
- Multiplication and Division from left to right
- Addition and Subtraction from left to right
Important: Multiplication does not always come before division; you do whichever appears first when reading left to right. The same is true for addition and subtraction.
A Copyable Worked-Example Template
Use this template every time you evaluate an expression with a given variable value.
1) Rewrite the expression clearly (add parentheses if helpful). 2) Substitute the given value(s) for the variable(s). 3) Compute in order: parentheses → exponents → ×/÷ left-to-right → +/− left-to-right. 4) State the final value (with units if the problem has them).Template Example 1: Evaluate 2x + 3 when x = 4
1) Rewrite: 2x + 3
2) Substitute: 2(4) + 3
- Listen to the audio with the screen off.
- Earn a certificate upon completion.
- Over 5000 courses for you to explore!
Download the app
3) Compute in order: multiply first (it is multiplication, then addition): 2(4) = 8, so 8 + 3 = 11
4) Final value: 11
Template Example 2: Parentheses change everything
Evaluate both expressions when x = 5.
| Expression | Substitute | Compute in order | Value |
|---|---|---|---|
3x + 2 | 3(5) + 2 | 15 + 2 | 17 |
3(x + 2) | 3(5 + 2) | parentheses first: 5 + 2 = 7, then 3·7 = 21 | 21 |
The expressions look similar, but the parentheses force you to add before multiplying.
Step-by-Step Evaluations with Multiple Operations
Example 3: Multiplication/division left-to-right
Evaluate 18 ÷ 3x when x = 2.
1) Rewrite clearly: 18 ÷ 3x means (18 ÷ 3)·x because division and multiplication are done left-to-right.
2) Substitute: (18 ÷ 3)·2
3) Compute in order: 18 ÷ 3 = 6, then 6·2 = 12
4) Final value: 12
Common mistake: Treating 18 ÷ 3x as 18 ÷ (3x). If you actually mean that, you must write parentheses: 18 ÷ (3x).
Example 4: Addition/subtraction left-to-right
Evaluate 20 - 3x + 4 when x = 2.
Substitute: 20 - 3(2) + 4
Compute: multiply: 3(2)=6, so 20 - 6 + 4. Now go left-to-right: 20 - 6 = 14, then 14 + 4 = 18.
Final value: 18
Common mistake: Doing -6 + 4 first because they are “next to each other.” Without parentheses, you still go left-to-right for + and −.
Example 5: Exponents and negatives (a frequent trap)
Evaluate each expression.
| Expression | Meaning | Value |
|---|---|---|
-3^2 | The exponent applies to 3 only, then the negative sign stays outside: -(3^2) | -(9) = -9 |
(-3)^2 | The exponent applies to the entire negative number inside parentheses | 9 |
Key idea: Parentheses decide what is being squared. If the negative is inside parentheses, it is squared too.
Practice: Spot and Fix Common Mistakes
Mistake Type 1: Ignoring parentheses
Evaluate correctly when x = 3.
4(x - 1) + 24x - 1 + 2
Check yourself: These are not the same expression. In the first one, you must do (x - 1) before multiplying by 4.
Mistake Type 2: Distributing incorrectly during evaluation
Students sometimes try to “distribute” but change signs or forget a term. Evaluate when x = -2:
3(x + 5)-2(x - 4)
Reminder for accuracy: If you distribute, multiply the outside number by every term inside the parentheses, including signs. You can also avoid distributing by substituting first, then doing the parentheses arithmetic.
Mistake Type 3: Mishandling negative numbers
Evaluate when x = -3:
x^2-x^2(-x)^2
Tip: After substitution, add parentheses to make the structure visible. For example, if x = -3, then x^2 becomes (-3)^2.
Self-Check: Where Does Order Matter?
Answer each question and justify the step where order matters (for example: “I did parentheses first because…” or “I squared before multiplying because…”).
- 1) Evaluate
2(x + 3)^2whenx = 1. Which step must happen before multiplying by 2? - 2) Evaluate
16 ÷ 4xwhenx = 2. Explain why left-to-right matters here, and rewrite the expression to show the intended grouping. - 3) Evaluate
10 - 2x - 3whenx = 4. Identify the point where left-to-right affects the result. - 4) Compare
-2^3and(-2)^3. Explain which symbol (parentheses or exponent) changes what is being powered. - 5) A student evaluates
3(x - 2) + 5atx = 6and gets3·6 - 2 + 5 = 21. Identify the first incorrect step and correct the work using the template.