Variables Examples: 45 Problems with Answers

Worked examples of Variables to try before you open each solution, then practice problems with answers.

Worked Examples

Example 1

easy
If x+5=12, what value does x represent?
Show solution

Answer

x=7

First step

1.
The variable x is a placeholder for an unknown number.

Full solution

  1. 2.
    Subtract 5 from both sides: x=12−5=7.
  2. 3.
    Check: 7+5=12 ✓
A variable is a symbol that stands for an unknown value. To find its value, we perform operations that isolate it on one side of the equation.

Example 2

medium
Evaluate the expression 3x+2y when x=4 and y=−1.

Example 3

medium
A rectangle has length ℓ and width w. Write a formula for its perimeter P.

Example 4

medium
Maria is 3 years older than her brother. If her brother is b years old, how old is Maria?

Example 5

medium
If x=2y and y=5, what is x?

Example 6

hard
The sum of three consecutive integers is 48. Let the smallest be n. Write and solve an equation for n.

Example 7

hard
If 5x−3=2x+9, find x.

Example 8

challenge
Two numbers differ by 7 and their sum is 25. Let the smaller be x. Find both numbers.

Practice Problems

Try each one, then open the solution to compare your method.

Example 1

easy
If 2n=18, what is the value of n?

Example 2

medium
Write an expression using a variable for: 'a number increased by 8.'

Example 3

easy
In the expression 3n+5, what is the variable?

Example 4

easy
If x=4, evaluate x+7.

Example 5

easy
Write 'a number increased by 6' using a variable.

Example 6

easy
Do 2x and x⋅2 mean the same thing?

Example 7

easy
In 5y−2, what is the coefficient of y?

Example 8

easy
Let n be any integer. Is n+1 always the next integer?

Example 9

easy
Simplify x+x+x.

Example 10

easy
If a stands for apples and b for bananas, what does a+b count?

Example 11

medium
Marcus is 3 years older than Tina. If Tina is t years old, write Marcus's age.

Example 12

medium
A variable p represents a price in dollars. Why can't p=−4 here?

Example 13

medium
If x doubles, what happens to 5x?

Example 14

medium
Two unknowns satisfy x+y=10. Is x a fixed number?

Example 15

medium
Express 'the sum of three consecutive integers' starting at n.

Example 16

medium
If T=2πL/g, which symbols are variables and which is a constant?

Example 17

medium
Why does x−x=0 for every value of x?

Example 18

medium
A recipe uses c cups of flour per loaf. Write the flour for 5 loaves.

Example 19

challenge
If n is even, explain why n2 is even using a variable.

Example 20

challenge
Distinguish the roles of x in f(x)=x2 versus f(3)=9.

Example 21

challenge
A locker problem labels lockers 1 to n. Why use n instead of a number?

Example 22

medium
If y=3x and x increases from 2 to 3, how much does y increase?

Example 23

easy
If y−4=10, what is y?

Example 24

easy
Evaluate 4x−1 when x=3.

Example 25

easy
Write an expression for 'a number n doubled, then added to 5'.

Example 26

medium
Evaluate a2+b when a=−3 and b=5.

Example 27

medium
If p is the price of one pencil in dollars, write an expression for the cost of 12 pencils.

Example 28

medium
Simplify: 5x−2x+4−1.

Example 29

medium
A taxi charges a $3 flat fee plus $2 per mile. Write an expression for the cost of m miles.

Example 30

medium
Evaluate 2x+6x when x=2.

Example 31

hard
If 3x+7=22, find x.

Example 32

hard
Evaluate x2−2xy+y2 when x=4,y=1.

Example 33

hard
A bag has n red marbles and 2n+3 blue marbles. Write an expression for the total marbles.

Example 34

medium
Write an expression for 'the quotient of a number n and 4, decreased by 1'.

Example 35

easy
Solve for x: x+11=20.

Example 36

medium
Evaluate x+yx−y when x=7,y=3.

Example 37

hard
If A=πr2 and r=3, find A in terms of π.

What to focus on

Core idea: A variable is a symbol that holds a number you don't know yet or one that can change.

Common stuck point: The procedure for variables is the easy part; the trap is treating x as always meaning the same number across different problems. Asking "Is a letter being used to hold a number we don't know yet or one that can vary?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Ask yourself: Is a letter being used to hold a number we don't know yet or one that can vary?

Concept recap

A symbol (usually a letter like x) that represents an unknown or changing quantity in a mathematical expression.

A variable is a labelled jar on a shelf. You can say "the red jar holds 3 more marbles than the blue jar" without knowing either amount, and the sentence stays true whatever is inside. Unlike a jar, though, a variable in an equation is often forced to hold one particular number.

Read the full lesson on Variables

Common mistakes to watch for

Background knowledge

These ideas may be useful before you work through the harder examples.

equalnumber sense