Variables and algebraic expressions
Be able to write and simplify expressions with variables.
Practise in Mattegrafen ↗ · AlgebraPrerequisites
Everyday explanation
A variable is a letter standing for a number you do not know — yet.
Think of a bag with an unknown number of marbles in it. You call it x.
| Description | Expression |
|---|---|
| One bag | x |
| Two bags | 2x |
| One bag and three loose marbles | x + 3 |
| Two bags and five loose ones | 2x + 5 |
| Twice as many as you have | 2x |
| Three fewer than you have | x − 3 |
Simplifying is tidying up. x + x + 3 + 2 becomes 2x + 5 — two bags and five marbles.
But 2x + 5 cannot be simplified any further. You cannot merge bags with loose marbles, because you do not know how many are in the bag. That is the most common slip: writing 2x + 5 = 7x.
Intuition
The rules, in words and in letters:
| Rule | Example |
|---|---|
| Collect like terms | 3a + 5a = 8a |
| Different letters cannot be merged | 3a + 5b is finished |
x and x² are different terms | x + x² is finished |
| Multiply into the bracket | 3(x + 2) = 3x + 6 |
| A minus in front of a bracket flips everything | −(x − 4) = −x + 4 |
The last row is where most errors happen. 5 − (x − 3) becomes 5 − x + 3 = 8 − x, not 5 − x − 3.
Substituting a value. When you are told what x is you simply swap the letter out:
Expression: 2x + 5
If x = 4: 2·4 + 5 = 13
If x = 0: 2·0 + 5 = 5
If x = −2: 2·(−2) + 5 = 1
Why AI cares: a model's prediction is an expression with variables. price = 2400·area + 150000 is exactly the same thing as 2x + 5, just with larger numbers and a name for x. Training means finding the numbers that go in front of the variables.
Interactive
Write expressions from real situations. Write your answer down before you read the key.
| # | Situation | Expression? |
|---|---|---|
| 1 | A cinema ticket costs 120 kr. You buy n of them. | |
| 2 | The same, but you have a gift card worth 200 kr. | |
| 3 | You have x kr and spend half of it. | |
| 4 | A taxi costs 50 kr to start and 15 kr per km. You travel k km. | |
| 5 | You are a years old. Your sister is three years younger. How old are you together? |
The key: 1. 120n · 2. 120n − 200 · 3. x/2 · 4. 50 + 15k · 5. a + (a − 3) = 2a − 3
Number 5 is the interesting one — it requires you both to write two expressions and to simplify the sum.
Test your answers by substituting a number. If you are 15 and your sister is 12 the sum is 27. And 2·15 − 3 = 27. It checks out.
That check — substitute a number you can work out in your head — catches nearly every sign error and is worth doing every time.
Mastery means
- Writes an expression from a description
- Simplifies by collecting like terms
- Substitutes values and computes
Sign in to do the exercises and build your mastery up.
Sources
- Matteboken (Mattecentrum) — free to read, non-profit association
- Khan Academy — matematik — CC BY-NC-SA 3.0
- Skolverket — About AI in school (in Swedish) — Skolverket's open terms