Google Play badge

Use variables to represent numbers and write expressions when solving a real-world or mathematical problem; understand that a variable can represent an unknown number, or, depending on the purpose at hand, any number in a specified set.


Using Variables to Represent Numbers and Write Expressions

What do movie tickets, video game points, and the number of laps you run all have in common? In each case, the number can change. Sometimes you know it, and sometimes you do not. Mathematics has a powerful shortcut for this: instead of writing every possible number, we use letters to stand for numbers. That simple idea lets us describe patterns, write rules, and solve problems much faster.

Why Variables Matter

A variable is a letter or symbol that represents a number. In some problems, the number is unknown, and we want to find it. In other problems, the number can change, so the variable stands for any number in a certain set. For example, if a notebook costs $3 and you buy some notebooks, the number of notebooks can be represented by a variable such as \(n\).

Then the total cost is \(3n\). If \(n = 2\), the cost is \(3 \cdot 2 = 6\). If \(n = 5\), the cost is \(3 \cdot 5 = 15\). One short expression can describe many situations.

Algebra may feel modern, but people have used symbols to stand for unknown quantities for hundreds of years. This idea helped mathematicians describe patterns that work for all numbers, not just one example.

Variables are useful because they help us write general rules. Instead of saying, "double a number and add \(4\)" over and over for different numbers, we can write \(2x + 4\). That expression works whether \(x\) is \(1\), \(10\), or \(100\).

Variables, Expressions, and Equations

Three important algebra ideas are closely connected, as [Figure 1] shows: variables, expressions, and equations. A variable stands for a number. An expression is a math phrase with numbers, operations, and sometimes variables, such as \(5x\), \(x + 7\), or \(2a - 3\). An equation is a statement that two expressions are equal, such as \(x + 7 = 12\).

An expression does not have an equals sign. It represents a quantity. An equation does have an equals sign. It tells us that two quantities have the same value. This difference matters because writing an expression and solving an equation are not the same job.

comparison chart showing a variable as a labeled box with x, an expression made of terms like x plus 7, and an equation with an equals sign such as x plus 7 equals 12
Figure 1: comparison chart showing a variable as a labeled box with x, an expression made of terms like x plus 7, and an equation with an equals sign such as x plus 7 equals 12

For example, \(4m + 1\) is an expression. It could represent the number of wheels on \(m\) cars plus one extra wheel. But \(4m + 1 = 17\) is an equation. It asks which value of \(m\) makes the statement true.

Variable means a symbol that represents a number.

Expression means a combination of numbers, operations, and variables with no equals sign.

Equation means a math statement showing that two expressions are equal.

Sometimes a variable stands for one unknown value. In \(x + 7 = 12\), the value of \(x\) must be \(5\). Other times the variable can stand for many values. In \(y = 2x\), the value of \(x\) can be \(1\), \(3\), \(10\), or many other numbers, and \(y\) changes to match.

Writing Expressions from Words

Algebra often begins with turning words into symbols. This translation is easier when you know what operation the words suggest, and [Figure 2] organizes several common phrase patterns. Words like sum and more than suggest addition. Words like difference and less than suggest subtraction. Product means multiplication, and quotient means division.

Here are some examples. "A number plus \(8\)" can be written as \(x + 8\). "\(5\) less than a number" is \(x - 5\). "\(5\) more than a number" is \(x + 5\). "Twice a number" is \(2x\). "The quotient of a number and \(4\)" is \(\dfrac{x}{4}\).

Be careful with word order. "\(7\) less than a number" means start with the number and subtract \(7\), so it is \(x - 7\). But "a number less than \(7\)" is not a common phrase for this grade level and can sound confusing. Reading closely matters.

chart matching verbal phrases to algebraic expressions, including sum, difference, product, quotient, more than, and less than with short examples
Figure 2: chart matching verbal phrases to algebraic expressions, including sum, difference, product, quotient, more than, and less than with short examples

