Learn
Lesson · Foundations of Algebra · Building expressions

Evaluating Expressions

Evaluating means replacing every occurrence of a letter with the same number and then doing arithmetic under the rules of “Order of Operations”. One discipline removes almost every error: write the substituted value inside brackets, every time, whether it looks necessary or not.

x² at x = −3 → (−3)² = 9 −x² at x = −3 → −(−3)² = −9 the minus is not part of the base 2x² at x = 3 → 2·(3²) = 18 not (2·3)² = 36 1/(x − 2) at x = 2 → 1/0, no value at all
Four substitutions, three traps

Core ideas

What this lesson establishes

Substitution looks like the easiest thing in the course, and it produces wrong answers at a rate that says otherwise. The cause is always the same: the value went in without brackets.

1

Substitution replaces the letter, not the structure

Everything else about the expression stays exactly as it was — which operations, in which order, with which brackets. Putting the value in brackets is how you guarantee that, because a negative value squeezed in bare can change what the next operator applies to.

2

Every occurrence of a letter takes the same value

In x² − x at x = −3, both xs are −3. A letter names one number throughout a single evaluation; if two quantities can differ, they need two letters.

3

Not every expression has a value at every number

1/(x − 2) has a value at every x except 2, where the substitution produces a division by zero. "Undefined" is a legitimate and complete answer, and Lines, Functions and Graphs gives the set of numbers that do work a name.

The material

Substituting a number for a letter

One discipline, and the three places it is what saves you.

Definition · Evaluate

To evaluate an expression at given values is to replace every occurrence of each variable by its value and then carry out the arithmetic, using the order of operations from “Order of Operations”.

The result is a single number, or else a statement that the expression has no value there.

The discipline: write the value inside brackets. Not as a precaution to be dropped once you are confident — as the method. The brackets say that the whole value, sign included, is what the surrounding operation applies to, and without them the sign can escape.

x² at x = −3 with brackets (−3)² = (−3)·(−3) = 9 correct without them −3² = −(3·3) = −9 a different value

The second line is not a slip of the pen; it is a correct evaluation of a different string. In −3² the exponent binds more tightly than the minus sign, so it means −(3²). “Order of Operations” settled that, and substitution is where the ruling has consequences.

The minus sign that is part of the expression

Compare two expressions that differ only by brackets. At x = −3:

−x² means −(x²) → −((−3)²) = −(9) = −9 (−x)² means (−x)·(−x) → (−(−3))² = (3)² = 9

Both evaluations are right. They are answers to different questions, and neither is a misreading of the other. In −x² the minus is applied after the squaring, so a negative x gives a negative result; in (−x)² the negation happens first and the square is positive. Knowing which expression you were handed is the whole of it.

Operations that are not written down

3x means 3 · x, so at x = 4 it is 3(4) = 12 and never 34. This is the clearest reason to bracket the substituted value: without brackets the multiplication sign that was invisible when there was a letter there becomes invisible when there is a digit there, and digits written next to each other mean something else entirely. A coefficient is also not part of the base: 2x² is 2·(x²), because the exponent attaches only to the x immediately under it.

2x² at x = 3 → 2·(3²) = 2·9 = 18 (2x)² at x = 3 → (2·3)² = 6² = 36

Several letters, and values that do not exist

With more than one letter, substitute all of them before doing any arithmetic, then evaluate the resulting numerical expression in the usual order:

x² − y² at x = −3, y = 2 → (−3)² − (2)² = 9 − 4 = 5 5 − 2x at x = −4 → 5 − 2(−4) = 5 + 8 = 13 1/(x − 2) at x = 2 → 1/(2 − 2) = 1/0, undefined

The third line is not a failure of the method. Division by zero has no value, so the expression has no value at x = 2, and the correct answer to "evaluate it there" is that you cannot. Every other real number works. Lines, Functions and Graphs calls the set of inputs that work the domain and makes finding it a routine step.

Example · A fraction substituted

2x² − 3x + 1 at x = −1/2. In brackets: 2(−1/2)² − 3(−1/2) + 1. The square is 1/4, so the first term is 2 · 1/4 = 1/2. The second is −3 · (−1/2) = 3/2. Then 1/2 + 3/2 = 2, and 2 + 1 = 3. The value is 3 — exact, with no decimal anywhere in the working.

Interactive

Substitution

Brackets round the value, every time

Substitution
with bracketswithout them

Method

Evaluating an expression

Four steps, and the first one is the only one that is a habit rather than arithmetic.

1

Copy the expression out, replacing each letter with a bracketed value

(−3), not −3. Do this for every occurrence of every letter, and change nothing else about the expression while you do it.

2

Restore the invisible multiplication signs

3x becomes 3(4), which is a product. If you find yourself looking at two digits written next to each other, a multiplication sign has gone missing.

3

Work out the value under the order of operations

Brackets, then exponents, then multiplication and division left to right, then addition and subtraction left to right. “Order of Operations” gave the rule; substitution does not amend it.

4

Say so if there is no value

A division by zero, or an even root of a negative number, means the expression is undefined at that input. Write that down rather than producing a number.

Substitution

Score 0 / 0

Two evaluations that people get wrong

The first is a fraction; the second is the sign trap.

1. 2x² − 3x + 1 at x = −1/2 substitute 2(−1/2)² − 3(−1/2) + 1 exponent (−1/2)² = 1/4 multiply 2 · 1/4 = 1/2 multiply −3 · (−1/2) = 3/2 add 1/2 + 3/2 = 2 add 2 + 1 = 3 answer 3 2. −x² and (−x)² at x = −3 −x² = −((−3)²) = −(9) = −9 (−x)² = (−(−3))² = (3)² = 9

In part 1 the sign work is all in the second multiplication: −3 times −1/2 is +3/2, and dropping that sign gives 0 instead of 3. Everything stays an exact fraction, so nothing is lost to rounding.

Part 2 shows two expressions and two answers, not one expression and a choice. Which one you are evaluating is decided by the brackets printed in the question, and the only way to keep them straight is to carry them through the substitution.

Fade the substitution for 5 − 3x at x = −2: copy it as 5 − 3(−2) and finish from there. The value is 11. An answer of −1 dropped the substituted sign; 16 treated 3x as the two-digit number 3 followed by 2 before subtracting.

Common mistakes

1
Substituting a negative value without bracketsx² at x = −3 written as −3² evaluates to −9, because the exponent binds tighter than the minus. The brackets in (−3)² are what keep the sign inside the base, and they are not optional.
2
Treating the coefficient as part of the base2x² at x = 3 is 18, not 36. The exponent applies to the x alone. (2x)² is the expression that gives 36, and it is a different one.
3
Assuming a value always exists1/(x − 2) has no value at x = 2, and √(x − 5) has no real value at x = 1. Producing a number anyway — usually 0 — is worse than writing "undefined", because it is a wrong answer rather than a correct one.

Check your understanding

✓
Finish when the brackets go in without you deciding to put them there.

Evaluate 4x² − 3xy + y² at x = −1/2, y = −3, writing every substitution in brackets and keeping exact fractions. Then explain how −x², (−x)² and −2x² differ before evaluating any of them. Lines, Functions and Graphs repeats this act under the name f(x).

Note: Evaluating at a single value is also the cheapest check you have. If two expressions are supposed to be equal and they disagree at one number, one of them is wrong — a complete disproof from one line of arithmetic. Agreement at one number is not a proof of anything, which is why a check is a check and not a demonstration.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.