TExcelTAD
Home › Algebra › Translating English into Equations

Translating English into Equations

Most real problems arrive as sentences, not symbols. Translating a sentence into an equation means picking a letter for the unknown, turning each phrase into an operation, and writing an equals sign where the sentence says "is". This lesson gives a phrase dictionary and the common traps, especially with subtraction and division.

The phrase dictionary

English Operation Example Algebra
sum, plus, more than, increased by, total of ++ 6 more than a number n+6n + 6
difference, minus, less than, decreased by, fewer than −- 4 less than a number n−4n - 4
product, times, of, twice, double, triple ×\times twice a number 2n2n
quotient, divided by, per, ratio of, half of ÷\div a number divided by 5 n/5n/5
is, equals, gives, results in, will be == ... is 20 …=20\ldots = 20
at least, no less than ≥\ge at least 18 a≥18a \ge 18
at most, no more than ≤\le at most 30 t≤30t \le 30

The order traps

Two families of phrases reverse the order you read them in.

  • "less than" and "subtracted from". "4 less than nn" is n−4n - 4, not 4−n4 - n. "Subtract 9 from nn" is n−9n - 9. Think of it as: start with nn, then take 4 away.
  • "the difference of aa and bb" keeps the order: a−ba - b. "The quotient of aa and bb" is a/ba/b.

Tip: Test a translation with a number. "4 less than 10" is 6. Does your expression give 6 when n=10n = 10? n−4n - 4 does; 4−n4 - n gives −6-6.

Grouping words matter too. "Three times the sum of a number and 2" is 3(n+2)3(n + 2): the word "sum" bundles nn and 2 together before the multiplication. "Three times a number, plus 2" is 3n+23n + 2. The comma changes the meaning, exactly like parentheses in code.

python · try it yourself
# the same number, four translations
n = 10
print("4 less than n:          ", n - 4)
print("4 minus n:              ", 4 - n)
print("3 times the sum of n, 2:", 3 * (n + 2))
print("3 times n, plus 2:      ", 3 * n + 2)
4 less than n:           6
4 minus n:               -6
3 times the sum of n, 2: 36
3 times n, plus 2:       32

Sentence to equation, step by step

"Seven more than three times a number is 31."

let n=the numberthree times a number→ 3nseven more than that→ 3n+7is 31→ 3n+7=31solve: 3n=24, n=8check: 3⋅8+7=31 ✓\begin{aligned} &\text{let } n = \text{the number} \\ &\text{three times a number} && \to\ 3n \\ &\text{seven more than that} && \to\ 3n + 7 \\ &\text{is 31} && \to\ 3n + 7 = 31 \\ &\text{solve: } 3n = 24,\ n = 8 \\ &\text{check: } 3 \cdot 8 + 7 = 31\ \checkmark \end{aligned}

"A phone costs €45 less than twice the price of a tablet. The phone costs €355."

text
let t = tablet price
twice the tablet price          →  2t
€45 less than that              →  2t − 45
the phone costs 355             →  2t − 45 = 355
solve: 2t = 400, t = 200

"The average of a number and 14 is 11."

n+142=11n+14=22n=8\begin{aligned} \frac{n + 14}{2} &= 11 \\ n + 14 &= 22 \\ n &= 8 \end{aligned}

SymPy is handy for checking that a translation gives the answer you expect:

python · try it yourself
from sympy import symbols, Eq, solve

n, t = symbols("n t")
print(solve(Eq(3*n + 7, 31), n))
print(solve(Eq(2*t - 45, 355), t))
print(solve(Eq((n + 14)/2, 11), n))
print(solve(Eq(5*(n - 3), 2*n), n))   # five times (n minus 3) equals twice n
[8]
[200]
[8]
[5]

In software

Translating requirements into expressions is a daily programming task. A ticket says "a discount of 15% applies to orders of at least €50"; you write if total >= 50: total *= 0.85. "Users get 3 free retries, then wait twice as long each time" becomes wait = base * 2**(attempt - 3). Getting "at least" versus "more than" wrong is the classic off-by-one bug: >= and > differ exactly at the boundary.

python · try it yourself
def price(total):
    # "15% off orders of at least 50"
    return round(total * 0.85, 2) if total >= 50 else total

for t in [49.99, 50, 80]:
    print(t, "->", price(t))
49.99 -> 49.99
50 -> 42.5
80 -> 68.0

Exercises

Exercise 1: Phrases

Translate, using nn for the number: (a) 8 fewer than a number, (b) the quotient of a number and 3, (c) twice the difference of a number and 5, (d) 12 subtracted from half a number.

Answer

(a) n−8n - 8, (b) n/3n/3, (c) 2(n−5)2(n - 5), (d) n/2−12n/2 - 12

Solution

(a) "fewer than" reverses order: start with nn, remove 8. (b) quotient keeps order: n÷3n \div 3. (c) "the difference of nn and 5" is grouped first, then doubled. (d) "subtracted from" reverses order: start with n/2n/2, remove 12.

Exercise 2: Sentence to equation

"Four times a number, decreased by 9, equals 27." Write the equation and solve it.

Answer

4n−9=274n - 9 = 27, n=9n = 9

Solution
4n−9=274n=36n=9check: 4⋅9−9=27 ✓\begin{aligned} 4n - 9 &= 27 \\ 4n &= 36 \\ n &= 9 \\[1ex] &\text{check: } 4 \cdot 9 - 9 = 27\ \checkmark \end{aligned}

Exercise 3: Grouping matters

"Six times the sum of a number and 4 is 54." Solve it. Then solve "six times a number, plus 4, is 54" and compare.

Answer

6(n+4)=546(n + 4) = 54 gives n=5n = 5. 6n+4=546n + 4 = 54 gives n=253≈8.33n = \frac{25}{3} \approx 8.33.

Solution
6(n+4)=54  ⇒  n+4=9  ⇒  n=56n+4=54  ⇒  6n=50  ⇒  n=506=253\begin{aligned} 6(n + 4) = 54 \;&\Rightarrow\; n + 4 = 9 \;\Rightarrow\; n = 5 \\ 6n + 4 = 54 \;&\Rightarrow\; 6n = 50 \;\Rightarrow\; n = \frac{50}{6} = \frac{25}{3} \end{aligned}
python · try it yourself
from sympy import symbols, Eq, solve
n = symbols("n")
print(solve(Eq(6*(n + 4), 54), n), solve(Eq(6*n + 4, 54), n))
[5] [25/3]

Exercise 4: A requirement in code

"Shipping is free for orders over €40; otherwise it costs €4.90." Write shipping(total) and print it for 40 and 40.01. Which word decides the boundary?

Answer

4.9 for €40 and 0 for €40.01. "over" means strictly greater, so the test is total > 40.

Solution
python · try it yourself
def shipping(total):
    return 0 if total > 40 else 4.9

print(shipping(40), shipping(40.01))
4.9 0

Test yourself

Which expression means '5 less than a number xx'?

  1. 5−x5 - x
  2. x−5x - 5
  3. 5x5x
  4. x/5x/5

Translate: 'Twice the sum of a number and 3 is 20.'

  1. 2n+3=202n + 3 = 20
  2. 2+n+3=202 + n + 3 = 20
  3. 2(n+3)=202(n + 3) = 20
  4. n+3=2⋅20n + 3 = 2 \cdot 20

'Players must be at least 13' translates to:

  1. age>13\text{age} > 13
  2. age≥13\text{age} \ge 13
  3. age<13\text{age} < 13
  4. age≤13\text{age} \le 13