Chapter 3 · Algebraic foundations

Evaluating Expressions: Powers, Roots and Absolute Value

Substitute values for variables and compute in the correct order, including powers, square roots, cube roots and absolute values.

20 min read

A variable is a letter, such as xx, that stands for a number. A variable expression combines numbers, variables and operations, as in 3x−43x - 4. You already know that the coefficient 33 in 3x3x means 33 times xx.

On its own, 3x−43x - 4 is a rule waiting for a number: multiply the number by 3, then subtract 4. To evaluate an expression means to find the number it equals when each variable has a given value. To do that you substitute: you replace each variable with its given value, and then you do the arithmetic.

The table shows that different values of xx can give different results.

One expression evaluated for three values of the variable
Value of the variableSubstituteAfter multiplyingValue of the expression
55
3(5)−43(5) - 4
15−415 - 4
1111
00
3(0)−43(0) - 4
0−40 - 4
−4-4
−2-2
3(−2)−43(-2) - 4
−6−4-6 - 4
−10-10

Two habits keep substitution safe.

  • Write the value in parentheses. For x=5x = 5, write 3(5)3(5), not 3535, so the multiplication stays visible. For x=−2x = -2, write 3(−2)3(-2), so the negative sign stays attached to the 22.
  • Keep the order of operations. Multiply and divide from left to right before you add and subtract from left to right. That is why every row of the table multiplies first.

In the middle row, 3(0)=03(0) = 0 because zero times any number is zero. The value of the expression is still −4-4, because subtracting 44 is still part of the rule.

Worked example

Two variables and a negative value

Evaluate 3a−2b+53a - 2b + 5 for a=4a = 4 and b=−3b = -3.

  1. Replace each variable with its given value, written in parentheses. The parentheses keep the negative sign attached to the 3.

    3(4)−2(−3)+53(4) - 2(-3) + 5
  2. Multiply before you add or subtract. 3 times 4 is 12. A positive number times a negative number is negative, so 2 times negative 3 is negative 6.

    12−(−6)+512 - (-6) + 5
  3. Subtracting a number is the same as adding its opposite, the number at the same distance from 0 on the other side of the number line. The opposite of negative 6 is 6, so the subtraction becomes an addition.

    12+6+512 + 6 + 5
  4. Add from left to right: 12 plus 6 is 18, and 18 plus 5 is 23.

    18+5=2318 + 5 = 23

Answer

When a=4a = 4 and b=−3b = -3, the value of 3a−2b+53a - 2b + 5 is 2323.

A power is a short way to write repeated multiplication. In ana^n, the base aa is the number you multiply, and the exponent nn tells how many copies of the base are multiplied together. Each copy is called a factor. In this lesson the exponent is a positive whole number, so 23=2⋅2⋅2=82^3 = 2 \cdot 2 \cdot 2 = 8 and x2=x⋅xx^2 = x \cdot x. The second power of a number is its square and the third power is its cube.

The result of a multiplication is a product, and its sign depends on its factors. Negative factors pair up, and each pair multiplies to a positive number. So when no factor is zero, an even number of negative factors gives a positive product, and an odd number gives a negative product. That is why (−2)4=16(-2)^4 = 16 is positive and (−2)3=−8(-2)^3 = -8 is negative.

An exponent belongs only to the number, variable or parentheses directly in front of it. In (−3)2(-3)^2 the parentheses make −3-3 the base. In −32-3^2 the base is only 33, and the negative sign takes the opposite of the result afterwards. The table compares the two.

Parentheses decide what the base is
ExpressionBaseWritten outValue
(−3)2(-3)^2
−3-3
(−3)(−3)(-3)(-3)
99
−32-3^2
33
−(3⋅3)-(3 \cdot 3)
−9-9
(−3)3(-3)^3
−3-3
(−3)(−3)(−3)(-3)(-3)(-3)
−27-27
−33-3^3
33
−(3⋅3⋅3)-(3 \cdot 3 \cdot 3)
−27-27

Worked example

A negative value inside two powers

Evaluate 2x2−x32x^2 - x^3 for x=−3x = -3.

  1. Replace the variable with negative 3, in parentheses, both times it appears. The parentheses make all of negative 3 the base of each power.

    2(−3)2−(−3)32(-3)^2 - (-3)^3
  2. Compute the powers first. Every factor is negative 3, so no factor is zero. The square has two negative factors, an even number, so it is positive 9. The cube has three negative factors, an odd number, so it is negative 27.

    (−3)2=(−3)(−3)=9,(−3)3=(−3)(−3)(−3)=−27(-3)^2 = (-3)(-3) = 9, \quad (-3)^3 = (-3)(-3)(-3) = -27
  3. Put the powers back, then multiply. The exponent 2 belongs only to the parentheses in front of it, not to the coefficient 2, so the coefficient multiplies the finished power: 2 times 9 is 18.

    2(9)−(−27)=18−(−27)2(9) - (-27) = 18 - (-27)
  4. Subtract by adding the opposite. The opposite of negative 27 is 27, and 18 plus 27 is 45.

    18+27=4518 + 27 = 45

Answer

When x=−3x = -3, the value of 2x2−x32x^2 - x^3 is 4545.

A root asks a power question in reverse: which number, squared or cubed, gives this result?

The square root of nn, written n\sqrt{n}, is the number that is zero or positive and whose square is nn. It is defined for n≥0n \ge 0. So 25=5\sqrt{25} = 5, because 52=255^2 = 25 and 55 is positive. It is true that (−5)2=25(-5)^2 = 25 too, but the symbol 25\sqrt{25} names only 55. A negative number has no real square root, because squaring any real number, a number on the number line, gives zero or a positive result.

