To evaluate an expression, put in a number for each variable you wrote and work it out with the order of operations.
Key idea
Substitute: replace each variable with its value, in parentheses if that helps. Then simplify in the usual order. $3x + 5$ when $x = 4$ is $3(4) + 5 = 17$.
Why it works
A variable stands for a number. Once you know the number, the expression is an ordinary numerical expression, so all the rules you already know apply. Writing the value in parentheses keeps the operations visible: $3x$ with $x = 4$ becomes $3(4)$, which means $3 \times 4$, not the number 34.
| $x$ | 0 | 1 | 2 | 4 | 10 |
|---|---|---|---|---|---|
| $3x + 5$ | 5 | 8 | 11 | 17 | 35 |
Worked example: A linear expression
Evaluate $3x + 5$ when $x = 4$.
- Substitute: $3(4) + 5$.
- Multiply first: $12 + 5$.
- Add: $17$.
Answer: $17$
Worked example: A formula
The perimeter of a rectangle is $P = 2\ell + 2w$. Find $P$ when $\ell = 8$ cm and $w = 3.5$ cm.
- Substitute: $P = 2(8) + 2(3.5)$.
- Multiply: $16 + 7$.
- Add: $23$.
Answer: $23$ cm
Worked example: An exponent in a formula
The surface area of a cube is $A = 6s^2$. Find $A$ when $s = 3$.
- Substitute: $A = 6(3)^2$.
- Exponent first: $3^2 = 9$.
- Multiply: $6 \times 9 = 54$. (Not $18^2$.)
Answer: $54$ square units
Common mistake
Gluing the digits together: reading $3x$ with $x = 4$ as 34. A number next to a variable always means multiply. Quick check: write the value in parentheses, $3(4)$, before you compute.