Parentheses can also help group ideas. "Three times the sum of a number and \(2\)" is \(3(x + 2)\), not \(3x + 2\). The parentheses show that you add first, then multiply.

Recall the order of operations: parentheses first, then multiplication and division, then addition and subtraction. This helps you read and write expressions correctly.

When you write an expression, choose a variable and clearly state what it means. If \(n\) stands for the number of students, then \(6n\) could mean the number of wheels on \(n\) bicycles, but it would not make sense for the number of corners on \(n\) triangles. Algebra must match the situation.

Variables in Real-World Problems

Real problems often have a fixed part and a changing part. A single expression can model all possible outcomes, as [Figure 3] illustrates with a cost situation. Suppose a school fair charges $4 to enter, and each game ticket costs $2. If \(t\) is the number of tickets bought, the total cost is \(2t + 4\).

In this expression, the \(4\) is fixed because everyone pays it. The \(2t\) changes depending on how many tickets are bought. If \(t = 3\), the total cost is \(2(3) + 4 = 10\). If \(t = 7\), the total cost is \(2(7) + 4 = 18\).

school fair ticket booth with a sign showing entry fee and ticket price, and a student buying different numbers of tickets to represent a total-cost expression
Figure 3: school fair ticket booth with a sign showing entry fee and ticket price, and a student buying different numbers of tickets to represent a total-cost expression

Geometry also uses variables. The perimeter of a rectangle with length \(l\) and width \(w\) is \(2l + 2w\). This formula works for any rectangle. Here the variables do not stand for one secret number. They can stand for any positive lengths.

Patterns in tables can be modeled with variables too. If the number of matchsticks in Figure \(n\) follows the rule \(3n + 1\), then using a variable lets you find the number in the \(10\)th figure without drawing every earlier figure.

When a Variable Means One Unknown Number

Sometimes the purpose is to find a single value. In that case, the variable represents an unknown number. For example, if Mia has some stickers and then gets \(6\) more to make \(14\) total, we can let \(s\) represent the unknown starting number and write

\(s + 6 = 14\)

Now the variable stands for one value: \(8\). The equation is true only when \(s = 8\).

This idea connects directly to solving one-variable equations. You can think, "What number plus \(6\) equals \(14\)?" or use the opposite operation: subtract \(6\) from both sides. Either way, you get \(s = 8\).

Unknown value versus changing value

A variable does not always have the same job. In an equation like \(x + 9 = 20\), the variable stands for one unknown number to be found. In an expression like \(3x + 2\), the variable can stand for many numbers, depending on the situation. Understanding the purpose of the variable is just as important as writing the symbols correctly.

Another example is \(5m = 35\). The variable \(m\) must be \(7\). Only one value makes the equation true.

When a Variable Can Mean Any Number in a Set

In many situations, a variable represents any number in a set. For Grade 6 work, the set may be whole numbers, integers, or positive numbers, depending on the context. If \(n\) means the number of weeks, then \(n\) would usually be a whole number such as \(0\), \(1\), \(2\), or \(10\), because half a week may not fit the situation you are modeling.

For example, the expression \(8n\) could represent the number of legs on \(n\) spiders. Here \(n\) can be \(1\), \(2\), \(3\), and so on, but not \(-1\), because a negative number of spiders does not make sense. The context decides which values are reasonable.

This is why variables are so powerful. They let us write one rule that works again and again. The rectangle perimeter formula \(2l + 2w\) works for all rectangles with positive side lengths. The fair-cost expression \(2t + 4\), like the situation in [Figure 3], works for every whole-number ticket count that makes sense.

Checking and Interpreting Expressions

Once you write an expression, you should be able to explain what each part means. In \(7d\), the \(7\) tells how much for each item or each group, and \(d\) tells how many groups there are. In \(7d + 3\), the \(3\) is an extra amount added once.

To check an expression, substitute a value for the variable. Substitution means replacing a variable with a number. If the expression is \(4x + 5\) and \(x = 3\), then

