To evaluate an expression is to put a given number in place of each variable and work out the result. This lesson states the procedure exactly, proves that it gives one value or none, shows why each value goes in parentheses (negative numbers, fractions, powers, products written side by side), and treats expressions that have no value for some numbers.
The value of an expression
An algebraic expression such as 6x − 11 is not yet a number: it becomes one when x is given a value (lesson 1.2).
To evaluate an expression is to find its value when each variable is replaced by a given number.[1] The number obtained is the value of the expression at those values of the variables, or “when x = 5”.
The procedure has two steps: substitute, then simplify.[2]
- Substitute. Replace every occurrence of each variable by its value. Put the value in parentheses wherever the reading could change without them: when it is negative, when it is the base of a power and is negative or a fraction, and when it stands next to a number or another factor, as in 3(4) (Section 2).
- Simplify. What remains is a numerical expression. Work it out by the order of operations: grouping symbols and fraction bars from the inside out, then powers, then products and quotients from left to right, then sums and differences from left to right (Order of Operations 1.3, Powers & Square Roots 1.5).[3]
The values may be any rational numbers in the domain of the variables (lesson 1.1). Powers of rational numbers were defined in lesson 1.1, as for whole numbers in Powers & Square Roots 1.1: an is the product of n factors, each equal to a.[4] For example, (34)² = 34 × 34 = 916.
Give each variable of an expression a rational value. Then the procedure either gives exactly one rational number, the value of the expression, or reaches a step that divides by 0; in that case the expression has no value at those values.
After substitution no variable is left: the expression is a numerical expression built from rational numbers with +, −, ×, ÷, opposites and powers. Under the order of operations such an expression is read in exactly one way, as if it were fully grouped (Order of Operations 1.3, extended to integers in Integers 3.5 and to powers in Powers & Square Roots 1.5). So the steps are determined, and each one acts on rational numbers. A sum, difference or product of rational numbers is a rational number, and so is a quotient whose divisor is not 0 (Rational Numbers 1.3); a power is a repeated product. So every step has exactly one result, except a division by 0, which has none (Division 1.3). If no such step occurs, one number remains at the end.
The expression
5x² − xput in x = −2
5(−2)² − (−2)order of operations: 22
Evaluate 6x − 11 when x = 5.
- Substitute: 6(5) − 11. The parentheses show that 6 and 5 are multiplied; “65” would be sixty-five.
- Multiplication first: 6(5) = 30. Line: 30 − 11.
- Subtract: 30 − 11 = 19.
Answer: 19.
Evaluate x² − 6x + 11 when x = 8.
- Substitute in every place: 8² − 6(8) + 11.
- Power first: 8² = 64. Line: 64 − 6(8) + 11.
- Then the product: 6(8) = 48. Line: 64 − 48 + 11.
- Left to right: 64 − 48 = 16, then 16 + 11 = 27.
Answer: 27. Every x received the same value, 8, as a letter means one number throughout an expression.
Parentheses around the values
When a negative number replaces a letter, it is written in parentheses, so that the operation in front of it stays visible.[5] The same care is needed whenever the written form of the value could join with its neighbors. Three cases come up again and again.
- Juxtaposition. In 3x the value of x is a factor: at x = 4 it is 3(4) = 12, at x = −4 it is 3(−4) = −12.
- Subtraction. In 10 − x at x = −3 the expression is 10 − (−3) = 13: the first sign is subtraction, the second belongs to the value (Integers 3.5).
- Powers. An exponent applies only to what stands immediately before it.[6] At x = −3, x² is (−3)² = 9, the square of −3; written without parentheses, −3² would mean −(3²) = −9.[7]
For every rational number x: (−x)² = x², and −x² = −(x²). The two expressions (−x)² and −x² have the same value only for x = 0.
By the rules for opposites in products (Rational Numbers 1.4), (−x) · (−x) = −(x · (−x)) = −(−(x · x)) = x · x, so (−x)² = x². In −x² the exponent applies to x alone, so it is the opposite of x².
Now (−x)² = −x² means x² = −(x²). Adding x² to both sides gives 2x² = 0. By the zero-product property (Rational Numbers 1.4), since 2 ≠ 0, x² = 0, that is, x · x = 0, and by the same property x = 0. Conversely, at x = 0 both are 0.
Evaluate 2 − 7x when x = −3.
- Substitute with parentheses: 2 − 7(−3).
- Multiplication first: 7(−3) = −21. Line: 2 − (−21).
- Subtracting is adding the opposite: 2 + 21 = 23.
Answer: 23. Without parentheses, “2 − 7 − 3” would be read as two subtractions and give −8.
Evaluate x², (−x)² and −x² when x = −3.
- x²: (−3)² = (−3)(−3) = 9.
- (−x)²: the opposite of −3 is 3, so (−(−3))² = 3² = 9.
- −x²: the square first, (−3)² = 9, then the opposite: −9.
Answer: 9, 9 and −9, as the Proposition predicts for x ≠ 0.
Evaluate 6x² − x when x = 12.
- Substitute: 6(12)² − 12. The parentheses make the whole fraction the base of the square.
- Power: (12)² = 12 × 12 = 14. Line: 6(14) − 12.
- Product: 6 × 14 = 64 = 32. Line: 32 − 12.
- Difference: 32 − 12 = 22 = 1.
Answer: 1.
Someone evaluates −x² + 10 at x = −4 and gets 26, reasoning “negative times negative is positive”. Find the mistake.
- The exponent applies to x alone, so substitute only there: −(−4)² + 10.
- Power first: (−4)² = 16. Then the opposite: −16. Line: −16 + 10.
- Sum: −16 + 10 = −6.
- The answer 26 squared −x instead of x: it computed (−(−4))² + 10 = 16 + 10.
Answer: −6. The minus sign in front of x² is applied after the square, whatever the sign of x.
Several variables
When an expression has several variables, each one is replaced by its own value.[8] Every occurrence of the same letter receives the same value, and different letters may have different values or equal ones (lesson 1.1).
Evaluate 2a² − ab when a = −2 and b = 3.
- Substitute: 2(−2)² − (−2)(3).
- Power first: (−2)² = 4. Line: 2(4) − (−2)(3).
- Products from the left: 2(4) = 8 and (−2)(3) = −6. Line: 8 − (−6).
- 8 − (−6) = 8 + 6 = 14.
Answer: 14.
Lesson 1.2 wrote the cost of joining a club and making v visits as 20 + 6v dollars. Make a table of the cost for v = 0, 1, 2, 3, 4.
| v | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| 20 + 6v | 20 | 26 | 32 | 38 | 44 |
- v = 0: 20 + 6(0) = 20 + 0 = 20, the joining fee alone.
- v = 3: 20 + 6(3) = 20 + 18 = 38.
- Each further visit adds 6, since v enters only through 6v.
Answer: 20, 26, 32, 38 and 44 dollars.
When an expression has no value
Division by zero is undefined.[9] So an expression that divides by a part containing a variable has no value at the values that make that part 0. Such values are excluded from the domain, and the exclusion is stated: “for x ≠ 5”. Wu’s introduction to algebra makes the same assumptions explicitly, to avoid dividing by 0.[10] A value can also lie outside the domain for another reason: if v is a number of visits, 20 + 6v has a value at v = 2.5, but that value describes no actual cost.
Evaluate x + 3x − 5 when x = 5 and when x = −3.
- x = 5: the bar groups, so numerator and denominator come first: 5 + 3 = 8 and 5 − 5 = 0. The last step would be 8 ÷ 0, which is undefined. The expression has no value at x = 5.
- x = −3: numerator −3 + 3 = 0, denominator −3 − 5 = −8. Then 0 ÷ (−8) = 0. A numerator of 0 is allowed.
Answer: no value at 5; the value 0 at −3. Only a zero denominator makes the expression undefined.
For which integers x from −3 to 3 does 12x² − 1 have no value? Evaluate it at the others.
- The denominator x² − 1 at −3, −2, −1, 0, 1, 2, 3 is 8, 3, 0, −1, 0, 3, 8 (for example (−2)² − 1 = 4 − 1 = 3 and 0² − 1 = −1).
- It is 0 at x = −1 and at x = 1: there the expression has no value.
- Elsewhere: 12 ÷ 8 = 32 at ±3, 12 ÷ 3 = 4 at ±2, and 12 ÷ (−1) = −12 at 0.
Answer: no value at −1 and 1. Squaring hides the sign of x, so a value and its opposite give the same denominator.
Evaluate it
- Round
- 1
- Score
- 0
- Streak
- 0
Find the value of the expression for the given values, or say that it has none.
for a = −4,b = −4
What values can show
A table of values compares two expressions at the numbers in the table, and only there. Two expressions may agree at some values and differ at others.
| x | −1 | 0 | 1 | 2 | 3 |
|---|---|---|---|---|---|
| x² | 1 | 0 | 1 | 4 | 9 |
| 3x − 2 | −5 | −2 | 1 | 4 | 7 |
For a rational number x, x² and 3x − 2 have the same value exactly when x = 1 or x = 2.
The values are equal exactly when x² − 3x + 2 = 0 (subtract 3x − 2 from both sides). By the distributive law with both factors split (Multiplication 1.7, valid for rational numbers by Rational Numbers 1.4), (x − 1)(x − 2) = x² − 2x − x + 2 = x² − 3x + 2. By the zero-product property, (x − 1)(x − 2) = 0 exactly when x − 1 = 0 or x − 2 = 0, that is, when x = 1 or x = 2.
So a table that showed only x = 1 and x = 2 would suggest that the two expressions are the same, and it would be wrong: at x = 0 they are 0 and −2. One value at which two expressions differ proves that they do not always agree; any number of values at which they agree proves nothing about the others, as with statements in lesson 1.1. Expressions that name the same number whatever values are substituted are called equivalent.[11]
Lesson 1.4, “Equivalent expressions”, shows how to prove that two expressions agree for every value, with the laws of arithmetic instead of tables.
Exercises
Evaluate 12y − 50 when y = 5.
▸ Show solution
Substitute: 12(5) − 50 = 60 − 50 = 10.
Evaluate when t = −4: (a) 2t²; (b) (2t)²; (c) −t²; (d) 2 − t.
▸ Show solution
(a) 2(−4)² = 2(16) = 32. (b) (2(−4))² = (−8)² = 64. (c) −(−4)² = −16. (d) 2 − (−4) = 6.
Evaluate 3m² + 6m when m = .
▸ Show solution
Substitute: 3()² + 6(). The power: ()² = 49. Products: 3 × 49 = 43 and 6 × () = −4. Sum: 43 + (−4) = 43 − 123 = .
Evaluate pq − q² + 3p when p = −1 and q = 5.
▸ Show solution
Substitute: (−1)(5) − (5)² + 3(−1) = −5 − 25 + (−3). From the left: −5 − 25 = −30, then −30 + (−3) = −33.
At which rational x does x − 12x + 6 have no value? Evaluate it at x = 0 and x = 1.
▸ Show solution
The denominator 2x + 6 is 0 when 2x = −6, that is, x = −3: there the expression has no value. At x = 0: (0 − 1)/(0 + 6) = . At x = 1: 0/8 = 0.
Someone checks that (x + 1)² and x² + 1 are both 1 at x = 0 and concludes that they are equal for every x. Is this right? For which rational x are they equal?
▸ Show solution
No. At x = 0 both are 1: (0 + 1)² = 1 = 0² + 1. But at x = 1, (1 + 1)² = 4 while 1² + 1 = 2, so they differ, and one such value is enough to show that they are not equal for every x. In general (x + 1)² = x² + 2x + 1 by the distributive law, which equals x² + 1 exactly when 2x = 0, that is, only at x = 0.
Summary
- To evaluate an expression, replace every occurrence of each variable by its value, then work out the numerical expression by the order of operations.
- The result is exactly one number, unless some step divides by 0; then the expression has no value at those values, and they are excluded from the domain.
- Each value goes in parentheses where it could otherwise join its neighbors: 3(4), 10 − (−3), (−3)². The exponent in −x² applies to x alone, so −x² is never positive, while (−x)² = x².
- Each letter gets its own value, the same in every place it occurs.
- One value at which two expressions differ shows that they are not always equal; values at which they agree never prove that they always do.
Sources
- 1.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).Chapter 1, “Foundations”, section 1.2, “Use the Language of Algebra” (“Evaluate an Expression”), p. 29 (the whole topic: pp. 29–31).
“To evaluate an expression means to find the value of the expression when the variable is replaced by a given number.”
Used for: the definition of evaluating an expression and of its value. - 2.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).Chapter 1, “Foundations”, section 1.2, “Use the Language of Algebra” (“Evaluate an Expression”), p. 29 (the whole topic: pp. 29–31).
“To evaluate an expression, substitute that number for the variable in the expression and then simplify the expression.”
Used for: the procedure: substitute, then simplify. - 3.National Governors Association Center for Best Practices and Council of Chief State School Officers, “Common Core State Standards for Mathematics”, Common Core State Standards Initiative (2010).Section “Expressions and Equations, standard 6.EE.2c (p. 44)”. corestandards.org/wp-content/uploads/2023/09/Math_Standards1.pdf · open at the quoted passage.
“Perform arithmetic operations, including those involving whole-number exponents, in the conventional order when there are no parentheses to specify a particular order (Order of Operations).”
Used for: after substitution, the operations, powers included, are carried out in the conventional order (the standard begins “Evaluate expressions at specific values of their variables”). - 4.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).Chapter 1, “Foundations”, section 1.2, “Use the Language of Algebra” (“Use Variables and Algebraic Symbols”), p. 25 (the whole topic: pp. 25–26).
“an means multiply a by itself, n times.”
Used for: a power aⁿ is the product of n factors equal to a, for any number a, as defined in lesson 1.1 (the source prints aⁿ with a raised n). - 5.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).Chapter 3, “Integers”, section 3.4, “Multiply and Divide Integers” (“Evaluate Variable Expressions with Integers”, Example 3.56), p. 228 (the whole topic: pp. 228–229).
“we use parentheses to show the multiplication”
Used for: when a negative number is substituted for a letter, it is written in parentheses, so that the operation stays visible (the source: “Without parentheses, it would look like …”). - 6.Paul Dawkins, “Algebra: Integer Exponents”, Paul’s Online Notes, Lamar University.Section “Integer Exponents”. tutorial.math.lamar.edu/Classes/Alg/IntegerExponents.aspx · open at the quoted passage.
“When performing exponentiation remember that it is only the quantity that is immediately to the left of the exponent that gets the power.”
Used for: an exponent applies only to what stands immediately before it. - 7.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).Chapter 10, “Polynomials”, section 10.2, “Use Multiplication Properties of Exponents” (“Simplify Expressions with Exponents”), Example 10.13, p. 790 (the whole topic: pp. 789–790).
“In part ⓐ the parentheses tell us to raise the (−3) to the 4th power. In part ⓑ we raise only the 3 to the 4th power and then find the opposite.”
Used for: with parentheses the whole negative number is raised to the power; without them only the number after the sign is, and then the opposite is taken. - 8.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).Chapter 3, “Integers”, section 3.4, “Multiply and Divide Integers” (“Evaluate Variable Expressions with Integers”), p. 228 (the whole topic: pp. 228–229).
“Remember that to evaluate an expression, substitute the numbers in place of the variables, and then simplify.”
Used for: with several variables, each is replaced by its own number. - 9.Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Elementary Algebra (2nd ed., OpenStax, Rice University, 2020).Chapter 1, “Foundations”, section 1.9, “Properties of Real Numbers” (“Use the Properties of Zero”), p. 152 (the whole topic: pp. 151–153).
“Division by zero is undefined.”
Used for: division by zero is undefined, so an expression has no value where a denominator is 0. - 10.H. Wu, Introduction to School Algebra (draft of July 24, 2010, Department of Mathematics, University of California, Berkeley, 2010).Chapter 1, “Symbolic Expressions”, section “Expressions and identities”, p. 12 (the whole topic: pp. 12–13).
“in the second expression to avoid dividing by 0”
Used for: values that make a denominator 0 are excluded explicitly (p. 12: Wu assumes y ≠ 0 and z ≠ 0 for an expression with those denominators). - 11.National Governors Association Center for Best Practices and Council of Chief State School Officers, “Common Core State Standards for Mathematics”, Common Core State Standards Initiative (2010).Section “Expressions and Equations, standard 6.EE.4 (p. 44)”. corestandards.org/wp-content/uploads/2023/09/Math_Standards1.pdf · open at the quoted passage.
“Identify when two expressions are equivalent (i.e., when the two expressions name the same number regardless of which value is substituted into them).”
Used for: expressions that name the same number whatever values are substituted are called equivalent.