Skip to content
Family Table Math
Auto

Writing Algebraic Expressions

An algebraic expression uses letters to stand for numbers, like 3n+13n + 1. Expressions let you describe a whole pattern in one short line, instead of listing case after case. On this page you’ll learn the vocabulary, turn words and patterns into expressions, and check whether two different-looking expressions really say the same thing.

Variables, terms, coefficients and constants

Section titled “Variables, terms, coefficients and constants”

A variable is a letter that stands for a number that can change, like nn or xx.

Take the expression 5x−2y+75x - 2y + 7. It has three terms, separated by ++ and −- signs:

PartIn 5x−2y+75x - 2y + 7What it means
Terms5x5x, −2y-2y, 77the pieces being added
Coefficient of xx55the number multiplying xx
Coefficient of yy−2-2the sign belongs to the term
Constant77a term with no variable

Two small but important facts:

  • 5x5x means 5×x5 \times x. We don’t write the multiplication sign.
  • xx on its own has a coefficient of 11, and −x-x has a coefficient of −1-1.

Let nn be the number. Here are the most common phrases:

WordsExpression
5 more than a numbern+5n + 5
3 less than a numbern−3n - 3
twice a number2n2n
a number divided by 4n4\dfrac{n}{4}
3 less than twice a number2n−32n - 3
twice the sum of a number and 32(n+3)2(n + 3)

Watch out for “less than”. “3 less than a number” starts with the number and takes 3 away, so it’s n−3n - 3, not 3−n3 - n.

Also watch for “the sum” or “the difference”. They tell you to add or subtract first, so you need brackets: “twice the sum of a number and 3” is 2(n+3)2(n + 3).

Here is a pattern made of toothpicks. Each figure adds one more square.

Toothpick pattern: rows of 1, 2, 3 and 4 squares use 4, 7, 10 and 13 toothpicks Figure 1 4 toothpicks Figure 2 7 toothpicks Figure 3 10 toothpicks Figure 4 13 toothpicks
Each new square needs 3 more toothpicks, so Figure nn uses 3n+13n + 1 toothpicks.

Put the counts in a table:

Figure number, nn1234
Toothpicks471013

The count goes up by 3 each time, so the expression starts with 3n3n. But 3n3n gives 33 for Figure 1, and we need 44. Add 11 to fix it: 3n+13n + 1.

The picture tells you why. Start with the orange toothpick on the left. Each square then adds three blue ones (top, bottom and right side). So nn squares need 3n3n blue toothpicks plus 11 orange one: 3n+13n + 1.

Now you can find any figure without drawing it. Figure 50 uses 3(50)+1=1513(50) + 1 = 151 toothpicks.

Two expressions are equivalent if they give the same value for every value of the variable. For example, 2(x+3)2(x + 3) and 2x+62x + 6 are equivalent. There are three ways to check:

  1. Substitute numbers. Try several values of xx in both expressions and compare.
  2. Graph them. Graph y=y = each expression. Equivalent expressions give exactly the same line or curve.
  3. Use algebra. Simplify one expression until it looks like the other. Here, 2(x+3)=2x+62(x + 3) = 2x + 6 by the distributive property. You’ll practise this in simplifying algebraic expressions.
Graphs of y = 2(x + 3) and y = 2x + 6 lie on top of each other; y = 2x + 3 is a separate parallel line −4 4 −2 2 4 6 8 10 y = 2x + 3 y = 2(x + 3) and y = 2x + 6
y=2(x+3)y = 2(x + 3) and y=2x+6y = 2x + 6 are the same line, so the expressions are equivalent. y=2x+3y = 2x + 3 is a different line.

Why one number isn’t enough. Try x=2x = 2 in 2x2x and x2x^2. Both give 44! But try x=3x = 3: 2x=62x = 6 and x2=9x^2 = 9. They’re not equivalent. A matching value can be a coincidence, so substituting can only suggest that two expressions are equivalent. A single value that doesn’t match does prove they are not equivalent. To be sure they are equivalent, use algebra.

The word “algebra” comes from the Arabic al-jabr, part of the title of a book written in Baghdad around 820 CE by the mathematician Muhammad ibn Musa al-Khwarizmi. He solved problems entirely in words, with no letters for unknowns. Using letters like xx became common much later, in Europe in the 1600s. Today, the same idea runs every spreadsheet formula and computer program you use.

For the expression 7x2−x+4y−107x^2 - x + 4y - 10, list the terms, the coefficient of xx, the coefficient of yy, and the constant.

Solution.

  • Terms: 7x27x^2, −x-x, 4y4y and −10-10. There are four terms.
  • Coefficient of xx: the term is −x-x, which means −1x-1x, so the coefficient is −1-1.
  • Coefficient of yy: 44.
  • Constant: −10-10 (keep the sign with the term).

