What Is a Variable, and Why Use Letters?

Author: codeplu.com
Last Updated: 29 Jul 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
Code Logo Only

Concept Development By codeplu.com

A letter branches into three jobs, each one shown in real algebra

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 taxi charges 3 to start plus 2 for every mile. You could write out a table: 1 mile costs 5, 2 miles costs 7, 3 miles costs 9, and so on. It works, but it never finishes, and it is useless the moment somebody asks about 47 miles. The table describes examples rather than the rule behind them.

2

With one letter

Write the fare as 3 + 2m, where m is the number of miles. That single line covers every journey, including ones nobody has taken yet. Here m is a stand-in for any number: it is not unknown, and there is nothing to solve. The expression is a recipe, not a question.

3

The same letter, a different job

Now suppose your fare was 19 and you want to know how far you went. Write 3 + 2m = 19. Nothing about m changed on the page, but its job did — it is now one specific unknown, because only one distance produces a fare of 19. That flip between rule and question, with the same letter, is what algebra lets you do.

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.