The cube root of nn, written n3\sqrt[3]{n}, is the number whose cube is nn. Every real number has exactly one real cube root: positive for a positive number, negative for a negative number, and 00 for 00. So 83=2\sqrt[3]{8} = 2 because 23=82^3 = 8, and −83=−2\sqrt[3]{-8} = -2 because (−2)3=−8(-2)^3 = -8.

A root symbol also groups. Work out everything under it before you take the root. Every root in this lesson comes out exactly, so no rounding is needed.

Worked example

A square root and a cube root

Evaluate a+9−b3\sqrt{a + 9} - \sqrt[3]{b} for a=16a = 16 and b=−8b = -8.

  1. Replace each variable with its given value, written in parentheses, so each value stays together as one number.

    (16)+9−(−8)3\sqrt{(16) + 9} - \sqrt[3]{(-8)}
  2. A root symbol groups, so add under the square root first: 16 plus 9 is 25. That amount is not negative, so the square root is defined.

    25−−83\sqrt{25} - \sqrt[3]{-8}
  3. Take each root. 5 squared is 25 and 5 is not negative, so the square root of 25 is 5. Negative 2 cubed is negative 8, so the cube root of negative 8 is negative 2.

    5−(−2)5 - (-2)
  4. Subtract by adding the opposite of negative 2, which is 2.

    5+2=75 + 2 = 7

Answer

When a=16a = 16 and b=−8b = -8, the value of a+9−b3\sqrt{a + 9} - \sqrt[3]{b} is exactly 77.

The absolute value of a number is its distance from 00 on the number line. A distance is never negative, so an absolute value is never negative. You write it with two vertical bars: ∣5∣=5\lvert 5 \rvert = 5 and ∣−5∣=5\lvert -5 \rvert = 5, because 55 and −5-5 are each 55 units from 00. Also, ∣0∣=0\lvert 0 \rvert = 0.

In an expression, the bars are grouping symbols. First find the single number between the bars, then take its distance from 00. Anything outside the bars waits. In −∣x∣-\lvert x \rvert the negative sign is outside, so it takes the opposite after the absolute value is found.

The table evaluates five expressions for x=−7x = -7. Compare the second and third rows: moving the 33 outside the bars changes the result.

Five absolute value expressions when the variable is negative 7
ExpressionSubstituteNumber between the barsValue
∣x∣\lvert x \rvert
∣(−7)∣\lvert (-7) \rvert
−7-7
∣−7∣=7\lvert -7 \rvert = 7
∣x+3∣\lvert x + 3 \rvert
∣(−7)+3∣\lvert (-7) + 3 \rvert
(−7)+3=−4(-7) + 3 = -4
∣−4∣=4\lvert -4 \rvert = 4
∣x∣+3\lvert x \rvert + 3
∣(−7)∣+3\lvert (-7) \rvert + 3
−7-7
7+3=107 + 3 = 10
−∣x∣-\lvert x \rvert
−∣(−7)∣-\lvert (-7) \rvert
−7-7
−(7)=−7-(7) = -7
∣−x∣\lvert -x \rvert
∣−(−7)∣\lvert -(-7) \rvert
−(−7)=7-(-7) = 7
∣7∣=7\lvert 7 \rvert = 7

Key concept

Substitute in parentheses, then compute in order

Every evaluation uses the same plan.

  1. Substitute. Replace each variable with its given value, written in parentheses. The value must be allowed: no divisor may be 00, and nothing under a square root symbol may be negative.
  2. Finish the groups. Work inside parentheses, the top and bottom of a fraction, under a root symbol and between absolute value bars. Once the bars hold a single number, take its absolute value.
  3. Compute powers and roots.
  4. Multiply and divide from left to right.
  5. Add and subtract from left to right.

The result is the value of the expression for those values of the variables.

Worked example

A power, an absolute value and a root together

Evaluate ∣x3+2∣−2y−x\lvert x^3 + 2 \rvert - 2\sqrt{y - x} for x=−3x = -3 and y=13y = 13.

  1. Replace each variable with its given value, written in parentheses, so that all of negative 3 is the base of the power.

    ∣(−3)3+2∣−2(13)−(−3)\lvert (-3)^3 + 2 \rvert - 2\sqrt{(13) - (-3)}
  2. Work between the bars, power first. Negative 3 cubed has three negative factors, an odd number, and no zero factor, so it is negative 27. Then negative 27 plus 2 is negative 25.

    (−3)3+2=−27+2=−25(-3)^3 + 2 = -27 + 2 = -25
  3. Work under the root symbol. Subtracting negative 3 means adding its opposite, 3, so the amount is 13 plus 3, which is 16. It is not negative, so the square root is defined.

    (13)−(−3)=13+3=16(13) - (-3) = 13 + 3 = 16
  4. Each group now holds a single number. Negative 25 is 25 units from 0, so its absolute value is 25. The square root of 16 is 4, because 4 squared is 16 and 4 is not negative.

    ∣−25∣−216=25−2(4)\lvert -25 \rvert - 2\sqrt{16} = 25 - 2(4)
  5. Multiply before you subtract: 2 times 4 is 8. Then 25 minus 8 is 17.

    25−8=1725 - 8 = 17

Answer

When x=−3x = -3 and y=13y = 13, the value of ∣x3+2∣−2y−x\lvert x^3 + 2 \rvert - 2\sqrt{y - x} is 1717.

Takeaway. To evaluate an expression, substitute each given value in parentheses, then compute in order: grouping symbols first, then powers and roots, then multiplication and division, then addition and subtraction. Parentheses protect a negative value, so (−3)2=9(-3)^2 = 9 while −32=−9-3^2 = -9. For n≥0n \ge 0, the symbol n\sqrt{n} names only the root that is zero or positive. The cube root of a negative number is negative. An absolute value is a distance from 00, so it is never negative.