# Evaluating Algebraic Expressions

So far, the mathematical expressions we have seen have involved real numbers only. In mathematics, we may see expressions such as
$x+5,\frac{4}{3}\pi {r}^{3}$
, or
$\sqrt{2{m}^{3}{n}^{2}}$
. In the expression
$x+5$
, 5 is called a constant because it does not vary and x is called a variable because it does. (In naming the variable, ignore any exponents or radicals containing the variable.) An algebraic expression is a collection of constants and variables joined together by the algebraic operations of addition, subtraction, multiplication, and division.

We have already seen some real number examples of exponential notation, a shorthand method of writing products of the same factor. When variables are used, the constants and variables are treated the same way.

$\begin{matrix} \left(-3\right)^{5}=\left(-3\right)\cdot\left(-3\right)\cdot\left(-3\right)\cdot\left(-3\right)\cdot\left(-3\right) & x^{5}=x\cdot x\cdot x\cdot x\cdot x\end{matrix}$
$\begin{matrix} \left(2\cdot7\right)^{3}=\left(2\cdot7\right)\cdot\left(2\cdot7\right)\cdot\left(2\cdot7\right) & \left(yz\right)^{3}=\left(yz\right)\cdot\left(yz\right)\cdot\left(yz\right)\end{matrix}$
In each case, the exponent tells us how many factors of the base to use, whether the base consists of constants or variables.

Any variable in an algebraic expression may take on or be assigned different values. When that happens, the value of the algebraic expression changes. To evaluate an algebraic expression means to determine the value of the expression for a given value of each variable in the expression. Replace each variable in the expression with the given value, then simplify the resulting expression using the order of operations. If the algebraic expression contains more than one variable, replace each variable with its assigned value and simplify the expression as before.

### Example 8: Describing Algebraic Expressions

List the constants and variables for each algebraic expression.

1. x + 5
2. $\frac{4}{3}\pi {r}^{3}$
3. $\sqrt{2{m}^{3}{n}^{2}}$

### Solution

Constants Variables
1. x + 5 5 x
2.
$\frac{4}{3}\pi {r}^{3}$
$\frac{4}{3},\pi$
$r$
3.
$\sqrt{2{m}^{3}{n}^{2}}$
2
$m,n$

### Try It 8

List the constants and variables for each algebraic expression.

1. $2\pi r\left(r+h\right)$
2. 2(L + W)
3. $4{y}^{3}+y$

Solution

### Example 9: Evaluating an Algebraic Expression at Different Values

Evaluate the expression
$2x - 7$
for each value for x.

1. $x=0$
2. $x=1$
3. $x=\frac{1}{2}$
4. $x=-4$

### Solution

1. Substitute 0 for
$x$
.

$\begin{matrix} 2x-7 & = 2\left(0\right)-7 \\ & =0-7 \\ & =-7\end{matrix}$
2. Substitute 1 for
$x$
.

$\begin{matrix} 2x-7 & = 2\left(1\right)-7 \\ & =2-7 \\ & =-5\end{matrix}$
3. Substitute
$\frac{1}{2}$
for
$x$
.

$\begin{matrix} 2x-7 & = 2\left(\frac{1}{2}\right)-7 \\ & =1-7 \\ & =-6\end{matrix}$
4. Substitute
$-4$
for
$x$
.

$\begin{matrix} 2x-7 & = 2\left(-4\right)-7 \\ & =-8-7 \\ & =-15\end{matrix}$

### Try It 9

Evaluate the expression
$11 - 3y$
for each value for y.

a.

$y=2$

b.
$y=0$

c.
$y=\frac{2}{3}$

d.
$y=-5$

Solution

### Example 10: Evaluating Algebraic Expressions

Evaluate each expression for the given values.

1. $x+5$
for
$x=-5$
2. $\frac{t}{2t - 1}\\$
for
$t=10$
3. $\frac{4}{3}\pi {r}^{3}\\$
for
$r=5$
4. $a+ab+b$
for
$a=11,b=-8$
5. $\sqrt{2{m}^{3}{n}^{2}}$
for
$m=2,n=3$

### Solution

1. Substitute
$-5$
for
$x$
.

$\begin{matrix} x+5&=\left(-5\right)+5 \\ &=0\end{matrix}$
2. Substitute 10 for
$t$
.

$\begin{matrix} \frac{t}{2t-1}& =\frac{\left(10\right)}{2\left(10\right)-1} \\ & =\frac{10}{20-1} \\ & =\frac{10}{19}\end{matrix}$
3. Substitute 5 for
$r$
.

$\begin{matrix} \frac{4}{3}\pi r^{3} & =\frac{4}{3}\pi\left(5\right)^{3} \\ & =\frac{4}{3}\pi\left(125\right) \\ & =\frac{500}{3}\pi\end{matrix}$
4. Substitute 11 for
$a$
and –8 for
$b$
.

$\begin{matrix} a+ab+b & =\left(11\right)+\left(11\right)\left(-8\right)+\left(-8\right) \\ & =11-8-8 \\ & =-85\end{matrix}$
5. Substitute 2 for
$m$
and 3 for
$n$
.

$\begin{matrix} \sqrt{2m^{3}n^{2}} & =\sqrt{2\left(2\right)^{3}\left(3\right)^{2}} \\ & =\sqrt{2\left(8\right)\left(9\right)} \\ & =\sqrt{144} \\ & =12\end{matrix}$

### Try It 10

Evaluate each expression for the given values.

a.
$\frac{y+3}{y - 3}$
for
$y=5$

b.
$7 - 2t$
for
$t=-2$

c.
$\frac{1}{3}\pi {r}^{2}$
for
$r=11$

d.
${\left({p}^{2}q\right)}^{3}$
for
$p=-2,q=3$

e.
$4\left(m-n\right)-5\left(n-m\right)$
for
$m=\frac{2}{3},n=\frac{1}{3}$

Solution