Variables in Math
A variable is a letter, like x or n, that stands for a number. Variables in math let you write a rule that works for many numbers, or hold the place of a number you don’t know yet. In 3x + 5, the letter x is the variable. If x = 2, then 3x + 5 = 11.
Before this lesson: You should know the order of operations and how to multiply and divide negative numbers.
What Is a Variable?
A variable is a symbol that stands for a number. Most of the time, the symbol is a letter.
Think of a variable as a labeled box. You can put a number in the box, and the rule around it still works.
Variables do two main jobs:
- They hold the place of an unknown number. In x + 4 = 10, the variable x is one number you need to find. Here, x = 6.
- They stand for a number that can change. A pizza costs $12. The cost of p pizzas is 12p dollars. The value of p changes from order to order.
A number that never changes, like 12 or -3, is called a constant.
Variables, Coefficients and Constants
Look at the expression 3x + 5. It has three parts.
- Variable: the letter. Here it is x.
- Coefficient: the number that multiplies the variable. Here it is 3.
- Constant: a number on its own. Here it is 5.
When no number is written in front of a variable, the coefficient is 1. So x means 1x, and -x means -1x.
How to Write Variables
Algebra has a few writing rules for variables. They make expressions shorter and easier to read.
| In words | Written in algebra | Rule |
|---|---|---|
| 3 times x | 3x | Put the number first. Leave out the times sign. |
| x times y | xy | Write the letters side by side. |
| x divided by 4 | \frac{x}{4} | Use a fraction bar. |
| x times x | x^2 | Use an exponent. Say it as “x squared.” |
| 3 times 4 | 3 \cdot 4 or 3(4) | Use a dot or parentheses between numbers. |
Algebra drops the × sign because it looks too much like the letter x. Always write the number before the letter: 3x, not x3.
You can use any letter as a variable. In a word problem, pick a letter that reminds you of the quantity, like t for time or C for cost. Say what the letter means before you use it, for example: let t = the number of hours.
Worked Examples
Example 1: Name the parts
Name the variable, the coefficient and the constant in 7y - 2.
Step 1. Subtracting 2 is the same as adding -2, so think of the expression as 7y + (-2).
Step 2. The letter is y, the number in front of it is 7, and the number on its own is -2.
Answer: The variable is y, the coefficient is 7, and the constant is -2.
Example 2: Find the value of an expression
Find the value of 4n + 3 when n = 5.
Step 1. Replace n with 5. Put the 5 in parentheses so you keep the multiplication.
Step 2. Multiply first, then add.
\begin{aligned}
4n + 3 &= 4(5) + 3 \\
&= 20 + 3 \\
&= 23
\end{aligned}Answer: 4n + 3 = 23 when n = 5.
Example 3: Substitute a negative number
Find the value of x^2 + 4x when x = -3.
Step 1. Replace each x with (-3). The parentheses matter here.
Step 2. Do the exponent first, then multiply, then add.
\begin{aligned}
x^2 + 4x &= (-3)^2 + 4(-3) \\
&= 9 + (-12) \\
&= -3
\end{aligned}Answer: -3. Note that (-3)^2 = 9, because a negative times a negative is positive.
Example 4: Word problem
A gym charges $25 to join, plus $10 for each month. Write an expression for the total cost. Then find the cost for 6 months.
Step 1. Choose a variable and say what it means. Let m = the number of months.
Step 2. Each month adds $10, so the months cost 10m dollars. The $25 is paid once, so it is a constant.
\text{cost} = 10m + 25Step 3. Replace m with 6.
10(6) + 25 = 60 + 25 = 85
Answer: The total cost is 10m + 25 dollars. For 6 months, it costs $85.
Example 5: Use a formula with two variables
The perimeter of a rectangle is P = 2l + 2w, where l is the length and w is the width. A garden is 12 feet long and 7.5 feet wide. Find its perimeter.
Step 1. Replace l with 12 and w with 7.5.
Step 2. Multiply, then add.
\begin{aligned}
P &= 2(12) + 2(7.5) \\
&= 24 + 15 \\
&= 39
\end{aligned}Answer: The perimeter is 39 feet.
Common Mistakes
| Mistake | What it looks like | How to fix it |
|---|---|---|
| Writing the digits side by side | If x = 4, then 3x = 34 | 3x means 3 times x: 3(4) = 12. |
| Leaving out parentheses with a negative | If x = -3, then x^2 = -3^2 = -9 | Write (-3)^2. It equals 9. |
| Dropping the sign of the constant | In 7y - 2, the constant is 2 | The constant keeps its sign: it is -2. |
| Saying a lone variable has no coefficient | In x + 8, the coefficient is 0 | x means 1x, so the coefficient is 1. |
| Not saying what the variable means | Writing 10m + 25 with no explanation | Start with “Let m = the number of months.” |
Quick check: After you substitute, read your answer back in words. Does it make sense for the problem?
Variables in Formulas You Already Know
A formula is a rule written with variables. Each letter stands for a quantity that can change.
| Formula | What the variables mean |
|---|---|
| A = lw | Area of a rectangle: A is area, l is length, w is width |
| P = 4s | Perimeter of a square: P is perimeter, s is side length |
| d = rt | Distance: d is distance, r is rate (speed), t is time |
| C = 2\pi r | Circumference of a circle: C is circumference, r is radius |
Not every letter is a variable. The Greek letter \pi (pi) stands for one fixed number, about 3.14, so it is a constant.
Variables also let you write rules for whole lists of numbers. You’ll build on this in algebraic expressions, where you write and find the value of longer expressions.
Practice Problems
Find the value or answer for each problem. Show each step.
- Name the variable, the coefficient and the constant in 9k + 4.
- Name the variable, the coefficient and the constant in -m - 8.
- Find the value of 6x - 5 when x = 3.
- Find the value of 12 - 4b when b = -2.
- Find the value of a^2 + 2a when a = -5.
- Find the value of \frac{x}{3} + 7 when x = 18.
- Find the value of 3xy when x = 2 and y = -4.
- Rewrite in algebra form: (a) 7 times p, (b) n divided by 2, (c) k times k.
- A phone plan costs $15 a month plus $0.10 for each text. Let t = the number of texts. Write an expression for the monthly cost. Then find the cost for 80 texts.
- Use d = rt to find how far a cyclist rides at 14 miles per hour for 2.5 hours.
Answers
Show answers
- The variable is k, the coefficient is 9, and the constant is 4.
- Think of it as -1m + (-8). The variable is m, the coefficient is -1, and the constant is -8.
- 6(3) - 5 = 18 - 5 = 13
- 12 - 4(-2) = 12 + 8 = 20
- (-5)^2 + 2(-5) = 25 + (-10) = 15
- \frac{18}{3} + 7 = 6 + 7 = 13
- 3(2)(-4) = 6(-4) = -24
- (a) 7p, (b) \frac{n}{2}, (c) k^2
- The cost is 0.10t + 15 dollars. For 80 texts: 0.10(80) + 15 = 8 + 15 = 23, so the cost is $23.
- d = 14(2.5) = 35, so the cyclist rides 35 miles.
Variables FAQ
What is a variable in math?
A variable is a letter or symbol that stands for a number. It can stand for an unknown number, like x in x + 4 = 10, or a number that changes, like the number of months in a cost formula.
What is the difference between a variable and a constant?
A variable’s value can change or is unknown. A constant always has the same value, like 5 in 3x + 5 or the number \pi.
What is a coefficient?
A coefficient is the number that multiplies a variable. In -4y, the coefficient is -4. In y by itself, the coefficient is 1.
What are independent and dependent variables?
In y = 2x + 3, you choose the value of x, so it is the independent variable. The value of y depends on x, so it is the dependent variable.
Summary
- A variable is a letter that stands for a number.
- A variable can hold the place of an unknown number or stand for a number that changes.
- In 3x + 5, 3 is the coefficient, x is the variable, and 5 is the constant.
- A variable with no number in front has a coefficient of 1.
- To find the value of an expression, replace each variable with its number in parentheses, then follow the order of operations.
Previous lesson: Probability (the last lesson of Pre-Algebra)
Next lesson: Algebraic Expressions
Back to the Algebra 1 Index
