Sub topic 2
Choosing and Defining a Variable
Prerequisites
You should be comfortable with arithmetic using integers, fractions, and decimals. You should also know the order of operations and the basic meaning of a variable and an algebraic expression. A variable is a letter that represents a number.
In a word problem, the variable usually represents an unknown quantity. Choosing the variable well makes the rest of the solution easier to write and check.
Identify the Unknown
First, read the question at the end of the problem. It tells you what the unknown quantity is.
For example:
> A theater sells adult tickets for $8 and child tickets for $5. Ten tickets cost $62 in total. How many adult tickets were sold?
The question asks for the number of adult tickets. Define a variable for that quantity:
\[ a = \text{the number of adult tickets} \]
The letter does not matter. You could use \(x\), but \(a\) reminds you what the variable means.
A complete definition includes three parts:
- The variable name, such as \(a\)
- What it represents, such as adult tickets
- Its unit, such as tickets, dollars, hours, or centimeters
| Variable definition | Meaning |
|---|---|
| \(a =\) number of adult tickets | \(a\) counts tickets, not dollars |
| \(p =\) original jacket price in dollars | \(p\) measures money |
| \(t =\) hours traveled by Car A | \(t\) measures time |
Use the Given Information
After defining the unknown, express other quantities in terms of it.
In the ticket problem, there are 10 tickets total. If \(a\) tickets are for adults, then the number of child tickets is:
\[ 10-a \]
The expression \(10-a\) works because every ticket is either an adult ticket or a child ticket.
The ticket costs can now be described using the variable:
- Adult tickets cost \(8a\) dollars.
- Child tickets cost \(5(10-a)\) dollars.
The variable definition helps prevent a common error. If \(a\) means adult tickets, then \(10-a\) means child tickets. It does not mean the cost of child tickets.
from fractions import Fraction
# a is the number of adult tickets.
a = Fraction(62 - 5 * 10, 8 - 5)
child_tickets = 10 - a
print(a) # 4
print(child_tickets) # 6Choose the Simplest Unknown
Sometimes more than one variable could work. Choose the quantity that produces the simplest expressions.
Suppose a problem says:
> One number is 7 more than another number. Their sum is 31.
You could define the larger number as \(x\), making the smaller number \(x-7\). Or you could define the smaller number as \(n\), making the larger number \(n+7\). The second choice often follows the wording directly:
\[ n = \text{the smaller number} \]
\[ n+7 = \text{the larger number} \]
A good variable definition makes every related quantity clear.
Check the Variable's Meaning
Before solving, ask:
- Does the variable represent what the question asks for?
- Are its units clear?
- Can every other unknown quantity be written using it?
- Does the variable have a reasonable possible value?
For the ticket example, \(a\) must be a whole number from 0 through 10. A value such as \(a=4.5\) would not describe a possible number of tickets, even if it temporarily satisfied an equation.
Exercise
A school club has 24 members. There are 6 more students than adults. Let a represent the number of adults. Write an expression for the number of students.
Show answer
The number of students is a + 6.