Evaluating expressions with a variable
To evaluate an expression means to compute its value once you know the variable. Substitute the number for the letter and follow the order of operations.
The method
- Replace each occurrence of the variable with the given number.
- Use the order of operations: brackets first, then multiplication/division, then addition/subtraction.
Examples
Evaluate `3x + 4` when `x = 5`.- Substitute: `3 · 5 + 4`.
- Multiply first: `15 + 4`.
- Add: 19.
- Substitute: `2 · 6 − 7`.
- Multiply: `12 − 7`.
- Subtract: 5.
- Substitute: `12 ÷ 3 + 8`.
- Divide: `4 + 8`.
- Add: 12.
Order of operations — reminder
Brackets → exponents → multiplication/division → addition/subtraction.
Operations at the same level go left-to-right.
Common traps
- 3x means 3 · x. Many beginners write `35` for `3x` when `x = 5`. The correct value is `3 · 5 = 15`.
- Sign of the variable. If `x = −4`, the expression `2x + 1` is `2 · (−4) + 1 = −7`. Use brackets when substituting a negative.
- Order matters. `3 + 4 · 2` is `3 + 8 = 11`, not `(3 + 4) · 2 = 14`.