Chapter 8 · Expressions

Several Variables, Exponents and Grouping Symbols

Learn to evaluate expressions that have more than one variable. Then handle exponents and grouping symbols by following the order of operations.

15 min read

An algebraic expression is a math phrase built from numbers, letters and operation signs, such as 4t+14t + 1. Each letter is a variable: it stands for a number. To evaluate an expression, you replace each variable with its given number and then do the arithmetic.

You have already done this with one variable, even when its value was a fraction or a decimal. For example, when t=3t = 3, the expression 4t+14t + 1 becomes 4(3)+1=12+1=134(3) + 1 = 12 + 1 = 13.

Now you will go further. First, you will evaluate expressions with more than one variable. Then you will evaluate expressions that also have parentheses and small raised numbers, like the 22 in n2n^2.

Many situations have more than one quantity that can change. Each quantity gets its own variable.

Think about a quiz game. Each regular question is worth 22 points, and each bonus question is worth 55 points. Let rr be the number of regular questions you get right. Let bb be the number of bonus questions you get right. Then your score, in points, is 2r+5b2r + 5b. Here 2r2r means 22 times rr, and 5b5b means 55 times bb.

To find a score, you substitute: you replace each variable with its number. You may do this because the variable stands for that number, so the expression still describes the same amount. Each variable gets its own value.

When a value lands right next to a number or another value, you still need to show the multiplication. One clear way is to write the value in parentheses: 2(6)2(6) means 22 times 66, but 2626 is a different number.

Worked example

A score with two variables

In the quiz game, your score in points is 2r+5b2r + 5b. Here rr is the number of regular questions you get right, and bb is the number of bonus questions you get right. You get 66 regular questions and 33 bonus questions right. What is your score?

  1. Match each number to its own variable. The variable rr counts regular questions, so r=6r = 6. The variable bb counts bonus questions, so b=3b = 3.

    r=6,b=3r = 6, \quad b = 3
  2. Substitute both values. Each value lands next to a number, so write it in parentheses to show the multiplication.

    2r+5b=2(6)+5(3)2r + 5b = 2(6) + 5(3)
  3. Multiply first, as you do with numbers alone. This fits the game too: 2(6)=122(6) = 12 points come from regular questions, and 5(3)=155(3) = 15 points come from bonus questions.

    2(6)+5(3)=12+152(6) + 5(3) = 12 + 15
  4. Add the two parts to get the whole score.

    12+15=2712 + 15 = 27

Answer

When r=6r = 6 and b=3b = 3, the expression 2r+5b2r + 5b has the value 2727. Your score is 2727 points.

The same steps work for any expression with several variables. Keep three things in mind.

  • When variables sit side by side, you multiply them. So xyxy means xx times yy, just as 3x3x means 33 times xx.
  • Match each value to its own variable. Mixing up two values can change the answer.
  • If a variable appears more than once in an expression, it gets the same value each time.

The expressions in the table use only addition, subtraction, multiplication and division. For expressions like these, multiply and divide first, from left to right. Then add and subtract, from left to right. Every row uses x=8x = 8, y=2y = 2 and z=5z = 5.

Five expressions, each evaluated with x = 8, y = 2 and z = 5
ExpressionSubstitute the valuesDo the arithmeticValue
x+y−zx + y - z
8+2−58 + 2 - 5
10−510 - 5
55
xy+zxy + z
8(2)+58(2) + 5
16+516 + 5
2121
x÷y+zx \div y + z
8÷2+58 \div 2 + 5
4+54 + 5
99
xz−xxz - x
8(5)−88(5) - 8
40−840 - 8
3232
3x−yz3x - yz
3(8)−2(5)3(8) - 2(5)
24−1024 - 10
1414

Expressions can contain two more things. Each one changes what the expression tells you to do.

Grouping symbols hold part of an expression together as one amount. Parentheses, as in (3+n)(3 + n), are grouping symbols. Brackets, as in [3+n][3 + n], do the same job. A fraction bar groups too: it holds together everything above it, and everything below it.

An exponent is the small raised number in an expression like n3n^3. The base is the part that the exponent sits on. It can be a number, a variable, or a whole group in parentheses. A whole-number exponent such as 22 or 33 tells you how many copies of the base to multiply together. So n2n^2 means n⋅nn \cdot n, and n3n^3 means n⋅n⋅nn \cdot n \cdot n. The dot is another way to write times. When you use the exponent 22, you are squaring the base. Every exponent in this lesson is a whole number like these.

The table shows four expressions that look alike. Every row uses n=4n = 4. Watch which part each exponent sits on.

