Before long in alge­bra you meet two expres­sions that need to be put together: the perime­ter of a field whose sides are 2x+32x + 3 and x+5x + 5, the total cost of two orders, or the dif­fer­ence between two peo­ple's sav­ings. Adding and sub­tract­ing expres­sions is the skill behind all of these. It rests on one idea you met in the first les­son: only like terms can be com­bined. In this les­son you will add and sub­tract expres­sions in two ways, along a line and in columns, and learn the step that catches most peo­ple out, a minus sign in front of a bracket.

Only like terms join

Like terms have the same lit­eral fac­tors, such as 3a3a and 2a2a, or 5x25x^2 and −7x2-7x^2. They count the same thing, so their co-effi­cients can be added or sub­tracted. Unlike terms, such as 3a3a and 2b2b, stay side by side in the answer.

A good way to pic­ture this is with tiles. Let a blue tile stand for xx and an orange tile for yy. Blue tiles can be counted with blue tiles and orange with orange, but a blue and an orange tile never merge into a new kind of tile.

Algebra tiles: four blue x tiles and two orange y tiles, then three x tiles and six y tiles, sorted into piles of seven x tiles and eight y tiles, giving 7x + 8y.
Adding 4x+2y4x + 2y and 3x+6y3x + 6y: the tiles sort into a pile of 7x7x and a pile of 8y8y.

There are two ways of set­ting out the work: the hor­i­zon­tal method and the ver­ti­cal method.

Adding: the hor­i­zon­tal method

Write every­thing along one line, then gather each group of like terms and add their co-effi­cients.

Exam­ple 1

Add 3a3a and 2a2a; then add 3a+23a + 2 and 5a+75a + 7.

3a+2a=(3+2)a=5a3a + 2a = (3 + 2)a = 5a

3a+2+5a+7=(3+5)a+(2+7)=8a+93a + 2 + 5a + 7 = (3 + 5)a + (2 + 7) = 8a + 9

Exam­ple 2

Add 4x+2y4x + 2y and 3x+6y3x + 6y.

4x+2y+3x+6y=4x+3x+2y+6y=7x+8y\begin{aligned} 4x + 2y + 3x + 6y &= 4x + 3x + 2y + 6y \\ &= 7x + 8y \end{aligned}

Exam­ple 3

Add x2+y2+3xyx^2 + y^2 + 3xy and 2x2+5y2−7xy2x^2 + 5y^2 - 7xy.

x2+y2+3xy+2x2+5y2−7xy=(1+2)x2+(1+5)y2+(3−7)xy=3x2+6y2−4xy\begin{aligned} & x^2 + y^2 + 3xy + 2x^2 + 5y^2 - 7xy \\ &= (1 + 2)x^2 + (1 + 5)y^2 + (3 - 7)xy \\ &= 3x^2 + 6y^2 - 4xy \end{aligned}

When a term moves to sit beside its part­ners, its sign trav­els with it. That is why −7xy-7xy stays neg­a­tive.

Exam­ple 4: Frac­tional co-effi­cients

Add 32a2+53ab+14b2\displaystyle \frac{3}{2}a^2 + \frac{5}{3}ab + \frac{1}{4}b^2 and 56a2−34ab+34b2\displaystyle \frac{5}{6}a^2 - \frac{3}{4}ab + \frac{3}{4}b^2.

Work out each group of co-effi­cients sep­a­rately:

32+56=9+56=146=7353−34=20−912=111214+34=1\displaystyle \frac{3}{2} + \frac{5}{6} = \frac{9 + 5}{6} = \frac{14}{6} = \frac{7}{3} \qquad \frac{5}{3} - \frac{3}{4} = \frac{20 - 9}{12} = \frac{11}{12} \qquad \frac{1}{4} + \frac{3}{4} = 1

So the sum is 73a2+1112ab+b2\displaystyle \frac{7}{3}a^2 + \frac{11}{12}ab + b^2.

Adding: the ver­ti­cal method

Write one expres­sion under the other, with like terms in the same col­umn, then add each col­umn on its own. The columns do the match­ing for you, which helps when there are many terms.

Exam­ple 5

Add 2x2+3y2+12xy\displaystyle 2x^2 + 3y^2 + \frac{1}{2}xy and 52x2+xy−7y2\displaystyle \frac{5}{2}x^2 + xy - 7y^2.

Put the sec­ond expres­sion in the same order as the first, so that like terms line up.

Row x2x^2 terms y2y^2 terms xyxy terms
first 2x22x^2 +3y2+3y^2 +12xy\displaystyle +\frac{1}{2}xy
sec­ond 52x2\displaystyle \frac{5}{2}x^2 −7y2-7y^2 +xy+xy
sum 92x2\displaystyle \frac{9}{2}x^2 −4y2-4y^2 +32xy\displaystyle +\frac{3}{2}xy

