Sub topic 1
Order of Operations and Parentheses: The Foundation
Prerequisites
Assume you can work with integers, fractions, decimals, exponents, and basic algebraic expressions. You should also know how to solve a simple one-variable equation. This chapter uses PEMDAS: parentheses, exponents, multiplication and division, and addition and subtraction.
A made-up operation is evaluated by following its definition exactly. The symbol itself does not have a standard meaning. For example, suppose
a \star b = 2a+b^2.The rule says to multiply the first input by 2, square the second input, and add the results. It does not mean ordinary multiplication.
Why Parentheses Matter
Parentheses show which expression should be treated as one input or calculated first. They are especially important with negative numbers, fractions, and nested operations.
For example:
(-3)^2=9because the entire number \(-3\) is squared. However,
-3^2=-9because the exponent applies to 3 before the negative sign.
The same distinction appears when substituting into a rule. If \(a=-3\), then \(a^2\) becomes
(-3)^2,not \(-3^2\).
The Evaluation Order
Use this sequence:
- Evaluate expressions inside parentheses.
- Evaluate exponents and roots.
- Multiply and divide from left to right.
- Add and subtract from left to right.
Multiplication does not always come before division. They have equal priority, so work from left to right. Addition and subtraction also have equal priority.
For example:
18\div 3\cdot 2=6\cdot 2=12.It is incorrect to do the multiplication first simply because the multiplication symbol appears later.
When a defined operation contains several steps, use this same order after substitution:
a\star b=2a+b^2so
3\star 4=2(3)+4^2=6+16=22.The parentheses around 3 make the substitution visible. They are not required when the input is positive and simple, but keeping them can prevent errors.
A Reliable Substitution Routine
For an expression involving a defined operation:
- Copy the definition.
- Put each input in parentheses.
- Substitute in the correct position.
- Evaluate from the inside out.
- Check signs and exponents.
Consider
a\star b=2a+b^2and evaluate \((-2)\star(-3)\):
(-2)\star(-3)=2(-2)+(-3)^2.Now calculate the exponent and multiplication:
-4+9=5.The answer is 5. Dropping the parentheses around \(-3\) could produce \(-3^2=-9\), leading to the incorrect result \(-13\).
The routine can be represented as follows.
Applying the Rule in Python
A function in Python can model the definition. The ** operator means exponentiation.
def star(a, b):
return 2 * a + b ** 2
print(star(3, 4)) # 22
print(star(-2, -3)) # 5The function applies the rule to the inputs in their given positions. Python also follows the same basic order of operations, so the code mirrors the mathematical work.
Common Errors
| Error | What goes wrong | Correct approach |
|---|---|---|
| Writing `-3^2` for \((-3)^2\) | The negative sign may remain outside the square | Use parentheses around the negative input |
| Swapping inputs | The first and second positions may have different rules | Keep each value in its defined position |
| Ignoring inner parentheses | A nested expression is evaluated in the wrong order | Start with the innermost expression |
| Doing multiplication before division automatically | Equal-priority operations are evaluated left to right | Scan from left to right |
| Giving a symbol its familiar meaning | A made-up operation may not mean multiplication | Replace it with the definition first |
The main habit is to write an intermediate line instead of calculating mentally in one step. That line exposes misplaced signs, missing parentheses, and swapped inputs.
Exercise
If a ★ b = 3a - b^2, evaluate (-2) ★ (-4).
Show answer
Substitute carefully: 3(-2) - (-4)^2 = -6 - 16 = -22.