Sub topic 3
Translating Words into Expressions
This chapter assumes you can do arithmetic with integers, fractions, and decimals, follow the order of operations, and know that a variable is a letter standing for a number. It also assumes you can write a percent as a fraction of 100. Here you will turn phrases into algebraic expressions. The next chapter combines those expressions into equations.
Expression versus equation
An expression is a combination of numbers, variables, and operations. It has no equals sign, so it cannot be true or false. 3n + 2 is an expression. An equation says two expressions are equal, such as 3n + 2 = 14.
Translating a phrase produces an expression. Translating a whole sentence produces an equation. Mixing these up is a common source of errors. "Five more than a number" is an expression. "Five more than a number is twelve" is an equation.
Choosing the operation
Most phrases map to one of the four operations. The table lists common wording, with n as the unknown number.
| Operation | Phrases | Expression |
|---|---|---|
| Addition | sum, total, more than, increased by, plus | `n + 5` |
| Subtraction | difference, less than, decreased by, minus, fewer than | `n - 5` |
| Multiplication | product, times, twice, double, of (with fractions and percents) | `2n` |
| Division | quotient, divided by, per, ratio of, half of | `n / 4` |
These are guides, not rules. Read the whole phrase before choosing, because the same word can mean different things in different positions.
Phrases where order reverses
Addition and multiplication do not depend on order. Subtraction and division do. A few phrases list the quantities in the opposite order from the way you write them.
- "5 more than n" means
n + 5. Order does not matter here, so5 + nis also fine. - "5 less than n" means
n - 5. The thing being reduced comes after "than". - "5 subtracted from n" means
n - 5. - "n subtracted from 5" means
5 - n. - "The difference of n and 5" means
n - 5, in the order given. - "n less than 5" means
5 - n.
Grouping with parentheses
Phrases like "the sum of" or "the product of" often hide a group. Compare these two:
- "Twice the sum of a number and 3" is
2(n + 3). - "The sum of twice a number and 3" is
2n + 3.
The words are nearly the same, but the expressions differ. With n = 4 the first gives 14 and the second gives 11. Ask what the multiplier applies to. If it applies to a sum or difference, you need parentheses.
Other grouping phrases:
- "The quotient of a number and the sum of 2 and 3" is
n / (2 + 3). - "Three times the difference of a number and 8" is
3(n - 8). - "The square of the sum of a number and 1" is
(n + 1)^2, which is different fromn^2 + 1.
Percents, fractions, and "of"
The word "of" after a fraction or percent means multiply.
- "A third of a number" is
n / 3or(1/3)n. - "20% of a number" is
0.20n. - "A number increased by 20%" is
n + 0.20n, which equals1.20n. - "A number decreased by 20%" is
n - 0.20n, which equals0.80n.
Notice that "increased by 20%" is not 0.20n. The percent applies to the original amount, and you then add the result to that amount. The factor form is useful later in discount and interest problems: an increase of p percent multiplies by 1 + p/100, and a decrease multiplies by 1 - p/100.
Expressing one quantity in terms of another
Many problems have two unknowns that are related. You pick one as the variable and write the other using the relationship. This keeps you to a single variable.
- "Maria is 4 years older than Ben." If Ben's age is
b, Maria's age isb + 4. - "The length is 3 more than twice the width." If the width is
w, the length is2w + 3. - "Two numbers add to 10." If one is
x, the other is10 - x. - "A ticket costs $8 and there are
aadult tickets out of 10 in all." The number of child tickets is10 - a.
The last pattern, total - x, appears constantly in number and money problems. Use it whenever two parts must add to a known total.
Rates, unit prices, and "per"
"Per" signals a rate, which is a ratio of two quantities with different units. A rate lets you build an expression for a total.
- "$8 per ticket,
atickets" gives a cost of8adollars. - "60 miles per hour for
thours" gives a distance of60tmiles. - "$5 per child ticket,
10 - atickets" gives a cost of5(10 - a)dollars.
Keep track of units as you write. Dollars per ticket times tickets gives dollars. If the units do not multiply out to the unit you want, the expression is probably wrong.
Shifted quantities: starting later or earlier
When one thing starts later, subtract the delay from the time. When it started earlier, add it.
- Car A leaves at 60 mph. Car B leaves 1 hour later. If Car A has travelled
thours, Car B has travelledt - 1hours. - Car B's distance is
80(t - 1), not80t - 1. The delay applies to the time, not to the final distance.
This is why parentheses matter so much. The multiplier applies to the entire time expression.
A worked translation
Consider this problem: "A theater sold 10 tickets. Adult tickets cost $8 and child tickets cost $5. The total was $62." Before writing any equation, build the pieces as expressions.
- Let
abe the number of adult tickets. - Child tickets:
10 - a. - Money from adults:
8a. - Money from children:
5(10 - a). - Total money:
8a + 5(10 - a).
Each line is an expression. The equation appears only when you set the final expression equal to 62, which the next chapter covers. You can still use Python to check that your expression behaves sensibly for a test value:
def total_cost(a):
"""Total money for a adult tickets out of 10 tickets in all."""
return 8 * a + 5 * (10 - a)
print(total_cost(0)) # 50, all child tickets
print(total_cost(10)) # 80, all adult tickets
print(total_cost(4)) # 62, matches the stated totalTesting the extremes is a good habit. All children should give 50, and all adults should give 80. If your expression gives something else, the translation has an error.
A process for translating
The test step is the one people skip. Substitute an easy number, such as 10, and compute the phrase in plain arithmetic. Then compare it with your expression. If they disagree, go back and recheck the operation words.
Common errors
- Reversing "less than". Write
n - 5, not5 - n, for "5 less than n". - Dropping parentheses. "Three times the sum of a number and 2" is
3(n + 2), not3n + 2. - Treating "increased by 20%" as
0.20n. It is1.20n. - Delay applied to distance. Write
80(t - 1), not80t - 1. - Using two letters when one will do. If
yis10 - x, write it that way and keep a single variable. - Leaving out units. A variable named only
xis unclear. Write "x = number of adult tickets".
Practice
Exercise
Let n be a number. Write expressions for (a) "4 less than three times a number" and (b) "three times the difference of a number and 4". Evaluate both at n = 10 to show they differ.
Show answer
(a) 3n - 4. At n = 10 this is 30 - 4 = 26. (b) 3(n - 4). At n = 10 this is 3(6) = 18. The values differ because in (a) the 4 is subtracted after multiplying, and in (b) the subtraction happens first, inside the parentheses.
Exercise
A jacket's price is p dollars. Write an expression for its price after a 20% discount, and for its price after a 20% increase. Which one is the factor 0.8p?
Show answer
After a 20% discount: p - 0.20p = 0.80p. After a 20% increase: p + 0.20p = 1.20p. The discounted price is 0.8p.
Exercise
Car B starts 2 hours after Car A. Car A travels at 50 mph, and Car B travels at 70 mph. Let t be the hours Car A has travelled. Write expressions for each car's distance in miles.
Show answer
Car A travels for t hours, so its distance is 50t. Car B travels for t - 2 hours, so its distance is 70(t - 2). The delay is subtracted from the time before multiplying by the rate.