Letters, expressions and formulas · Mathematics Class… | StemPy Lab
Course 18.1·Lesson 1 of 3
Letters, expressions and formulas
A letter stands for a number that can change. We use letters to write a rule once and use it for every case, such as a taxi fare or a temperature conversion. You write expressions from words, substitute numbers carefully, especially negative ones, use formulas with units, and test a rule with a few values.
about 25 min1 simulation1 practice question
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
Parts of this chapter are marked Extended. They are tested only on the Extended papers of Cambridge IGCSE Mathematics. If you sit the Core papers, you can read them as a stretch.
One rule for every journey
A taxi driver charges 3 dollars to start and 2 dollars for each kilometre. A journey of 5km costs 3+2×5=13 dollars. A journey of 8km costs 3+2×8=19 dollars.
Writing a new sum for every journey is slow. So we write the rule once, with a letter. If the journey is n kilometres, the fare is
3+2n dollars.
A letter stands for a generalised number: any number that we have not chosen yet. The expression 3+2n works for every n. Put in n=5 and you get 13. Put in n=8 and you get 19.
Writing expressions from words
To write an expression, find the numbers and the operations in the words. Then use a letter for the number you do not know.
5 more than n:n+5.
3 less than twice n:2n−3.
The sum of the squares of a and b:a2+b2.
The square of the sum of a and b:(a+b)2. The brackets matter, because a2+b2 and (a+b)2 are different.
8 shared equally among n people:n8.
Extended: you may be asked to build a longer expression. Two consecutive even numbers can be written 2n and 2n+2. Their product is 2n(2n+2)=4n2+4n.
Substituting numbers
To substitute, write each number in brackets in place of its letter. Then work out the brackets, the powers, the multiplication, and last the addition and subtraction.
Let a=3 and b=−2. Find 2a+b2.
Brackets.2(3)+(−2)2.
Power first.(−2)2=4.
Then add.6+4=10.
Negative numbers cause most of the mistakes. Let x=−3.
x2=(−3)2=9. The square of a negative number is positive.
−x2=−(−3)2=−9. Here only x is squared, and then the minus sign is applied.
3x2=3×9=27, but (3x)2=(−9)2=81.
Expanding brackets and factorising are taught in the chapter on Polynomials. Solving an equation for a letter is taught in the chapter on Linear Equations. Here we use letters to build, substitute and test.
Formulas
A formula is a rule that links quantities, written with letters. The formula for changing degrees Celsius (C) into degrees Fahrenheit (F) is
F=1.8C+32.
For water boiling at C=100: F=1.8×100+32=212. For C=−40: F=1.8×(−40)+32=−72+32=−40. At −40 the two scales agree.
Here is a formula from the motion of a trolley, for the distance s in metres after t seconds:
s=ut+21at2.
Take a starting speed u=5m/s, an acceleration a=−2m/s2 (the trolley slows down) and t=3s. Then s=5×3+21×(−2)×32=15−9=6m.
Always put the units in. The unit of the answer comes from the formula: here metres.
Is the rule always true?
Substitution also tests a claim. Take n2+n. For n=1,2,3,4 we get 2,6,12,20. All are even. Does that prove the claim for every n?
No. A few values do not prove a rule, but one value that fails disproves it. Look at n2+n+41. It gives a prime number for every n from 0 to 39. But for n=40 we get 1681=41×41, which is not prime. The claim was false, and only a test far enough along showed it.
A reason does prove a rule. The number n2+n=n(n+1) is the product of two consecutive whole numbers. One of them is even, so the product is even for every whole number n.
Extended: building a formula
A rectangle is w centimetres wide. Its length is 3cm more than twice its width, so the length is 2w+3. The perimeter is twice (width + length):
P=2(w+(2w+3))=6w+6.
Check with w=5: the length is 13, and the perimeter is 2(5+13)=36. The formula gives 6×5+6=36. Always check a new formula with a number.
Practise with new numbers
Try it in Python
The program writes the temperature formula as a function and prints a table. Then it tests the claim about n2+n+41 on the numbers 0,1,2,… until it finds one that fails.
Common mistakes
Losing a bracket. If x=−4, then x2 is (−4)2=16, not −16.
Mixing 2n2 and (2n)2. For n=3 the first is 18 and the second is 36.
Leaving out the multiplication sign. The letters in 3n mean 3×n. With n=4 it is 12, not 34.
Trusting a few values. A rule that works for n=1,2,3 may still fail at n=40.
Remember these
A letter stands for any number. An expression with a letter works for every value.
Substitute with brackets. Powers come before multiplication, and multiplication comes before addition.
A formula needs its units. Check a new formula with one number.
One failing value disproves a rule. Only a reason proves it.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Write an expression for "7 less than three times n".
Find the value of 5−2x2 when x=−3.
Use F=1.8C+32 to find the Celsius temperature that matches 50∘F.
Dilnoza says that n2+3 is always odd. Find a value of n that shows she is wrong.
Extended. A rectangle has a width of x metres and a length that is 5m less than three times the width. Write an expression for its area.
References
Cambridge International, IGCSE Mathematics 0580 syllabus (2025, 2026 and 2027), section 2.1 Introduction to algebra and section 2.5 Equations.
Enroll free in Formulas, Inequalities and Regions
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.