Col­umn by col­umn: 2+52=4+52=92\displaystyle 2 + \frac{5}{2} = \frac{4 + 5}{2} = \frac{9}{2}, then 3−7=−43 - 7 = -4, then 12+1=32\displaystyle \frac{1}{2} + 1 = \frac{3}{2}. The sum is 92x2−4y2+32xy\displaystyle \frac{9}{2}x^2 - 4y^2 + \frac{3}{2}xy.

Exam­ple 6

Add 2u+3v2u + 3v, −5v+6w-5v + 6w and 7u−7w7u - 7w.

Leave a gap where an expres­sion has no term of that kind.

Row uu vv ww
first 2u2u +3v+3v
sec­ond −5v-5v +6w+6w
third 7u7u −7w-7w
sum 9u9u −2v-2v −w-w

The sum is 9u−2v−w9u - 2v - w.

Sub­tract­ing: the hor­i­zon­tal method

Read the order with care. "Sub­tract 2a2a from 7a7a" means start at 7a7a and take 2a2a away: 7a−2a=5a7a - 2a = 5a. The expres­sion after "from" is writ­ten first.

When the expres­sion being taken away is neg­a­tive, or has more than one term, put it in a bracket first. A minus sign in front of a bracket changes the sign of every term inside it.

Exam­ple 7

Sub­tract −2a-2a from 7a7a.

(7a)−(−2a)=7a+2a=9a(7a) - (-2a) = 7a + 2a = 9a

Tak­ing away a neg­a­tive amount is the same as adding it.

Exam­ple 8

Sub­tract 4x−3y4x - 3y from 8x−7y8x - 7y.

(8x−7y)−(4x−3y)=8x−7y−4x+3y=4x−4y\begin{aligned} (8x - 7y) - (4x - 3y) &= 8x - 7y - 4x + 3y \\ &= 4x - 4y \end{aligned}

The −3y-3y inside the bracket became +3y+3y when the bracket came off.

Exam­ple 9

Sub­tract 2a+32a + 3 from 9a+89a + 8.

(9a+8)−(2a+3)=9a+8−2a−3=7a+5\begin{aligned} (9a + 8) - (2a + 3) &= 9a + 8 - 2a - 3 \\ &= 7a + 5 \end{aligned}

Diagram of (9a + 8) minus (2a + 3): arrows show the minus sign reaching both 2a and 3, giving 9a + 8 - 2a - 3, which simplifies to 7a + 5.
The minus sign in front of the bracket reaches every term inside it.

For­get to change the +3+3 and you would get 7a+117a + 11, which is wrong.

Exam­ple 10: Let­ters for whole expres­sions

If A=2x2+x+5A = 2x^2 + x + 5 and B=3x2−2x+7B = 3x^2 - 2x + 7, find (i) 2A−3B2A - 3B and (ii) (A+B)−(A−B)(A + B) - (A - B).

A cap­i­tal let­ter here stands for a whole expres­sion, so keep it in brack­ets when you put it in.

(i)
2A−3B=2(2x2+x+5)−3(3x2−2x+7)=4x2+2x+10−9x2+6x−21=−5x2+8x−11\begin{aligned} 2A - 3B &= 2(2x^2 + x + 5) - 3(3x^2 - 2x + 7) \\ &= 4x^2 + 2x + 10 - 9x^2 + 6x - 21 \\ &= -5x^2 + 8x - 11 \end{aligned}

(ii) First A+B=5x2−x+12A + B = 5x^2 - x + 12 and A−B=−x2+3x−2A - B = -x^2 + 3x - 2.

(A+B)−(A−B)=(5x2−x+12)−(−x2+3x−2)=5x2−x+12+x2−3x+2=6x2−4x+14\begin{aligned} (A + B) - (A - B) &= (5x^2 - x + 12) - (-x^2 + 3x - 2) \\ &= 5x^2 - x + 12 + x^2 - 3x + 2 \\ &= 6x^2 - 4x + 14 \end{aligned}

Notice that 6x2−4x+146x^2 - 4x + 14 is exactly 2B2B. That is no acci­dent: (A+B)−(A−B)=A+B−A+B=2B(A + B) - (A - B) = A + B - A + B = 2B, what­ever AA and BB are.

Sub­tract­ing: the ver­ti­cal method

Write the expres­sion to be taken away under the first one, with like terms in the same col­umn. Then change the sign of every term in the bot­tom row, writ­ing the new sign under the old one, and add down the columns.

Exam­ple 11

Sub­tract 3x+4y3x + 4y from 4x−3y4x - 3y.

