Variables and Expressions
Learning goals
- Use a letter for a number that is unknown or free to change
- Tell an expression from an equation, and say what you do to each
- Translate a phrase into algebra, minding the reversal in less than
- Name the terms, coefficient and constant of an expression
- Evaluate by substituting each value in parentheses
What a variable is
A variable is a letter that stands for a number. The letter does not have a fixed value of its own; it is a placeholder, exactly the way a blank box would be. Writing
says “three times whatever number is.” If is , the phrase is worth ; if is , it is worth . The same letter can take different values on different occasions, which is precisely why it is called variable: its value can vary.
There are two everyday reasons to reach for a letter instead of a number.
The first is that the number is unknown. You may be trying to find it, the way you will in the next few lessons when you solve for . Until you pin it down, a letter holds its place so you can still write down everything you do know about it.
The second is that the number is changing, or you want a single statement to cover many cases at once. The cost of notebooks is for every possible ; you do not want to rewrite the rule for each separate purchase. One expression with a variable replaces an endless list of arithmetic examples.
Any letter will do, and the choice is up to you. People lean on and out of long habit. Even so, a letter that hints at its meaning often reads better: for time, for distance, for a count of things. The letter is just a name; what matters is that you state clearly what it stands for.
Expressions versus equations
These two words name different things, and keeping them apart will save you constant confusion later.
An algebraic expression names a single value, once you know its variables. It can be a number or a variable on its own, or several of those combined with operations (, , , , exponents). It is a phrase, the algebraic version of a number. Each of these is an expression:
An expression has no equals sign. On its own it makes no claim; it simply names an amount, the way names an amount before you work it out.
An equation is two expressions joined by an equals sign, stating that they have the same value. Whether that statement is true can depend on which number the variable turns out to be. It is a complete sentence, and like any sentence it can be true or false. Each of these is an equation:
The difference is exactly the difference between a phrase and a sentence. “Three more than ” is a phrase; it points at a quantity but asserts nothing. “Three more than equals nine” is a sentence; it makes a claim you could check. You evaluate an expression (work out its value), but you solve an equation (find the variable value that makes the sentence true). Solving is the work of the coming lessons; this lesson is about reading and evaluating expressions.
Check your understanding
Which of these is an equation (not just an expression)?
An equation must contain an equals sign joining two expressions; an expression alone has none.
The other three are expressions: they name a value but assert nothing, because no equals sign is present.
Check your understanding
The expression and the equation share the same left side. What do you do with each one?
has no equals sign, so it names a value once you pick ; you evaluate it by substitution, the way Worked Example 3 does.
has an equals sign, so it is a claim that could be true or false; you solve it to find the one value of that makes the claim true, which is the work of the coming lessons.
An expression is never "solved," because it makes no claim to check; an equation is never merely "evaluated," because a specific unknown value is being pinned down.
Translating words into expressions
Most of the time a problem arrives in words, and the first real skill of algebra is turning those words into an expression. Start by naming the unknown with a letter. Then read the whole phrase for its meaning: what quantity are you starting from, what happens to it, and in what order? Once you can answer that, this vocabulary helps you write down each operation:
| Words | Operation | Example phrase | Expression |
|---|---|---|---|
| sum, more than, increased by, total | seven more than | ||
| difference, less than, decreased by, fewer | five less than | ||
| product, times, of, twice, double | three times | ||
| quotient, divided by, per, split | divided by |
Two of these phrases hide a trap worth pausing on. “Five less than ” is , not . The phrase tells you to start with and take five away, so the comes first even though is spoken first. The same flip happens with “fewer than” and “subtracted from.” Read these by their meaning, not by the left-to-right order of the words.
When several operations combine, build the expression one phrase at a time, and use parentheses whenever a whole group must be operated on together.
Worked example 1 Translate three phrases into expressions
Name the unknown number in each, then convert phrase by phrase.
“Eight more than twice a number.” Twice the number is , and eight more than that adds :
“The product of and a number, decreased by .” The product of and the number is , and decreased by subtracts :
“A number divided by , then increased by .” Dividing by gives , and increasing by adds :
In each case the unknown is held by the letter , and it was the meaning of the phrase, not just its words, that decided the operation and the order.
The trickiest translations are the ones where a sum or difference must be operated on as a whole. Here parentheses do the grouping, exactly as they did in the order-of-operations chapter.
Worked example 2 Translate 'twice the sum of a number and four'
The phrase has two layers. The inner phrase, “the sum of a number and four,” is . The outer word “twice” then doubles that entire sum, not just the .
To double the whole sum, wrap it in parentheses before multiplying:
Without the parentheses, would double only the and leave the alone, a different expression. Compare the two by trying : the correct , but would give . The parentheses are what make sure “twice the sum” doubles the whole sum, not just part of it.
Check your understanding
Which expression means "four less than a number "?
"Four less than " means start at and take four away, so comes first.
The order is the common trap: the words say four less than , not less than four.
The parts of an expression
To work with an expression you need names for its pieces. Consider
The expression is built from parts that are added or subtracted together; each such part is a term. This expression has three terms: , , and . Terms are the chunks separated by a or sign written at the main level of the expression, not one tucked inside parentheses; a grouped piece like from the last example stays together as one piece until the parentheses are removed. By convention a term carries the sign written in front of it, so the subtracted piece here is the term , not a bare .
Inside a term like , the number is the coefficient: the number multiplied by the variable. The coefficient of is . A variable written with no visible number, such as plain , has a coefficient of , because means , one copy of . Likewise means , so its coefficient is .
A term that is just a number, with no variable at all, is a constant. In the constant is . It is called constant because it never changes: whatever the variables do, that term contributes the same fixed amount.
Check your understanding
Which statement about the expression is correct?
The sign splits the expression into two terms: and .
In the number multiplying the variable is , so that is the coefficient. The term with no variable, , is the constant. The other options either merge the two terms into one, swap which number is the coefficient and which is the constant, or split the expression at the wrong place.
Evaluating an expression by substitution
To evaluate an expression you replace each variable with a given number, then do the arithmetic. Replacing a letter with a number is called substitution, and it turns an algebraic phrase back into an ordinary calculation.
There is one habit that prevents nearly every mistake. When you substitute, put the number inside parentheses where the variable used to be. The parentheses keep the original operations intact, especially multiplication and signs, so nothing gets accidentally merged or dropped.
Why parentheses matter so much is easiest to see with a coefficient. In the variable is being multiplied by . If and you simply write the next to the , you get "", the number fifty-seven, which is the wrong number entirely, not the product . Written with parentheses, the same substitution gives , which is what actually means.
Worked example 3 Evaluate when
Substitute for , writing it in parentheses so the multiplication stays clear:
Now follow the order of operations: multiply before you add.
So when , the expression is worth .
Why the same expression gives different values for different inputs#
An expression with a variable is not one fixed number. It is a set of instructions that produces a number once you choose the variable’s value; the instructions stay the same, but what you choose does not.
Take . Substituting gives . Substituting instead gives . The instructions, multiply by two and add one, are identical both times. Only the number substituted for changed, from to , and that alone is what changed the result, from to .
This is exactly what the word variable promises: because can be any number, the expression can produce a different value for each number you choose. Getting a different answer when you substitute a different value is expected, not a mistake.
You can carry out a substitution by hand below instead of reading about one. The rectangle takes a width and a height , both yours to set, and reports two expressions evaluated at those values at once: the area, , and the perimeter, . Setting the two numbers is the substitution; the readout is the evaluation.
Try it first with one letter changing. Set , then step from to and watch the area. It runs , , , , , the single expression evaluated at five different heights: one expression, five inputs, five results. Then set and . Before you look at the readout, work out and yourself on paper, and check your answers against what the rectangle reports.
One rule, many inputs, many values
A rectangle 4 units wide and 2 units tall. With w = 4 and h = 2, the expression w times h is 8. The expression 2(w + h) is 12.
Worked example 4 Evaluate when and
Replace each variable by its value, every one in parentheses:
By the order of operations the exponent goes first, then the multiplication, then the subtraction. Square the :
Then subtract the value of :
So the expression equals . Notice the exponent applied only to the , the value of , because means is squared, not the whole term.
Substitution works just as smoothly when the value is negative. The parentheses matter most in that case, because they keep the whole value, sign included, together as one piece.
Worked example 5 Evaluate when
Substitute for , keeping it in parentheses so the multiplication and the sign both stay clear:
The parentheses matter here more than ever. Without them, "" would read as a subtraction instead of the multiplication that actually means, and the sign on the could be lost along the way.
Now follow the order of operations, multiplying before adding:
So when , the expression is worth .
Check your understanding
Evaluate when .
Substitute for , in parentheses, then multiply before subtracting.
The multiplication comes before the subtraction, so the value is , not .