What is a Variable in Math? Definition, Types
Book A Free Math Class
What is a Variable in Math? Definition, Types
TL;DR
A variable in math is a letter that stands for an unknown or changing value — typically xxx, yyy, zzz, aaa, bbb, or nnn. Variables are the language of algebra. There are two main types: independent variables (the input you choose) and dependent variables (the output that depends on the input).
What Is a Variable in Math?
A variable is a letter or symbol that represents a number whose value can change or is not yet known. Unlike a constant (a number whose value is fixed), a variable can take on many different values.
The most common letters used as variables:
- xxx, yyy, zzz — typically for unknowns (variables you're solving for)
- aaa, bbb, ccc — often constants in equations, but can be variables too
- nnn — typically for an integer or natural number
- ttt — time
- rrr — radius or rate
In the equation 3x+5=143x + 5 = 143x+5=14, the letter xxx is the variable — you're trying to find the specific number that makes the equation true.
What Are the Types of Variables?
Variables come in several types depending on context.
Independent and Dependent Variables
The most important distinction is between independent and dependent variables.
- Independent variable — the input you choose or control. It doesn't depend on any other variable. Usually plotted on the x-axis.
- Dependent variable — the output, whose value depends on the input. Usually plotted on the y-axis.
Example. In y=2x+3y = 2x + 3y=2x+3:
- xxx is the independent variable (you choose its value).
- yyy is the dependent variable (its value follows from xxx).
When you plot this on a graph, xxx runs along the horizontal axis and yyy along the vertical axis.
Discrete and Continuous Variables
- Discrete variable — can only take certain specific values (usually whole numbers). Number of students in a class, number of cars in a parking lot.
- Continuous variable — can take any value within a range. Height, temperature, time.
Qualitative and Quantitative Variables
In statistics:
- Qualitative (categorical) variable — describes a category. Eye colour, favourite subject.
- Quantitative (numerical) variable — describes an amount. Age, score, weight.
Variables vs. Constants
Both variables and constants appear in algebraic expressions, but they behave differently.
| Feature | Variable | Constant |
|---|---|---|
| Value | Can change | Fixed |
| Notation | Letter (xxx, yyy, ttt) | Number (555, −3, π) |
| Example | xxx in 3x+5 | 555 in 3x+5 |
| Coefficient | The number multiplying it | N/A |
Some "constants" are written with letters too — like π≈3.14159 (a fixed irrational number) or e≈2.71828 (Euler's number). These are named constants, not variables.
Where Did the Variable Concept Come From? (The Real-World GROUND)
"Let us call the unknown quantity A, and the known quantity B…" — François Viète, In Artem Analyticen Isagoge, 1591.
The variable as a symbolic object in mathematics is younger than most people assume. Before the late 16th century, mathematicians wrote out problems in words — "find the number such that twice the number plus three equals fifteen." The systematic use of letters for unknowns was introduced by François Viète in his 1591 book In Artem Analyticen Isagoge. Viète used vowels (A, E, I, O, U) for unknowns and consonants (B, C, D…) for known quantities — the first formal separation of variable and constant.
A century later, René Descartes refined the notation to what's used today: letters near the end of the alphabet (xxx, yyy, zzz) for unknowns and letters near the beginning (aaa, bbb, ccc) for constants. This is from his 1637 book La Géométrie. Every algebra textbook in the world uses Descartes's convention.
The reason the variable matters: it's the linguistic shift that turned mathematics from a collection of clever tricks into a general system. With variables, the quadratic formula x=−b±b2−4ac2a solves every quadratic, not just specific numerical ones.
Real-world variable use:
- Physics. Time (ttt), position (xxx), velocity (vvv), acceleration (aaa) — independent and dependent in motion equations.
- Economics. Price (ppp), quantity (qqq), interest rate (rrr) — variables in supply-demand and growth models.
- Statistics. Sample size (nnn), mean (μ), standard deviation (σ) — variables in every statistical formula.
- Computer programming. Every line of code that stores a value uses a variable.
- Spreadsheets. Cell references like A1, B5 act as variables in formulas.
- Machine learning. Input features (x1,x2,…), output labels (yyy), and model weights (www) are all variables.
A Worked Example
In the equation y=5x−2, identify the independent and dependent variables.
The intuitive (wrong) approach. A student in a hurry guesses based on the position in the equation:
y=?independent, because it’s on the left side
Why it fails. Position in the equation doesn't determine which variable is independent. The relationship is what matters: which variable's value is chosen freely, and which depends on it?
The correct method.
Step 1: Identify the variable being computed. yyy is computed from xxx. So xxx is the input (chosen) and yyy is the output (depends on xxx).
Step 2: Independent = xxx. Dependent = yyy.
When graphed, xxx goes on the horizontal axis, yyy on the vertical. For every xxx value, the formula spits out one yyy value.
Check. Plug in x=3: y=5(3)−2=13. You chose xxx; yyy was forced.
At Bhanzu, our trainers teach the independent-dependent distinction by asking "which variable do you control?" The one you control (or choose) is independent; the one that follows is dependent.
What Are the Most Common Mistakes With Variables?
Mistake 1: Confusing variable with constant
Where it slips in: Treating π or e as a variable because they're written with letters.
Don't do this: Call π a variable.
The correct way: π is a named constant — its value (≈3.14159) is fixed. Same for e (≈2.71828). Variables represent values that can change; constants have fixed values, even when written with symbols.
Mistake 2: Mixing up independent and dependent
Where it slips in: Plotting the dependent variable on the x-axis or vice versa.
Don't do this: Plot yyy on the x-axis when yyy depends on xxx.
The correct way: Independent (input, free choice) on x-axis. Dependent (output, computed) on y-axis. The graph reads "input → output" left-to-right.
Mistake 3: Treating "x" as always being the same variable across problems
Where it slips in: Two different problems both use xxx, and students assume the values must be the same.
Don't do this: Carry the value of x=3 from one problem to another problem that also has xxx.
The correct way: Variables are local to their problem. xxx in problem 1 has nothing to do with xxx in problem 2. The letter is just a label.
A Practical Next Step
Try these three before moving on to algebraic expressions.
- In z=4w−7, which variable is independent and which is dependent?
- Identify the variables and constants in 2a+5b−3.
- A water tank has 100 litres and drains at 5 litres per minute. Write an equation for the water remaining LLL after ttt minutes. Which variable is independent?
Frequently Asked Questions
What is a variable in math?
A variable is a letter (like xxx, yyy, or ttt) that stands for a number whose value isn't fixed. In 3x+5=14, the letter xxx is the variable — we're trying to find what number it equals.
What are the types of variables in math?
Main types: independent (input you choose), dependent (output that follows), discrete (specific values like integers), continuous (any value in a range), qualitative (categories), and quantitative (numbers).
What's the difference between a variable and a constant?
A variable's value can change; a constant's value is fixed. In 3x+5, xxx is variable and 555 is constant. The number π is also a constant, even though it's written with a Greek letter.
What is an independent variable?
The variable you choose or control — the input. In y=2x+1, xxx is independent because you pick its value first. Plotted on the x-axis.
What is a dependent variable?
The variable whose value depends on (is determined by) another variable — the output. In y=2x+1, yyy is dependent because its value follows from xxx. Plotted on the y-axis.
Can a variable be negative?
Yes — a variable can take any value, including negative numbers, fractions, irrational numbers, or even zero (unless the problem specifies a restricted domain).