Topic · Pre-Algebra

Variables & Expressions

The leap from arithmetic to algebra is small but profound: letters start standing in for numbers. With variables, you can write a single formula that describes infinitely many specific computations — and the rules of arithmetic survive untouched.

What you'll leave with

  • What a variable really is — a placeholder for a number we don't (yet) want to commit to.
  • The vocabulary of expressions: terms, coefficients, like terms.
  • The difference between an expression (no equals sign) and an equation (with one).
  • How to evaluate, simplify, and translate between English and algebra.

1. What a variable is

A variable is a letter (most often $x$, $y$, $a$, $n$, or $t$) used to stand for a number. The number it represents might be:

  • Unknown — something we want to find, like the $x$ in "if $x + 3 = 10$, what is $x$?"
  • Varying — something that takes different values in different situations, like the $t$ in "distance equals $50 \cdot t$, where $t$ is time in hours."
  • General — a placeholder used to state a rule that works for every number, like "for any $a$, we have $a + 0 = a$."
Variable

A symbol (almost always a letter) used to represent a number. Variables follow the same arithmetic rules as the numbers they stand for — $x + x = 2x$ for exactly the same reason that $5 + 5 = 2 \cdot 5$.

The single most useful realization in beginning algebra is that variables behave exactly like numbers. The reason $3x + 2x = 5x$ is the same as the reason that $3$ apples $+$ $2$ apples $=$ $5$ apples: the units are the same, you just add the counts. If you find yourself unsure whether some algebraic move is legal, ask whether it would be legal with concrete numbers instead. The answer is almost always the same.

2. The anatomy of an expression

An algebraic expression is a mix of numbers, variables, and operations. Like $3x + 7$, or $2a^2 - 5ab + b^2$, or just $x$. Three pieces of vocabulary do most of the heavy lifting:

  • Term. A piece of an expression separated by $+$ or $-$ signs at the top level. In $3x + 7$, the terms are $3x$ and $7$. In $2a^2 - 5ab + b^2$, the terms are $2a^2$, $-5ab$, and $b^2$.
  • Coefficient. The numerical factor of a term. In $3x$, the coefficient is $3$. In $-5ab$, it's $-5$. A bare $x$ has coefficient $1$, and $-x$ has coefficient $-1$ — by convention they're written without the $1$.
  • Like terms. Terms whose variable parts (including exponents) are identical. $3x$ and $7x$ are like terms; $3x$ and $3x^2$ are not, because the exponent differs.
ExpressionTermsCoefficients
$5x + 9$$5x$, $9$$5$, $9$ (constant)
$x^2 - 4x + 7$$x^2$, $-4x$, $7$$1$, $-4$, $7$
$3ab - b + 2$$3ab$, $-b$, $2$$3$, $-1$, $2$
Why "$3x$" with no symbol between

In algebra, two factors written next to each other are multiplied. $3x$ means $3 \cdot x$. We drop the multiplication symbol because once $x$ is a letter, $3 \times x$ would look like $3 \times x$ and the $\times$ could be confused with another variable. It's a notational convenience; the operation is plain old multiplication.

3. Evaluating expressions

To evaluate an expression for a particular value of a variable, substitute the value in and then compute by the order of operations.

Evaluate $3x + 7$ at $x = 4$:

$$ 3 \cdot 4 + 7 = 12 + 7 = 19. $$

Evaluate $2x^2 - 5x + 1$ at $x = -2$:

$$ 2 \cdot (-2)^2 - 5 \cdot (-2) + 1 = 2 \cdot 4 - (-10) + 1 = 8 + 10 + 1 = 19. $$

Two things make evaluation feel less mechanical than it is. First, you have to remember to apply the order of operations after substituting — the substitution doesn't change the precedence. Second, when the substituted value is negative, wrap it in parentheses to avoid the $-3^2 \neq (-3)^2$ trap from the order-of-operations topic.

Always parenthesize negatives during substitution

Replace $x$ with $-2$ by writing $(-2)$, not $-2$. So $x^2$ becomes $(-2)^2 = 4$, not $-2^2 = -4$. The parentheses turn the negative into part of the number, exactly the way the order-of-operations rules require.

4. Simplifying: combining like terms and distributing

Simplifying an expression means rewriting it as something equivalent but shorter — typically by combining like terms and applying the distributive property. There are no new ideas here; these are the same rules of arithmetic, applied to expressions instead of numbers.

Combine like terms

You can add or subtract terms only when their variable parts match exactly. The coefficients combine; the variable part stays.

$$ 3x + 5x = 8x, \qquad 7y - 2y = 5y, \qquad 4a^2 + 3a^2 = 7a^2. $$

Unlike terms cannot be combined any further:

$$ 3x + 4y \;\;\text{stays as}\;\; 3x + 4y. $$

And don't confuse $x$ with $x^2$ — they're different variables, in effect:

$$ 3x + 2x^2 \;\;\text{stays as}\;\; 2x^2 + 3x. $$

Distribute

