Replacing expressions with numbers and numbers with expressions.

The questions in section 3.13 were designed to let you practice the idea of evaluating an expression. They were also designed to help you get a sense of the difference between expressions that evaluate to a number and expressions that evaluate to TRUE or FALSE.

One of the reasons that evaluating an expression is useful is that when doing mathematics, we can replace an expression with the value the expression evaluates to. This can come in handy when we are dealing with large and complicated expressions because it lets us shorten them.

It's similar to a situation where you know a long way to get from one place to another, but at some point discover a short cut. By replacing your longer route with the short cut, you still go from the first place to the second place, but your route is shorter.

For example, we can replace

4 - 1

with

3

because the expression 4 - 1 evaluates to 3.

Similarly, we can do the reverse and replace a number with an expression if the expression evaluates to the number. To go back to the short cut example, you might wonder why you would not want to use the short cut once you had it. You might imagine, though, that sometimes there were things you could do going the long way around (like stop at a nice place to do a bit of fishing, or visiting friends) that you couldn't do when taking the short cut.

In the case of mathematics, for example, we can replace

6

with the longer expression

2 + 4

since 2 + 4 evaluates to 6.

We could also replace 6 with

2 * 3

or

7 - 1

since both of these expressions also evaluate to the number 6 (I suggest that you do the math to check that I am right about this).

The expression we pick to replace the number 6 would depend on what we wanted to do next. To return to our trip example, if we decided to take the long way around from one place to another, we might still have to chose from different routes. One route might let us go fishing but another route might take us by our friends place. We would have to decide which one we wanted to do.

All of this replacing comes in handy when dealing with larger expressions, as we will see in the next part
 

 

Index|Previous Part|Next Part




Copyright Jen Schellinck, 2006