topic badge

1.07 Evaluating algebraic expressions


The substitution property

As we have seen before, we often use variables as a placeholder for an unknown value. We will now look at how we can replace the variable with the known value using substitution. 

Sometimes we need to substitute bills for coins

Consider that some vending machines will only take some types of coins or bills, so we may need to ask for change or if anyone could swap a one dollar bill for four quarters. Just like we swap money denominations, we can substitute in for variables.

Substitution property of equality

If $x=y$x=y, then $x$x can be substituted in for $y$y in any equation, and $y$y can be substituted in for $x$x in any equation.

More simply, if $x=y$x=y, then $x$x can replace $y$y and $y$y can replace $x$x.

Suppose $x=y$x=y, then if $x+2=10$x+2=10, we have that $y+2=10$y+2=10.



In an algebraic expression, the term $3x$3x means $3\times x$3×x.
So if we substituted $x=4$x=4 into the equation then the term is equal to $3\times4=12$3×4=12 and not $34$34.


Worked examples

Question 1

Find the value of $x+7$x+7 when $x=-10$x=10.

Think: We need to substitute in $-10$10 wherever there is an $x$x and then evaluate.




$=$= $-10+7$10+7

Performing the substitution

$=$= $-3$3

Simplifying the addition


Question 2

The temperature $F$F in degrees Fahrenheit is found using the formula $F=\frac{9}{5}C+32$F=95C+32 where $C$C is the temperature in degrees Celsius. Find $F$F when $C=100$C=100.

Think: There is more than one operation, so after we substitute, we need to be sure to use our order of operations


$F$F $=$= $\frac{9}{5}C+32$95C+32

Given formula

  $=$= $\frac{9}{5}\times100+32$95×100+32

Substitution of $C=100$C=100

  $=$= $9\times20+32$9×20+32

Simplifying $\frac{100}{5}=20$1005=20

  $=$= $180+32$180+32

Simplifying $9\times20=180$9×20=180

  $=$= $212$212

Performing the addition


Question 3

Substitute $x=3$x=3 and $y=-4$y=4 into the expression $x^2-y+5$x2y+5.

Think: We need to be careful when substituting in the negative value for y, it is helpful to use parentheses to make sure we don't lose the negative.




$=$= $3^2-\left(-4\right)+5$32(4)+5

Substituting in $x=3$x=3 and $y=-4$y=4

$=$= $9-\left(-4\right)+5$9(4)+5

Order of operations says to square first

$=$= $9+4+5$9+4+5

Using adjacent signs

$=$= $13+5$13+5

Working left to right

$=$= $18$18

Working left to right


Question 4

Consider the following equation.


What is the value of $P$P if $Q=4$Q=4?

Think: We are trying to solve the equation for $P$P and we are given the value of $Q$Q so we can substitute in $4$4 for $Q$Q to find the value of $P$P.

Do: Wherever $Q$Q appears in the equation we replace it with it's value of $4$4:

$P$P $=$= $6Q+2$6Q+2
$P$P $=$= $6\times4+2$6×4+2
$P$P $=$= $26$26

Reflect: The process of substitution is putting a number where the variable is, we can do this because the variable is equivalent to the number.

We had two unknown variables and we were given the value of one, which we used to find the value of the other. Notice that this value of $P$P is only when $Q=4$Q=4. As $Q$Q changes so does $P$P, so we can also think of this problem in terms of a table of values.

Question 5

Inside a room there are $4$4 dogs and $3$3 birds. The dogs have $4$4 legs each, and the birds have $2$2 legs each. How many legs in total are there in this room?

Think: We create an expression relating the number of dogs, the number of birds, and the number of legs. Then we can substitute values into our expression to find the total.

Do: Let the total number of legs be $T$T, the number of dogs be $D$D, and the number of birds be $B$B.

Every dog will contribute $4$4 legs to the total and every bird will add $2$2, so our equation will be:


Let's substitute $D=4$D=4 and $B=3$B=3 into the the equation above. In other words, replace $D$D with $4$4 and $B$B with $3$3:

$T$T $=$= $4D+2B$4D+2B
$T$T $=$= $4\times4+2\times3$4×4+2×3
$T$T $=$= $22$22

Reflect: We are now working with two variables. An algebraic expression can contain any number of variables and we can substitute any number of these values in at once.


We can substitute in any real number, so we may need to substitute decimals or fractions in addition to integers.


Practice questions

Question 6

Evaluate $2v$2v when $v=-3$v=3.

Question 7

Evaluate $6x+4y+6$6x+4y+6 when $x=3$x=3 and $y=5$y=5.

Question 8

Evaluate $a\left(b-13\right)+b^2$a(b13)+b2 at $a=-9$a=9 and $b=10$b=10.





Evaluate an algebraic expression for given replacement values of the variables

What is Mathspace

About Mathspace