Skip to content
AI-grafen
CBuilderMathematics· about 30 min· fundamentals that rarely change· verified 2026-09-20· EN

Variables and algebraic expressions

Be able to write and simplify expressions with variables.

Practise in Mattegrafen ↗ · Algebra

Prerequisites

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.

DescriptionExpression
One bagx
Two bags2x
One bag and three loose marblesx + 3
Two bags and five loose ones2x + 5
Twice as many as you have2x
Three fewer than you havex − 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:

RuleExample
Collect like terms3a + 5a = 8a
Different letters cannot be merged3a + 5b is finished
x and x² are different termsx + x² is finished
Multiply into the bracket3(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.

#SituationExpression?
1A cinema ticket costs 120 kr. You buy n of them.
2The same, but you have a gift card worth 200 kr.
3You have x kr and spend half of it.
4A taxi costs 50 kr to start and 15 kr per km. You travel k km.
5You 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

All the sources and licences