Write an expression for each. Let nn be the number.

  • (a) 6 less than three times a number
  • (b) the product of 5 and the sum of a number and 2
  • (c) the cost, in dollars, of nn movie tickets at $14 each plus one $9 popcorn

Solution.

(a) “Three times a number” is 3n3n. “6 less than” that means take 6 away: 3n−63n - 6.

(b) “The sum of a number and 2” is n+2n + 2. The product of 5 and that whole sum needs brackets: 5(n+2)5(n + 2).

(c) nn tickets at 14 dollars each cost 14n14n dollars. Add the popcorn: 14n+914n + 9.

Check (c): 2 tickets and a popcorn cost 14(2)+9=3714(2) + 9 = 37 dollars. That’s 28+928 + 9, which makes sense. ✓

A tile pattern grows like this:

Figure number, nn1234
Tiles591317
  • (a) Write an expression for the number of tiles in Figure nn.
  • (b) How many tiles are in Figure 20?
  • (c) Which figure uses 101 tiles?

Solution.

(a) The number of tiles goes up by 4 each time, so start with 4n4n. For Figure 1, 4n=44n = 4, but we need 5. Add 1: the expression is 4n+14n + 1.

Check Figure 3: 4(3)+1=134(3) + 1 = 13. ✓

(b) 4(20)+1=80+1=814(20) + 1 = 80 + 1 = 81 tiles.

(c) We need 4n+1=1014n + 1 = 101. Take away 1: 4n=1004n = 100. Divide by 4: n=25n = 25. It’s Figure 25.

Which of these are equivalent to 3(x−2)+x3(x - 2) + x:   4x−6  \;4x - 6\; or   4x−2\;4x - 2?

Solution.

Substitute. Try a few values:

xx3(x−2)+x3(x - 2) + x4x−64x - 64x−24x - 2
03(−2)+0=−63(-2) + 0 = -6−6-6−2-2
13(−1)+1=−23(-1) + 1 = -2−2-222
53(3)+5=143(3) + 5 = 1414141818

4x−24x - 2 already fails at x=0x = 0, so it is not equivalent. 4x−64x - 6 matches every time, which suggests it is equivalent, but three checks aren’t proof.

Use algebra. Multiply out the bracket, then combine the xx terms:

3(x−2)+x=3x−6+x=4x−63(x - 2) + x = 3x - 6 + x = 4x - 6

So 3(x−2)+x3(x - 2) + x and 4x−64x - 6 are equivalent. (If you graphed them, you would get the same line.)

Writing “less than” backwards. “4 less than a number” is n−4n - 4, not 4−n4 - n. Test it with a real number: 4 less than 10 is 6, and 10−4=610 - 4 = 6.

Forgetting brackets. “Three times the sum of a number and 5” is 3(n+5)3(n + 5). Writing 3n+53n + 5 only multiplies the number by 3, not the 5. When you see “the sum” or “the difference”, you almost always need brackets.

Dropping the sign of a term. In 8−3x8 - 3x, the coefficient of xx is −3-3, not 33. The sign in front of a term belongs to that term.

Using only the “jump” in a pattern. If a pattern goes 4, 7, 10, 13, the expression is not just 3n3n. Always check your expression with Figure 1: 3(1)=33(1) = 3, but there are 4 toothpicks, so you need 3n+13n + 1.

Trusting one matching value. 2x2x and x2x^2 both equal 4 when x=2x = 2, but they aren’t equivalent. Test several values, including 00 and a negative number, and use algebra to be sure.

1. (Warm-up) For the expression −2p+9q−1-2p + 9q - 1, list the terms, the coefficient of pp, the coefficient of qq, and the constant.

Solution

Terms: −2p-2p, 9q9q and −1-1.

Coefficient of pp: −2-2. Coefficient of qq: 99. Constant: −1-1.

2. (Warm-up) Write an expression for each. Let nn be the number.

  • (a) 10 more than a number
  • (b) 7 less than a number
  • (c) a number divided by 3, minus 4
  • (d) twice the difference of a number and 5
Solution

(a) n+10n + 10

(b) n−7n - 7

(c) n3−4\dfrac{n}{3} - 4

(d) “The difference of a number and 5” is n−5n - 5. Twice that is 2(n−5)2(n - 5).

3. (Warm-up) In the toothpick pattern above, Figure nn uses 3n+13n + 1 toothpicks. How many toothpicks are in Figure 10? Describe Figure 10 in words.

Solution3(10)+1=30+1=313(10) + 1 = 30 + 1 = 31

Figure 10 is a row of 10 squares, made of 31 toothpicks.

