Variables and expressions
Evaluating expressions
Goal: Substitute values and follow the order of operations · 6 min
To evaluate an expression, replace each variable by its value — in brackets, especially when the value is negative — and calculate.
Order of operations: brackets → powers → multiplication/division → addition/subtraction ("PEMDAS"; German: Klammer vor Potenz vor Punkt vor Strich).
Example: for x = −3, 2x² − x = 2·(−3)² − (−3) = 2·9 + 3 = 21. Without brackets you would likely compute −3² = −9 — a classic error, because the power applies before the minus sign.
Worked example: f(x) = 4x − 7 at x = −2
- Substitute: 4·(−2) − 7.
- Multiply first: −8 − 7.
- = −15.