What Is a Variable, and Why Use Letters?

Author: codeplu.com
Last Updated: 25 Sept 2026
Est. Duration: 10 min
Skill Level: Beginner

Root Concept

A variable is a letter standing in for a number — sometimes one specific unknown to find, sometimes any number at all, sometimes a quantity that changes.

CodePLU Goal

Upgrading Human Mental Models

Learn how to think in Workflows

Concept Playground
CodePLU logo

Concept Development By codeplu.com

Each bag holds n — match the algebra to the picture it describes

Why Does Maths Suddenly Start Using Letters?

For most people this is the exact moment maths starts feeling like a different subject. Numbers you could handle; then a letter appears and it seems like a code you were never given the key to. The truth is much duller than that, and the dullness is good news: a letter is just a number you have not pinned down yet.

Think about a puzzle you already solve without algebra. If someone says they thought of a number, added 3, and got 10, you can find the number instantly. Algebra is only the habit of writing that down: x + 3 = 10. The letter is not doing anything mysterious — it is holding the place of the number while you work out what it must be.

Letters do three different jobs, though, and mixing them up is where the confusion really starts. Sometimes a letter is one specific unknown waiting to be found. Sometimes it stands for any number at all, so that a rule can be written once instead of a thousand times. And sometimes it is a quantity that genuinely changes, which is where the name variable comes from. In the playground below you will build a letter down into the three jobs it can be doing, and each job down to the algebra where it shows up.

What Do Letters Actually Stand For?

1

When is a letter an unknown to be found?

In x + 3 = 10 the letter has exactly one possible value. The equation is making a claim — that some number plus 3 gives 10 — and only 7 makes that claim true. Here the letter behaves like a gap in a sentence: it has a single correct filling and your job is to find it. This is the use most people meet first, and it is why so many assume x always means the answer. It does not, but in this particular job it does have one answer, and that is worth being precise about. A useful habit from the very start: once you find a value, put it back in and check. Seven plus 3 is 10, so the claim holds. Substituting back is the only way to be certain, and it takes seconds.

2

When does a letter mean any number at all?

Now look at 4n on its own. Nothing is being claimed and there is nothing to find — n has no particular value, and 4n simply means four of whatever n happens to be. This is the use that makes algebra powerful, because it lets a rule be written once and applied everywhere. The area of any rectangle is length times width, and writing it as l × w covers every rectangle that will ever exist, which no list of examples could do. Here is the misconception that causes the most damage later: letters do not stand for objects. In 4a the a is a number, not an apple. Reading 4a as four apples feels harmless and then makes expressions like 4a + 3a impossible to think about properly. The letter is always a number.

3

When is a letter a quantity that varies?

In the rule area = s × s for a square, s is not unknown and it is not arbitrary either — it is whatever the side of the square you are looking at happens to be. Change the square and s changes with it, and the area changes as a result. This is the sense that gives variables their name: the value varies, and one quantity depending on another is the beginning of everything from graphs to physics. Two small conventions are worth knowing here. Letters are chosen to be helpful rather than mysterious, so s for side, t for time and h for height. And multiplication signs get dropped between a number and a letter, so 4n means four times n — which is exactly why using x as a multiplication sign becomes a bad idea the moment x is also a variable.

Real World Example

A taxi fare, written first as a list and then as a rule.

How Does One Letter Replace a Whole Price List?

The clearest argument for letters is how much writing they save, and how much more they let you do:

1

Without letters

A rule you have to say in words

Suppose a shop sells pens at 5 rupees each and you want a rule for the cost. Without letters you are stuck writing it out in words every time: the cost is five times however many pens you buy. That sentence works, but it is slow, it is easy to misread, and you cannot do anything further with it. You cannot rearrange a sentence to find out how many pens you could afford for 60 rupees. Every question has to be answered from scratch, and the thing all the questions have in common — the five-times part — never gets written down anywhere you can use it.

2

With one letter

cost = 5n

Let n stand for the number of pens. Now the whole rule is cost = 5n, and n is doing the work that the phrase however many pens you buy was doing before. Nothing has become more abstract; the letter is simply a shorter way of saying a number I have not chosen yet. Pick n as 3 and the cost is 15. Pick n as 12 and the cost is 60. The same four characters answer every version of the question, and because it is now a piece of maths rather than a sentence, you can work backwards with it too: if the cost is 60, then n must be 12.

3

The same letter, a different job

Unknown, or genuinely varying

In cost = 5n the letter is free to be anything — it varies, which is where the word variable comes from. But in 5n = 60 the same letter is doing something different: it has exactly one possible value, and your job is to find it. The symbol has not changed, only the situation around it. This trips people up constantly, because school teaches find x so early that a letter starts to feel like it is always hiding one right answer. It is not. Reading which job the letter is doing is most of what makes algebra make sense.

FAQs

Final Words

A letter in algebra is a number you have not pinned down. Sometimes it is one specific unknown with a single answer, sometimes it stands for any number so a rule can be written once, and sometimes it is a quantity that varies with the situation. Recognising which job a letter is doing tells you whether there is anything to solve at all.

Keep two things in mind as you go on: a letter is always a number and never an object, and dropped multiplication signs are a convenience rather than a mystery. The next concept builds directly on the first of those three jobs — telling apart something that can be solved from something that can only be simplified.

Continue This Track

This concept is part 2 of Your First Steps in Algebra.

1
Part 1 10 min Beginner

Why Does Maths Use Letters Instead of Numbers?

Letters are not there to make maths harder. They are there because some rules have to cover every number at once, and you cannot write them all down. Build the rule for a growing pattern in an interactive playground.

2
Part 2 Current 10 min Beginner

What Is a Variable, and Why Use Letters?

A letter in maths is not a mystery or a code — it is a number you have not pinned down yet. Learn the three jobs letters do, and build a letter down into each in an interactive playground.

3
Part 3 10 min Beginner

How Do You Turn a Rule Into a Formula?

A formula is a rule about a quantity, written with letters so it can be used rather than just read. Learn how to build one, and match formulas to the shapes they describe in an interactive playground.

4
Part 4 10 min Beginner

What's the Difference Between an Expression and an Equation?

One can be simplified, one can be solved, and one gives you a range rather than an answer. Learn to tell them apart by building one stem into all three in an interactive playground.

5
Part 5 10 min Beginner

How Do You Find the Value of an Expression?

An expression only becomes a number once you choose what the letter stands for. Learn how to substitute a value safely, and work out an expression for several numbers in an interactive playground.

6
Part 6 12 min Beginner

Why Must You Do the Same Thing to Both Sides?

An equation is a claim that two sides are equal, so any change to one side alone makes it false. Learn which moves keep the balance and which ones actually help.

7
Part 7 12 min Beginner

How Do You Solve for x, Step by Step?

Solving is undoing, in reverse order. Learn why the last thing done to x is the first thing you remove, and build the whole solution yourself.