Row xx terms yy terms
from 4x4x −3y-3y
take away 3x3x +4y+4y
signs changed (−)(-) (−)(-)
result xx −7y-7y

In the xx col­umn, 4−3=14 - 3 = 1. In the yy col­umn, −3−4=−7-3 - 4 = -7. The answer is x−7yx - 7y.

Exam­ple 12

Sub­tract a3−b3+3ab+1a^3 - b^3 + 3ab + 1 from a3−2b3+5a^3 - 2b^3 + 5.

Row a3a^3 b3b^3 con­stants abab
from a3a^3 −2b3-2b^3 +5+5
take away a3a^3 −b3-b^3 +1+1 +3ab+3ab
signs changed (−)(-) (+)(+) (−)(-) (−)(-)
result 00 −b3-b^3 +4+4 −3ab-3ab

The a3a^3 terms can­cel, −2b3+b3=−b3-2b^3 + b^3 = -b^3, 5−1=45 - 1 = 4, and 0−3ab=−3ab0 - 3ab = -3ab. The answer is −b3+4−3ab-b^3 + 4 - 3ab.

Prac­tice

  1. Add 5a−2b5a - 2b and a+7ba + 7b.
  2. Add 2a+3b−4c2a + 3b - 4c and 7a−23b+5c\displaystyle 7a - \frac{2}{3}b + 5c.
  3. Add 3p2−4pq+q23p^2 - 4pq + q^2, −p2+2pq-p^2 + 2pq and 5pq−3q25pq - 3q^2 by the ver­ti­cal method.
  4. Sub­tract 5y5y from 12y12y, and −6xy-6xy from −2xy-2xy.
  5. Sub­tract 2a+32b\displaystyle 2a + \frac{3}{2}b from 7a−5b7a - 5b.
  6. Sub­tract 3x−4y+z3x - 4y + z from 5x+2y−3z5x + 2y - 3z.
  7. Sub­tract 34x2−112xy+5y2\displaystyle \frac{3}{4}x^2 - \frac{1}{12}xy + 5y^2 from −5x2+3xy−12y2\displaystyle -5x^2 + 3xy - \frac{1}{2}y^2.
  8. If A=5x2−34xy+7y2\displaystyle A = 5x^2 - \frac{3}{4}xy + 7y^2 and B=3x2+12xy−53y2\displaystyle B = 3x^2 + \frac{1}{2}xy - \frac{5}{3}y^2, find 5B−A5B - A.
  9. With the same AA and BB, find 3A−5B3A - 5B.
  10. Sub­tract 2m2−3m+42m^2 - 3m + 4 from m2+m−1m^2 + m - 1 by the ver­ti­cal method.

Answers

Show answers
  1. 6a+5b6a + 5b
  2. 9a+73b+c\displaystyle 9a + \frac{7}{3}b + c, since 3−23=73\displaystyle 3 - \frac{2}{3} = \frac{7}{3} and −4+5=1-4 + 5 = 1.
  3. 2p2+3pq−2q22p^2 + 3pq - 2q^2
  4. 7y7y, and −2xy−(−6xy)=4xy-2xy - (-6xy) = 4xy.
  5. 7a−5b−2a−32b=5a−132b\displaystyle 7a - 5b - 2a - \frac{3}{2}b = 5a - \frac{13}{2}b
  6. 5x+2y−3z−3x+4y−z=2x+6y−4z5x + 2y - 3z - 3x + 4y - z = 2x + 6y - 4z
  7. −234x2+3712xy−112y2\displaystyle -\frac{23}{4}x^2 + \frac{37}{12}xy - \frac{11}{2}y^2, since −5−34=−234\displaystyle -5 - \frac{3}{4} = -\frac{23}{4}, 3+112=3712\displaystyle 3 + \frac{1}{12} = \frac{37}{12} and −12−5=−112\displaystyle -\frac{1}{2} - 5 = -\frac{11}{2}.
  8. 5B−A=15x2+52xy−253y2−5x2+34xy−7y2=10x2+134xy−463y2\displaystyle 5B - A = 15x^2 + \frac{5}{2}xy - \frac{25}{3}y^2 - 5x^2 + \frac{3}{4}xy - 7y^2 = 10x^2 + \frac{13}{4}xy - \frac{46}{3}y^2
  9. 3A−5B=15x2−94xy+21y2−15x2−52xy+253y2=−194xy+883y2\displaystyle 3A - 5B = 15x^2 - \frac{9}{4}xy + 21y^2 - 15x^2 - \frac{5}{2}xy + \frac{25}{3}y^2 = -\frac{19}{4}xy + \frac{88}{3}y^2
  10. −m2+4m−5-m^2 + 4m - 5