Variables and Expressions
Imagine you want to describe a rule that works for every number at once — "double it and add three" — without writing out infinitely many examples. That single idea, a letter standing in for any number, is the doorway to all of algebra. A variable lets you capture a pattern, a relationship, or an unknown quantity in one compact symbol, and an expression lets you build meaningful combinations out of those symbols.
This page is where arithmetic grows up. You already know how to add, multiply, and follow order of operations with numbers; here you learn to do the same with symbols, so that one line of algebra can speak about an entire family of situations at once. Master this and everything downstream — equations, functions, calculus — becomes readable.
Learning Objectives
By the end of this page, you should be able to:
- Explain what a variable is and distinguish it from a constant.
- Identify the terms, coefficients, and constants in an algebraic expression.
- Apply the distributive property to expand and factor expressions.
- Combine like terms correctly to simplify expressions.
- Use the order of operations (PEMDAS) to evaluate expressions without ambiguity.
- Substitute values into an expression and evaluate the result reliably.
Quick Answer
A variable is a symbol (usually a letter) that represents a number whose value can vary or is unknown. An algebraic expression is a combination of variables, numbers, and operations — such as — that has no equals sign, so it names a quantity rather than making a claim. Each additive piece is a term; the number multiplying a variable is its coefficient; a lone number is a constant. You simplify an expression by using the distributive property, , and by combining like terms (terms with the identical variable part). You evaluate an expression by substituting numbers for the variables and applying PEMDAS: Parentheses, Exponents, Multiplication/Division (left to right), Addition/Subtraction (left to right).
Where It Came From
For most of human history, mathematics had no symbols for the unknown at all. Problems were written entirely in words — a style historians call rhetorical algebra. A Babylonian scribe around 1800 BCE could solve what we would call a quadratic equation, but expressed it as a recipe in sentences: "I added the area and the side, and it was 3/4." There was no "" to point at, so every problem had to be reasoned about verbally, from scratch.
The first real crack toward symbolism came from Diophantus of Alexandria (around 250 CE), whose Arithmetica introduced abbreviations for the unknown and its powers. This syncopated algebra — shorthand, but not yet a true symbolic system — was a genuine leap, though his notation could not express general relationships flexibly.
The word algebra itself comes from al-Khwārizmī, a scholar in Baghdad around 820 CE, whose book al-Kitāb al-mukhtaṣar fī ḥisāb al-jabr wa'l-muqābala gave us the term al-jabr ("restoration," the act of moving a subtracted term to the other side). Remarkably, al-Khwārizmī still wrote everything in words — no symbols — yet he systematized methods that worked for whole classes of problems. That shift from clever one-off tricks to general procedures is the seed of everything here.
The true revolution — letters standing for numbers — arrived with the French mathematician François Viète around 1591. Viète had the decisive insight: use letters not just for unknowns but also for known but unspecified quantities (parameters). Suddenly you could write a formula once and it spoke about every case at once. A generation later René Descartes (1637) gave us the notation we still use today — for unknowns, for constants, and exponents written as superscripts like .
Why did this matter so much? Because a good symbol does part of the thinking for you. Once "the unknown" is a thing you can write down, move around, and manipulate mechanically, you no longer have to hold the entire problem in your head in words. The invention of the variable turned mathematics from a collection of verbal puzzles into a portable, general-purpose machine for reasoning.
Variables, Terms, Coefficients, and Constants
A variable is a placeholder for a number. In , the letter can stand for any number; if , the expression equals . Variables come in two flavours in practice: an unknown we want to find (as in an equation), or a parameter that can range over many values (as in a formula or function).
An expression is any legal combination of numbers, variables, and operations with no equals sign. Compare:
- is an expression — it names a quantity.
- is an equation — it makes a claim that could be true or false.
That distinction matters: you simplify or evaluate expressions, but you solve equations.
Inside an expression, the pieces separated by and signs are called terms. In
there are three terms: , , and (the sign travels with the term).
- The coefficient is the numerical multiplier of a term. In the coefficient is ; in it is .
- A constant is a term with no variable — here, . Its value never changes.
- The variable part of a term is what is left after the coefficient: and above.
A subtle point: a term like has coefficient (it is really ), and has coefficient . Forgetting this invisible is one of the most common beginner errors.
Worked Example: Dissecting an Expression
Take the expression
| Term | Coefficient | Variable part | Type |
|---|---|---|---|
| variable term | |||
| variable term | |||
| variable term | |||
| — | constant |
Note that has coefficient , not , and that a coefficient can be a fraction. There are four terms in two different variables, and .
The Distributive Property
The distributive property connects multiplication and addition. It states:
In words: multiplying a sum by a number is the same as multiplying each piece and adding. This is not a convention we chose — it is forced by what multiplication means (repeated addition / area). Picture a rectangle of height and width : its area is , but you can also split it into two rectangles of areas and . Same rectangle, two descriptions.
The property runs both ways. Read left to right you expand; read right to left you factor.
Worked Example: Expanding
Simplify .
Worked Example: A Negative Multiplier
Simplify . The multiplier is , and it distributes to both terms, keeping careful track of signs:
The second sign flip — — is where students most often slip. The safest habit is to treat subtraction as "plus a negative": is , then distribute.
Worked Example: Factoring (the reverse)
Rewrite as a product. Both terms share a factor of :
Check by expanding: . ✓
Combining Like Terms
Like terms are terms with exactly the same variable part — the same letters raised to the same powers. Only like terms can be added or subtracted, and doing so just means adding their coefficients. Think of it as counting: is "3 of something plus 5 of the same something," giving , exactly as 3 apples plus 5 apples is 8 apples.
Crucially, and are not like terms — and represent different quantities (a length versus an area, loosely), so cannot be collapsed into a single term. Likewise and are unlike.
Worked Example: Full Simplification
Simplify .
Step 1 — distribute:
Step 2 — group like terms (variable terms together, constants together):
Step 3 — combine:
So . Notice ; the coefficient became .
Worked Example: Two Variables and Powers
Simplify .
Group by identical variable parts:
- terms:
- terms:
- terms: (nothing to combine)
- constants:
Result: . The , , and terms stay separate because their variable parts differ.
Order of Operations (PEMDAS) and Evaluating
When you finally replace variables with numbers, the expression must give one unambiguous value. That requires an agreed order of operations, remembered by PEMDAS:
- Parentheses (and other grouping symbols) — innermost first
- Exponents (and roots)
- Multiplication and Division — left to right, as a single tier
- Addition and Subtraction — left to right, as a single tier
The two big traps: multiplication and division share a rank (you go left to right, not "all multiplication first"), and the same is true for addition and subtraction. "MD" and "AS" are pairs, not four separate steps.
Worked Example: Pure Arithmetic
Evaluate .
Worked Example: Evaluating an Expression by Substitution
Evaluate when .
Substitute, using parentheses around the to protect the sign:
The exponent applies only to the number in parentheses, so , not . Writing without parentheses would mean — a completely different value, and a classic exam trap.
Real-World Applications
- Physics and engineering. The distance a dropped object falls is . Here is a parameter (about ) and is a variable; one expression covers every falling object at every instant.
- Personal finance. A phone plan costing $20 plus $0.10 per gigabyte is the expression . Evaluate at to get $23. The variable lets one formula price every possible month.
- Computer programming. Variables are the core of code. A line like
total = price * quantity + shippingis an algebraic expression the machine evaluates using exactly the order-of-operations rules you just learned. - Medicine. Drug dosing often scales with body mass: , where is the per-kilogram rate and the patient's mass. One expression, safely applied to every patient.
- Everyday estimation. A recipe for that you want to make for people scales each ingredient by — a variable expression you evaluate on the fly.
Common Mistakes
1. Dropping the invisible coefficient of . Misconception: in , the terms somehow leave behind. Why it's wrong: means , so . Correction: always read a lone variable as having coefficient (and as ).
2. Distributing to only the first term. Misconception: . Why it's wrong: the multiplies every term inside, including the . Correction: . Draw arrows from the multiplier to each term as a check.
3. Mishandling exponents on negatives. Misconception: . Why it's wrong: without parentheses the exponent binds tighter than the negative sign, so . Correction: use only when the negative is genuinely inside the base — and always add parentheses when you substitute a negative value.
4. Treating M/D or A/S as strictly "M before D." Misconception: . Why it's wrong: multiplication and division share one rank and are done left to right. Correction: .
5. Combining unlike terms. Misconception: or . Why it's wrong: and are different quantities and cannot merge. Correction: leave it as ; only identical variable parts combine.
Comparison and Connections
| Idea | What it is | Has an sign? | What you do with it |
|---|---|---|---|
| Expression | A combination of numbers, variables, operations, e.g. | No | Simplify or evaluate |
| Equation | A claim that two expressions are equal, e.g. | Yes | Solve for the variable |
| Term | One additive piece of an expression, e.g. | — | Combine with like terms |
| Coefficient | Numerical multiplier of a term, e.g. the | — | Add across like terms |
| Constant | A term with no variable, e.g. | — | Combine with other constants |
The distributive property and combining like terms are inverse-flavoured operations: distributing breaks apart a product into a sum, while factoring reassembles a sum into a product. Both preserve the value of the expression for every input — that is what "simplify" really guarantees. This idea of equivalent-but-tidier expressions is exactly what powers solving linear equations and, later, functions.
Practice Questions
Recall
Identify the terms, coefficients, and constant in .
Answer: Terms are , , and . Coefficients are (on ) and (on ). The constant is .
Understanding
Simplify .
Answer: Distribute: . Combine like terms: .
Application
Evaluate when , , and .
Answer: The fraction bar groups numerator and denominator. Numerator: . Then .
Analysis
A rectangle has width and a length that is more than twice the width. Write a simplified expression for its perimeter, then evaluate it for .
Answer: Length . Perimeter . At : . (Check directly: width , length , perimeter . ✓)
FAQ
Q: What's the actual difference between an expression and an equation? An expression (like ) names a quantity and has no equals sign — you can simplify or evaluate it but there's nothing to "solve." An equation (like ) asserts two things are equal, which you can solve to find the variable's value.
Q: Why does a letter with nothing in front of it have coefficient 1? Because multiplying by changes nothing, mathematicians simply don't write it: and are the same. Making the visible () is helpful when you're learning to combine like terms so you don't accidentally drop the term.
Q: Is equal to or ? It's . The exponent applies only to the , giving , and the leading minus then negates it. You need parentheses, , to get .
Q: Does it matter whether I do multiplication or division first? No — they share the same priority. You work left to right through whichever comes first. Same for addition and subtraction. That left-to-right rule removes any ambiguity.
Q: Can a variable stand for more than one number at the same time? Within a single evaluation, a variable holds one value. But across a formula it's meant to represent any value from some allowed set — that generality is the whole point. In an equation, solving means finding the specific value(s) that make the statement true.
Q: Why can't I combine and into or ? Because and can be different numbers, so " of the 's" and " of the 's" are counts of different things. Only terms with identical variable parts combine. is already fully simplified.
Quick Revision
- Variable: a symbol for a number that can vary or is unknown; constant: a fixed number.
- Term: an additive piece; coefficient: its numerical multiplier; a lone variable has coefficient .
- Expression has no (simplify/evaluate); equation has (solve).
- Distributive property: — distribute to every term, signs included.
- Like terms share the identical variable part; combine by adding coefficients. and are unlike.
- PEMDAS: Parentheses, Exponents, Multiply/Divide (left to right), Add/Subtract (left to right).
- Watch: but ; always parenthesize substituted negatives.
Related Topics
Prerequisites
- Algebra overview — the big picture of what algebra is for.
Related Topics
- Exponents and Logarithms — the rules behind those variable powers.
- Functions — expressions viewed as input-output machines.
Next Topics
- Linear Equations — set two expressions equal and solve for the unknown.
- Quadratic Equations — expressions with an term and how to solve them.