4. (Core) A phone plan costs $25 per month, plus $10 for each extra gigabyte (GB) of data.

  • (a) Write an expression for the monthly cost, in dollars, if you use dd extra GB.
  • (b) What does the plan cost in a month when you use 3 extra GB?
Solution

(a) Each extra GB adds 10 dollars, so dd extra GB add 10d10d. The monthly cost is 25+10d25 + 10d (or 10d+2510d + 25).

(b) 25+10(3)=25+30=5525 + 10(3) = 25 + 30 = 55. The plan costs $55 that month.

5. (Core) Here is a pattern of dots:

Figure number, nn1234
Dots271217
  • (a) Write an expression for the number of dots in Figure nn.
  • (b) How many dots are in Figure 50?
Solution

(a) The count goes up by 5 each time, so start with 5n5n. For Figure 1, 5n=55n = 5, but there are only 2 dots, so subtract 3. The expression is 5n−35n - 3.

Check Figure 4: 5(4)−3=175(4) - 3 = 17. ✓

(b) 5(50)−3=250−3=2475(50) - 3 = 250 - 3 = 247 dots.

6. (Core) A row of triangles is made from toothpicks. One triangle uses 3 toothpicks, two triangles (sharing a side) use 5, and three triangles use 7.

  • (a) Write an expression for the number of toothpicks in a row of nn triangles. Explain it using the picture.
  • (b) How many triangles can you make in a row with 61 toothpicks?
Solution

(a) The count goes up by 2 each time: each new triangle shares one side with the one before it, so it needs only 2 new toothpicks. Start with 1 toothpick, and add 2 for each triangle: 2n+12n + 1.

Check: n=3n = 3 gives 2(3)+1=72(3) + 1 = 7. ✓

(b) Solve 2n+1=612n + 1 = 61. Take away 1: 2n=602n = 60. Divide by 2: n=30n = 30. You can make 30 triangles.

7. (Core) Decide whether each pair of expressions is equivalent. Justify your answer.

  • (a) 2(x+4)2(x + 4) and 2x+42x + 4
  • (b) 5x−x5x - x and 4x4x
  • (c) x⋅xx \cdot x and 2x2x
Solution

(a) Not equivalent. Try x=0x = 0: 2(0+4)=82(0 + 4) = 8, but 2(0)+4=42(0) + 4 = 4. One value that doesn’t match is enough to prove they’re different. (The 2 must multiply both xx and 44: 2(x+4)=2x+82(x + 4) = 2x + 8.)

(b) Equivalent. Five xx‘s take away one xx leaves four xx‘s: 5x−x=4x5x - x = 4x for every value of xx.

(c) Not equivalent. Try x=3x = 3: x⋅x=9x \cdot x = 9, but 2x=62x = 6. (Be careful: they do match at x=0x = 0 and x=2x = 2, which is why you should test more than one value.)

8. (Challenge) Priya tests the expressions x2+2x^2 + 2 and 3x3x. When x=1x = 1, both give 33. When x=2x = 2, both give 66. She says they must be equivalent. Is she right? Explain.

Solution

No. Try x=3x = 3:

x2+2=9+2=11,3x=3(3)=9x^2 + 2 = 9 + 2 = 11, \qquad 3x = 3(3) = 9

They give different values, so they are not equivalent. Matching at two values was a coincidence. On a graph, y=x2+2y = x^2 + 2 is a curve and y=3xy = 3x is a line; they just happen to cross at x=1x = 1 and x=2x = 2. Equivalent expressions must match for every value, and their graphs would be the same.

9. (Challenge) A square frame is made of square tiles around the edge of an nn by nn square (with n≥2n \ge 2). For example, a 5 by 5 frame has a border of 16 tiles. Two students count the tiles differently:

  • Amir writes 4(n−1)4(n - 1).
  • Bea writes 2n+2(n−2)2n + 2(n - 2).

Explain how each student might have counted, and show that their expressions are equivalent.

Solution

Amir: go around the frame in four equal pieces. Each piece is one side of nn tiles, minus the corner where the next side starts, so each piece has n−1n - 1 tiles. Four pieces: 4(n−1)4(n - 1).

Bea: count the whole top row and bottom row (nn tiles each, so 2n2n). The left and right columns are left, and each is missing its top and bottom tile, so each has n−2n - 2 tiles: 2(n−2)2(n - 2). Total: 2n+2(n−2)2n + 2(n - 2).

Equivalent? Use the distributive property on both:

4(n−1)=4n−44(n - 1) = 4n - 42n+2(n−2)=2n+2n−4=4n−42n + 2(n - 2) = 2n + 2n - 4 = 4n - 4

Both simplify to 4n−44n - 4, so they’re equivalent. Check with n=5n = 5: 4(4)=164(4) = 16 and 10+2(3)=1610 + 2(3) = 16. ✓