A variable is a symbol that represents a value. It can stand for an unknown number, a quantity that changes, or an arbitrary number in a general rule. Letters such as , and let us describe a relationship without writing a separate calculation for every possible value.
For example, means three more than . If , the expression has the value . If , it has the value . The value changes; the relationship stays the same.
On this page (7 sections)
What a variable represents
A letter gets its meaning from the problem, not from its place in the alphabet. In a measurement problem, might represent time. In another problem, it could represent temperature. Define the quantity before using the symbol, and include its unit when one is needed.
A variable represents a value, not the name of an object. Writing “ is the number of notebooks” is clearer than “ means notebooks.” This distinction tells us that means six notebooks, not that a notebook somehow equals six.
OpenStax introduces variables and constants through relationships between quantities. The useful question is not simply “Which letters can I see?” It is “What does each symbol represent here?”
An unknown value
In the equation below, represents a number we need to find.
Subtracting from both sides gives . The variable does not keep changing within this solution. We are identifying the value that makes the equation true.
A changing quantity
Suppose an example order costs per notebook plus a fixed delivery charge. Let be the number of notebooks and the total cost in dollars.
The same rule works for different order sizes. For two notebooks, ; for five, . Within this model, is the input and depends on it. The numbers and stay fixed.
Notebook costs for three order sizes
The rule is fixed even when the input changes.
Diagram explained
With , an input of gives , an input of gives , and an input of gives . The arrows connect inputs to outputs; they are not equals signs.
Reading expressions with variables
In ordinary algebra, writing a number next to a variable means multiplication. Thus means , not the two-digit numeral “4n.” Similarly, means the product of and when those letters have been defined as separate variables.
The expression contains two terms: and . Its coefficient is , and its constant term is . A coefficient is the numerical factor multiplying the variable part; the Coefficient article explains this distinction in detail.
An expression represents a value. An equation states that two expressions are equal. You can evaluate once is given. To solve for an unknown , you need a condition such as . A letter on its own is not an instruction to “solve.”
Substituting a value
To evaluate an expression, replace every occurrence of a variable with its assigned value, then follow the order of operations. Parentheses make a substitution especially clear when the replacement is negative.
For :
Both occurrences of receive the same value. The square applies to the whole substituted number , so . It does not mean , which equals .
Also distinguish multiplication from a power. When , , whereas . In the first expression, the coefficient multiplies the value. In the second, the exponent tells us to multiply two factors of that value.
Which values are allowed?
The domain is the set of permitted values. Context may restrict it: a count of notebooks in an order must be a positive whole number, while a measured length may include fractions or decimals. A formula can impose its own restrictions too.
Division by zero is undefined. Substituting does not produce an unusually large answer; it makes this expression undefined. Check restrictions before calculating rather than discovering them after an invalid step.
A letter is not automatically a variable in every setting. The symbol conventionally names a fixed number. In a family of rules such as , can be a parameter: a value chosen and then held fixed while varies. Its role depends on how the problem defines it.
Turning words into algebra
Start by naming the quantity, then describe what happens to it. “Three less than twice a number” becomes . “Twice the difference between a number and three” becomes . The parentheses preserve a different relationship.
For , the first expression gives and the second gives . Trying a value can expose a translation mistake, but the words and grouping determine the expression.
Before moving on, ask whether each letter has a clear meaning, whether repeated letters received the same value, and whether the result fits the context. From here, polynomials show how variable terms combine into more structured expressions.
Practice questions
- Evaluate when .
- Solve .
- Write an expression for “half a number, then add five.”
Check your answers
- .
- Subtract from both sides: . Check: .
- . The expression would mean adding five before taking half.
Sources and further reading
OpenStax, Elementary Algebra 2e, §1.2: Use the Language of Algebra. Reference for variables, expressions, equations and substitution. The examples and diagram in this article were developed for CTS.