\[4(3) + 5 = 12 + 5 = 17\]

This helps you test whether your expression makes sense. If a gym charges $10 to join and $5 per class, then \(10c + 5\) would not make sense because the joining fee should only be added once. The correct expression is \(5c + 10\).

Common Mistakes to Avoid

One common mistake is reversing subtraction phrases. "\(4\) less than a number" is \(x - 4\), not \(4 - x\). Another mistake is forgetting parentheses. "Twice the sum of \(a\) and \(3\)" is \(2(a + 3)\), not \(2a + 3\).

A third mistake is confusing an expression with an equation. If a problem asks you to write an expression for the cost of \(n\) pencils at $2 each, the answer is \(2n\), not \(2n = \) something. There is no total given, so there is no equation yet.

A fourth mistake is not saying what the variable represents. Writing \(3x + 2\) is not complete modeling unless you explain what \(x\) means. Good algebra is clear algebra.

Solved Examples

Worked examples show how to move from words to symbols and from symbols to meaning. Notice how the variable's job changes from one problem to another, just as it did in the comparison shown earlier in [Figure 1].

Worked example 1

Write an expression for "\(9\) more than three times a number."

Step 1: Choose a variable.

Let \(x\) represent the number.

Step 2: Translate "three times a number."

Three times the number is \(3x\).

Step 3: Translate "\(9\) more than."

Add \(9\) to get \(3x + 9\).

The expression is \(3x + 9\)

This expression does not name one answer. It represents many possible values, depending on the value of \(x\).

Worked example 2

A pizza shop charges $8 for a small pizza plus $2 for each topping. Write an expression for the cost of a pizza with \(t\) toppings, then find the cost when \(t = 4\).

Step 1: Identify the fixed cost and the changing cost.

The fixed cost is $8. The changing cost is $2 for each topping, which is \(2t\).

Step 2: Write the expression.

Total cost is \(2t + 8\).

Step 3: Substitute \(t = 4\).

\(2(4) + 8 = 8 + 8 = 16\).

The expression is \(2t + 8\), and the cost for \(4\) toppings is $16.

Notice that \(t\) can be several whole numbers here: \(0\), \(1\), \(2\), and so on. The situation decides the reasonable set of values.

Worked example 3

Write and solve an equation: "A number decreased by \(5\) is \(12\)."

Step 1: Choose a variable.

Let \(n\) represent the number.

Step 2: Write the equation.

"Decreased by \(5\)" means subtract \(5\), so the equation is \(n - 5 = 12\).

Step 3: Solve.

Add \(5\) to both sides: \(n - 5 + 5 = 12 + 5\), so \(n = 17\).

The equation is \(n - 5 = 12\), and the solution is \(n = 17\)

Here the variable stands for one unknown number, not just any number.

Worked example 4

The perimeter of a square is \(24\). Write and solve an equation to find the side length.

Step 1: Choose a variable.

Let \(s\) represent the side length.

Step 2: Write the perimeter expression for a square.

A square has \(4\) equal sides, so the perimeter is \(4s\).

Step 3: Set the expression equal to \(24\).

Write the equation \(4s = 24\).

Step 4: Solve.

Divide both sides by \(4\): \(s = 6\).

The side length is \(s = 6\)

Real-World Applications

Variables appear everywhere once you know how to spot them. In sports, \(3p\) can represent the number of points from \(p\) three-point shots in basketball. In music downloads, \(d + 12\) might represent a monthly total after adding a subscription fee. In gardening, \(2l + 2w\) models the border length of a rectangular flower bed.

They also help compare choices. If one phone plan costs $15 plus $4 for each gigabyte, the cost can be written as \(4g + 15\). A different plan might use another expression. Writing each plan with a variable makes comparison much easier.

When you use variables well, you are doing more than replacing a number with a letter. You are describing how quantities are related. That is one of the biggest ideas in algebra.

Download Primer to continue