Mathematics & Logic · Algebra & functions

Variables and algebraic expressions

Algebra uses letters to talk about numbers you don't know yet, or about all numbers at once. Learn to read an expression, turn a sentence into symbols, and simplify without changing what it says.

4 short lessons · about 16 minutes · 6 sources · updated November 2026

What you will learn

  • Explain that a letter can stand for one unknown number to find, or for any number in a general rule
  • Evaluate an expression by putting a number in place of its variable
  • Translate an English phrase into an algebraic expression, including phrases like "less than" that reverse the order
  • Use brackets to tell apart phrases like "five times the sum of m and n" and "the sum of five times m and n"

Lesson 1 of 4 · 4 min

Why algebra writes letters where numbers go

Before you readEgyptian scribes solved problems about an unknown amount about 3,500 years ago. How did they write that unknown?

Correct.Not quite. The answer is In words, as a stack.

They used a word, aha, meaning a stack. Letters came thousands of years later, and you'll see the two jobs a letter does once it arrives.

An Egyptian papyrus from around 1500 BC poses a puzzle. A quantity taken one and a half times, with 4 added, makes 10. What is it? The scribe wrote all of this in words.

Algebra writes the same puzzle as 3/2 x + 4 = 10. Here the letter x is an unknown. It stands for one particular number that you have to find.

A letter has a second job. The rule "seconds = 60 x m" works for any number of minutes m. In a rule like this the letter is a variable, standing for every number you might put in.

Check yourselfIn the rule "seconds = 60 x m", what does the letter m stand for?

Correct.Not quite. The answer is Any number of minutes you choose.

The rule works for any number of minutes, so m is a variable. The 60 is the fixed number of seconds in a minute.

Greg is 20 and Alex is 3 years older. If g is Greg's age, Alex's age is g + 3. That's an expression, a mix of numbers, letters and operation signs that names a value.

To evaluate it, you put a number in place of the letter. When g is 20, g + 3 is 23. When g is 35, it's 38. Algebra drops the multiplication sign, so 2n means 2 times n.

A spreadsheet works the same way. The formula =5*C10 multiplies whatever is in cell C10 by 5. Change C10 and the answer changes. The analogy stops at one point. A cell holds one value at a time, while a letter in a rule can stand for all numbers at once.

Try to recallWhat is the value of 2n - 7 when n is 10, and how do you get it?

Put 10 in place of n. 2n means 2 times n, which is 20, and 20 minus 7 is 13. Evaluating always means replacing the letter with the given number and then doing the arithmetic.

A letter is either one unknown number to find or a variable standing for any number. Give it a value and the expression turns back into arithmetic you can work out.

Lessons in this topic

  1. Why algebra writes letters where numbers go

    See the two jobs a letter does in algebra, and how to find an expression's value once you know the number.

    Essentials · 4 min

  2. Turning words into algebra and back

    Translate everyday phrases into expressions, spot the phrase that flips the order, and see how brackets change the meaning.

    Essentials · 4 min

  3. Simplifying an expression without changing it

    Combine like terms and multiply out brackets, and see each move as a picture of the same total.

    Deeper · 4 min

  4. Statements that are true for every number

    Tell an identity from an equation with only some solutions, and use algebra to see why a number trick always works.

    Deeper · 4 min

Three quick stories from this topic

Algebra without letters

Euclid stated the rule for multiplying out brackets using only rectangles

Around 300 BC his Elements said a rectangle equals the smaller rectangles you get by cutting one side into pieces. That's the rule a times b plus c equals ab plus ac, written with no symbols at all.

Geometry first

Greek mathematicians described quantities as lengths and areas. Letters for numbers didn't take hold until the late 1500s.

Still how it's taught

Splitting a rectangle is still the usual picture of the distributive rule, as in 6 x 16 = 60 + 36.

The codebreaking algebraist

The man who brought letters into algebra also broke Spanish codes for France

In 1590 François Viète cracked a Spanish cipher of more than 500 characters for Henry IV. A year later he published the work that wrote known and unknown numbers as letters.

A lawyer by trade

Viète was a lawyer and royal councillor who did mathematics on the side. Once his cipher was broken, captured Spanish dispatches could be read.

Vowels and consonants

Viète wrote unknowns as vowels and known numbers as consonants. Descartes later settled on x, y and z for unknowns.

A spreadsheet from a blackboard

The first personal computer spreadsheet began with a professor erasing a blackboard

Dan Bricklin watched a professor rewrite a whole table by hand after finding one error. He wanted a version where changing one number updated the rest, and in 1979 that became VisiCalc.

Cells as variables

A formula like =5*C10 uses a cell where a number would go. Change the cell and every result built on it recalculates.

Why it mattered

VisiCalc was the first spreadsheet on a personal computer and became the program that sold the Apple II.

Sources

  • What a function is, and why it can't always run backward

    A function is a rule that gives each input exactly one output. See why two inputs can share an output, where a formula stops applying, and why working back from an output can fail.

    4 lessons · 17 min

  • Linear versus exponential growth

    Linear growth adds the same amount at each step and exponential growth multiplies by the same factor. See why they look alike at first, how decay and compound interest follow the same rule, and where the number e comes from.

    4 lessons · 20 min

  • Logarithms, where one step means ten times as much

    A logarithm counts how many times you multiplied. See how that makes earthquake magnitudes, orders of magnitude and half-lives work, and why a scale built this way is easy to misread.

    4 lessons · 22 min

  • Solving equations

    An equation is a balance, and solving it means keeping the balance while you isolate the unknown. Learn which moves are allowed, how to check an answer, and how to spot an equation with no solution or with endlessly many.

    4 lessons · 16 min

  • Fractions and decimals

    A fraction is a number, a division and a share all at once. See why adding needs a common denominator and multiplying doesn't, and why some fractions become decimals that never end.

    4 lessons · 16 min

  • Prime numbers

    Primes can't be split into smaller factors, and every whole number is built from them in exactly one way. See how to find them, why they never run out, and why online security relies on them.

    4 lessons · 16 min

All mathematics & logic topics · Take the quiz