The distributive property: $a(b + c) = ab + ac$. In algebra it gets used constantly to remove parentheses.

$$ 3(x + 4) = 3x + 12, \qquad -2(y - 5) = -2y + 10. $$

Watch the second example — the negative sign distributes, too. $-2 \cdot (-5) = +10$, not $-10$. Sign errors during distribution are the most common slip in introductory algebra.

The combined move

A typical "simplify this" problem combines both moves:

$$ 4(x + 3) - 2(x - 1) = 4x + 12 - 2x + 2 = 2x + 14. $$

Distribute first, then combine like terms.

5. Expression versus equation

This distinction is small but loaded:

  • An expression is a piece of algebra with no $=$ sign. $3x + 7$, $x^2 - 1$, $\tfrac{a+b}{2}$ — all expressions. You can evaluate or simplify expressions, but you can't "solve" them, because there's nothing to solve for.
  • An equation is a statement that two expressions are equal: it has an $=$ sign. $3x + 7 = 19$, $x^2 = 9$, $\tfrac{a+b}{2} = c$ — equations. You can solve equations for a variable, or check whether a particular value makes them true.

"Solve $3x + 7$" doesn't make sense — there's no equation to solve. "Solve $3x + 7 = 19$" does, and the answer is $x = 4$.

Equations get their own topic in the Algebra chapter. This one is about everything you can do before the equals sign shows up.

6. Translating words into algebra

Half of what makes algebra useful is being able to read a word problem and write down the expression that captures it. The translation rules below come up constantly.

EnglishAlgebra
"the sum of $x$ and $5$"$x + 5$
"$7$ more than a number"$n + 7$
"the difference of $a$ and $b$"$a - b$
"three times a number"$3n$
"twice $x$, decreased by $4$"$2x - 4$
"a number divided by $6$"$\tfrac{n}{6}$
"the square of $y$"$y^2$
"five more than the product of $3$ and $x$"$3x + 5$
"Less than" reverses the order

"$5$ less than $x$" is $x - 5$, not $5 - x$. The "less than" wording subtracts from $x$, so the $x$ stays on the left. This is one of the more reliable traps in word-problem translation, so when you see "less than," reread.

7. Common pitfalls

Combining unlike terms

$3x + 4y$ is not $7xy$ or $7x$ or $7y$ — it just stays as $3x + 4y$. You can only add coefficients of matching variable parts. If the parts differ in any way (different letters, different exponents), the terms are separate citizens and can't be merged.

Distributing a negative

$-2(x - 5)$ is $-2x + 10$, not $-2x - 10$. The negative sign goes onto both terms, including the negative inside, which double-negatives to a positive. This is by far the most common sign error in algebra.

Forgetting that bare $x$ has coefficient $1$

When combining $3x + x$, treat the second term as $1x$: you get $4x$. Similarly $x - x = 0$, not just "$x$." Writing the implicit $1$ explicitly is a useful habit when you're still building intuition.

Order matters in "less than" / "subtracted from"

"$5$ less than $x$" is $x - 5$; "$x$ less than $5$" is $5 - x$. Same for "subtracted from": "$3$ subtracted from $y$" is $y - 3$. Whichever object the action happens to is on the left.

8. Worked examples

Example 1 · Evaluate $5x - 2$ at $x = 3$ and at $x = -4$

At $x = 3$: $5 \cdot 3 - 2 = 15 - 2 = 13$.

At $x = -4$: $5 \cdot (-4) - 2 = -20 - 2 = -22$.

Same expression, different values. Answers: $\boxed{13}$ and $\boxed{-22}$.

Example 2 · Simplify $7x + 3 - 2x + 5$

Group like terms: $x$-terms together, constants together.

$$ (7x - 2x) + (3 + 5) = 5x + 8. $$

Answer: $\boxed{5x + 8}$.

Example 3 · Simplify $3(x + 4) - 2(x - 5)$

Distribute first:

$$ 3(x + 4) = 3x + 12, \qquad -2(x - 5) = -2x + 10. $$

Combine:

$$ 3x + 12 - 2x + 10 = (3x - 2x) + (12 + 10) = x + 22. $$

Answer: $\boxed{x + 22}$.

Example 4 · Evaluate $x^2 - 3x + 1$ at $x = -2$

Substitute, parenthesizing the negative:

$$ (-2)^2 - 3 \cdot (-2) + 1 = 4 - (-6) + 1 = 4 + 6 + 1 = 11. $$

Answer: $\boxed{11}$. If you wrote $-2^2$ instead of $(-2)^2$, you'd get the wrong sign on the first term.

Example 5 · Translate "the sum of twice a number and 3" into algebra

"A number" → let it be $n$.

"Twice a number" → $2n$.

"The sum of $2n$ and $3$" → $2n + 3$.

Answer: $\boxed{2n + 3}$.

Sources & further reading

Test your understanding

A quiz that builds from easy to hard. Pick an answer to get instant feedback and a worked explanation. Your progress is saved in this browser — come back anytime to continue.

Question 1 of N
0 correct