A variable is a letter or symbol that represents a number or value, usually one that can change or is not yet known. In n + 5 = 12, the variable n is an unknown that equals 7. In A = lw, the variables l and w can take many values. Any letter can be a variable, not just x.
A variable can be an unknown (one value that solves an equation) or a quantity that varies (many values, as in a formula or function). The number in front of it is its coefficient.
Formal definition and notation
A variable is a symbol that stands for an element of a specified set, usually the real numbers. It can name one unknown value that an equation determines, any value in a set (as in a formula or an identity such as a + b = b + a), or a quantity that changes together with another quantity in a function, such as x and y in y = 3x.
Symbol
Read it as
Meaning
x, y, n
x, y, n
common variable letters, usually printed in italics
A gym charges a 25-dollar joining fee plus 18 dollars per month. Write an expression for the total cost after m months, then find the cost for 9 months.
The monthly charge changes with m: 18m dollars.
Add the one-time fee: total cost = 25 + 18m.
Substitute m = 9: 25 + 18(9) = 25 + 162.
Add: 187.
Answer: The expression is 25 + 18m, and 9 months cost 187 dollars.
Common mistakes
✗ MistakeIn 3n + 2, there is no variable because there is no x.
✓ InsteadThe variable is n. Any letter or symbol can represent a value.
A variable does not always have to be x. Writers often pick a letter that reminds them of the quantity, such as t for time.
✗ MistakeIf x = 4, then 3x = 34.
✓ Instead3x = 3 × 4 = 12.
Writing a number next to a variable means multiply. Use parentheses when you substitute: 3(4).
✗ MistakeIn x + x = 10, the two x‘s could be 3 and 7.
✓ InsteadBoth are the same value: 2x = 10, so x = 5.
Inside one problem, a letter stands for the same number every time it appears. Use different letters for different quantities.
✗ MistakeIn x + 6, the coefficient of x is 0.
✓ InsteadThe coefficient is 1, because x = 1 × x.
A coefficient of 1 is not written, but it is there. A coefficient of 0 would make the term disappear.
An expression is a whole math phrase such as 4x + 7. A variable is one symbol inside it.
Quick check: 3 questions
Question 1 of 3
In 7k − 3, what is the variable?
Show answer and explanation
Answer: B. The variable is the letter, k. The 7 is its coefficient, −3 is the constant, and 7k is a whole term (coefficient times variable).
Question 2 of 3
What is the value of 2x + 3y when x = 5 and y = −1?
Show answer and explanation
Answer: C.2(5) + 3(−1) = 10 − 3 = 7. Choice A uses y = 1 (drops the negative sign), B reads 2x as 25, and D just adds 5 + (−1).
Question 3 of 3
Which expression means 5 less than twice a number n?
Show answer and explanation
Answer: A. Twice a number is 2n; 5 less than that subtracts 5 from it: 2n − 5. Choice B subtracts in the wrong order, C subtracts before doubling, and D adds.
Variable: frequently asked questions
Why do we use letters in math?
Letters let us write a rule before we know the exact number, and write one rule that works for every number. A = lw gives the area of any rectangle, and n + 5 = 12 lets us name a number we have not found yet. Without variables, each case would need its own sentence.
Is a variable always an unknown?
No. Sometimes it is one unknown number, such as n in n + 5 = 12. Sometimes it can be any number in a set, as in the formula P = 4s or the rule a + b = b + a. In a function such as y = 3x, the variables change together.
What are independent and dependent variables?
In a relationship between two variables, the independent variable is the input you choose and the dependent variable is the output that depends on it. If a taxi charges 2 dollars per mile, c = 2m: the miles m are independent and the cost c is dependent. On a graph, the independent variable usually goes on the x-axis.
Real NumberA real number is any number that can be placed on the number line. The real numbers are all the rational numbers (fractions, integers, terminating and repeating decimals) together with all the irrational numbers (such as √2 and π). Square roots of negative numbers, like √−4, are not real.Number System · Grade 8, Algebra 1NumberA number is an amount or value used to count, measure, order and compare. We write numbers with digits (7), words (seven) or other symbols, but the number itself is the amount: 7 dots, the word seven and the numeral 7 all show the same number. Numbers include whole numbers, fractions, decimals and negatives.Number System · Kindergarten, Grade 1, Grade 2MultiplicationMultiplication is the operation that combines equal groups to find a total. The fact 4 × 6 = 24 means 4 groups of 6, or 6 + 6 + 6 + 6. The numbers you multiply are called factors, and the result is the product. Order does not matter: 6 × 4 is also 24.Operations · Grade 2, Grade 3, Grade 4CoefficientA coefficient is the number multiplied by a variable in a term. In 4a the coefficient is 4, in −3x it is −3, and in x it is 1, because x = 1x. The sign in front belongs to the coefficient. A number standing alone, with no variable, is a constant instead.Algebra · Grade 6, Grade 7, Grade 8ConstantA constant is a fixed value that does not change. In an expression, a constant is a number without a variable, such as 8 in x + 8 or −3 in 4a − 3. Special numbers such as π are constants too. Changing the variable changes the other terms, but never the constant.Algebra · Grade 6, Grade 7, Grade 8Independent VariableAn independent variable is an input value that can be chosen or changed. The dependent variable changes based on it. In y = 3x, x is the independent variable and y is the dependent one. On a graph the independent variable goes on the horizontal axis; in an experiment it is the factor you change on purpose.Functions · Grade 6, Grade 7, Grade 8Dependent VariableA dependent variable is the output value that changes based on the input. It responds to changes in the independent variable: in y = 2x + 1, y is the dependent variable because its value depends on x. On a graph it goes on the vertical axis, because its value depends on what the input was.Functions · Grade 6, Grade 7, Grade 8Constant TermA constant term is a term in an expression or equation that has no variable, so its value never changes. In 3x2 − 5x + 7, the constant term is 7. Its sign belongs to it: in x2 + 4x − 9 it is −9. In a word problem it is usually a fixed amount, such as a one-time fee.Algebra · Grade 6, Grade 7, Algebra 1SubstituteSubstitute means to replace a variable with a number or with an equal expression. In 4x − 1, substituting 3 for x gives 4(3) − 1. You substitute to evaluate expressions, to check whether a number is a solution, and to solve systems of equations by swapping in an equal expression.Algebra · Grade 6, Grade 7, Grade 8ExponentAn exponent tells how many times to use a base as a factor. It is the small raised number to the upper right of the base: in 53, the base is 5 and the exponent is 3, so 53 = 5 × 5 × 5 = 125. Any nonzero number with an exponent of 0 equals 1.Algebra · Grade 6, Grade 7, Grade 8ExpressionAn expression is a number, variable, or combination of numbers and variables joined by operations, without an equal sign. Examples are 7, 4x + 9 and 3(a − 2). Expressions can be simplified, but they are not solved unless they are part of an equation. You evaluate one by replacing each variable with a number.Algebra · Grade 6, Grade 7, Grade 8MileA mile (mi) is a US customary unit of length for long distances, equal to 5,280 feet or 1,760 yards. One mile is about 1.61 kilometers, so it is longer than a kilometer. Road distances and speed limits in the United States use miles and miles per hour.Measurement · Grade 4, Grade 5, Grade 6X-AxisThe x-axis is the horizontal number line on the coordinate plane. It crosses the vertical y-axis at the origin, (0, 0). The x-coordinate of a point tells how far to move along the x-axis, and every point on the x-axis has a y-coordinate of 0, such as (5, 0).Geometry · Grade 5, Grade 6, Grade 7Order of OperationsThe order of operations is the agreed sequence for evaluating an expression: parentheses first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. Without it the same expression would have several answers. Many students remember it as PEMDAS.Algebra · Grade 5, Grade 6, Grade 7EquationAn equation is a statement that two expressions are equal. It always has an equal sign, such as x + 5 = 12 or 3a = 18. Solving an equation means finding the value of the variable that makes it true: here x = 7 and a = 6. An expression like 4x + 7 has no equal sign, so it is not an equation.Algebra · Grade 6, Grade 7, Grade 8Linear EquationA linear equation is an equation whose graph is a straight line. In one variable, it usually has a variable to the first power, like 3x + 2 = 14. In two variables, it can be written in forms like y = mx + b, where m is the slope. No variable is squared, multiplied by another variable or in a denominator.Algebra · Grade 7, Grade 8, Algebra 1FunctionA function is a rule that gives exactly one output for each input. If you put in one x-value, a function gives back one y-value. In f(x) = 2x + 1, the input 3 gives the output 7. Two inputs may share an output, but one input can never have two different outputs.Functions · Grade 8, Algebra 1, Algebra 2PolynomialA polynomial is an expression built from variables and coefficients using only addition, subtraction, and multiplication, with whole-number exponents. Examples are 3x2 + 5x − 7 and x + 9. Its degree is the highest exponent it contains. A variable in a denominator or under a square root usually means the expression is not a polynomial.Algebra · Algebra 1, Algebra 2TermA term is a single number, a variable, or numbers and variables multiplied together, such as 7, x or −4xy2. In an expression, terms are the parts separated by plus and minus signs, so 5x2 − 3x + 8 has three terms. The sign in front of a term belongs to it.Algebra · Grade 6, Grade 7, Algebra 1Like TermsLike terms have exactly the same variables raised to exactly the same powers; only their coefficients may differ. 3x and 8x are like terms, and so are 5a2 and −2a2, but 4x and 4y are not. Only like terms can be combined by adding or subtracting their coefficients: 3x + 8x = 11x.Algebra · Grade 6, Grade 7, Grade 8