Four expressions that look alike, each evaluated with n = 4
ExpressionWhat it tells you to doWith n = 4Value
3n23n^2
Square nn, then multiply by 33
3(4)2=3(16)3(4)^2 = 3(16)
4848
(3n)2(3n)^2
Multiply 33 by nn, then square the result
(3⋅4)2=122(3 \cdot 4)^2 = 12^2
144144
3+n23 + n^2
Square nn, then add 33
3+42=3+163 + 4^2 = 3 + 16
1919
(3+n)2(3 + n)^2
Add 33 and nn, then square the result
(3+4)2=72(3 + 4)^2 = 7^2
4949

Key concept

Substitute, then follow the order of operations

To evaluate an expression, first substitute: replace every variable with its own value. Then do the operations in the order of operations. Everyone agrees to use this order, so everyone gets the same value.

  1. Grouping symbols. Work out what is inside parentheses or brackets, and above and below a fraction bar. Use this same order inside.
  2. Exponents. Work out each one. It belongs only to its own base.
  3. Multiplication and division, from left to right.
  4. Addition and subtraction, from left to right.

Parentheses around a single number, as in 5(3)5(3), have nothing to work out inside. They only show multiplication. Each step rewrites the expression in a simpler form with the same value.

Worked example

Two variables with exponents

Evaluate 5c2−d35c^2 - d^3 when c=3c = 3 and d=2d = 2.

  1. Substitute 33 for cc and 22 for dd, because those are the given values. The 33 lands next to the 55, so write it in parentheses to show the multiplication.

    5c2−d3=5(3)2−235c^2 - d^3 = 5(3)^2 - 2^3
  2. The parentheses hold a single number, so there is nothing to work out inside them. Do the exponents next. Each exponent belongs only to its own base: 32=3⋅3=93^2 = 3 \cdot 3 = 9 and 23=2⋅2⋅2=82^3 = 2 \cdot 2 \cdot 2 = 8. The 55 is not squared.

    5(3)2−23=5(9)−85(3)^2 - 2^3 = 5(9) - 8
  3. Multiply next, because multiplication comes before subtraction in the order of operations: 5(9)=455(9) = 45.

    5(9)−8=45−85(9) - 8 = 45 - 8
  4. Only subtraction is left, so subtract.

    45−8=3745 - 8 = 37

Answer

When c=3c = 3 and d=2d = 2, the value of 5c2−d35c^2 - d^3 is 3737.

Worked example

Three variables, a group and an exponent

Evaluate 2(h+k)2−3m2(h + k)^2 - 3m when h=1.5h = 1.5, k=2.5k = 2.5 and m=4m = 4.

  1. Substitute the given values, each for its own variable. Keep the parentheses around h+kh + k, because they are part of the expression. Put the 44 in parentheses to show that 33 multiplies it.

    2(h+k)2−3m=2(1.5+2.5)2−3(4)2(h + k)^2 - 3m = 2(1.5 + 2.5)^2 - 3(4)
  2. Work inside the grouping symbols first. Add the decimals: 1.5+2.5=41.5 + 2.5 = 4.

    2(1.5+2.5)2−3(4)=2(4)2−3(4)2(1.5 + 2.5)^2 - 3(4) = 2(4)^2 - 3(4)
  3. Do the exponent before you multiply by 22. The base is the whole group, which is now 44, so 42=4⋅4=164^2 = 4 \cdot 4 = 16.

    2(4)2−3(4)=2(16)−3(4)2(4)^2 - 3(4) = 2(16) - 3(4)
  4. Multiply from left to right, because multiplication comes before subtraction: 2(16)=322(16) = 32 and 3(4)=123(4) = 12.

    2(16)−3(4)=32−122(16) - 3(4) = 32 - 12
  5. Only subtraction is left, so subtract.

    32−12=2032 - 12 = 20

Answer

When h=1.5h = 1.5, k=2.5k = 2.5 and m=4m = 4, the value of 2(h+k)2−3m2(h + k)^2 - 3m is 2020.

u2+vw=32+74=9+74=164=4\frac{u^2 + v}{w} = \frac{3^2 + 7}{4} = \frac{9 + 7}{4} = \frac{16}{4} = 4

Takeaway. To evaluate an algebraic expression, replace every variable with its own value. Then follow the order of operations: grouping symbols first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. An exponent belongs only to its base, so 3n23n^2 and (3n)2(3n)^2 tell you to do different things.

Next, you will evaluate expressions that come from formulas. You will also learn to find mistakes in evaluated expressions.