← Back to all lessons
Class 8Algebra12:26Published 23 Mar 2025

Add and Subtract Algebraic Expressions

Learn how to add and subtract algebraic expressions by collecting like terms, using both the column method and the row method, with several worked examples.

This lesson shows how to add and subtract algebraic expressions step by step. You line up like terms and combine their coefficients, either by stacking the expressions in columns or by writing them in a single row and grouping. For subtraction, you change it to addition by flipping the sign of every term in the second expression. Worked examples build from adding two simple expressions up to combining several expressions in many variables.

What you'll learn

  • Collecting like terms by matching the same variable and power
  • Adding expressions using both the column method and the row method
  • Turning a subtraction into an addition by flipping the signs of the second expression
  • Combining the coefficients of like terms with their signs

Lesson chapters

0:00Like terms, column and row methods
0:46Adding two expressions in x
3:22Adding three expressions
6:36Expressions in several variables
9:38Subtracting algebraic expressions
10:53More subtraction examples

Lesson notes

This lesson covers how to add and subtract algebraic expressions. The key idea is to collect like terms, terms with the same variables raised to the same powers, and combine their coefficients. There are two layouts: the column method, where you stack the expressions and line up like terms, and the row method, where you write everything in a single line and group the like terms together.

Like terms

An expression is made of terms joined by addition or subtraction. Two terms are like terms when they have exactly the same variable part, for example 3x23x^{2} and 4x24x^{2}, or 2x2x and 2x2x. Only like terms can be added or subtracted. Constants such as 5-5 and 8-8 are like terms with each other.

Example 1: add 3x2+2x53x^{2}+2x-5 and 4x2+2x84x^{2}+2x-8

Column method. Write the second expression under the first so that like terms line up, then add each column.

3x2+2x5+  4x2+2x8\begin{aligned} &3x^{2}+2x-5 \\ +\;&4x^{2}+2x-8 \end{aligned}

x2x^{2} terms: 3+4=73+4 = 7, giving 7x27x^{2}. xx terms: 2+2=42+2 = 4, giving 4x4x. Constants: 5+(8)=13-5+(-8) = -13.

3x2+2x5  +  4x2+2x8=7x2+4x133x^{2}+2x-5 \;+\; 4x^{2}+2x-8 = 7x^{2}+4x-13

Row method. Write both in a line and group the like terms:

(3x2+4x2)+(2x+2x)+(58)=7x2+4x13(3x^{2}+4x^{2})+(2x+2x)+(-5-8) = 7x^{2}+4x-13

Both methods give the same result.

Example 2: add 4xy8x2y+4x104xy-8x^{2}y+4x-10 and 7xy+8x2y+4x+10-7xy+8x^{2}y+4x+10

Group each set of like terms:

(4xy7xy)+(8x2y+8x2y)+(4x+4x)+(10+10)(4xy-7xy)+(-8x^{2}y+8x^{2}y)+(4x+4x)+(-10+10)

xyxy terms: 4+(7)=34+(-7) = -3, giving 3xy-3xy. x2yx^{2}y terms: 8+8=0-8+8 = 0, so this term disappears. xx terms: 4+4=84+4 = 8, giving 8x8x. Constants: 10+10=0-10+10 = 0.

=3xy+8x= -3xy+8x

Example 3: add 8x2+7x88x^{2}+7x-8,   3x2+4x+4\;3x^{2}+4x+4, and 2x2+4x10-2x^{2}+4x-10

With three expressions, stack all three and add each column.

x2x^{2} terms: 8+3+(2)=98+3+(-2) = 9. xx terms: 7+4+4=157+4+4 = 15. Constants: 8+4+(10)=14-8+4+(-10) = -14.

8x2+7x8  +  3x2+4x+4  +  2x2+4x10=9x2+15x148x^{2}+7x-8 \;+\; 3x^{2}+4x+4 \;+\; -2x^{2}+4x-10 = 9x^{2}+15x-14

When a column mixes positive and negative numbers, take the difference and keep the sign of the larger one. When they share a sign, just add and keep that sign.

Example 4: add expressions in a2b2a^{2}b^{2}, ab2ab^{2} and abab

Line up like terms across the expressions, writing a zero coefficient where a term is missing, then add each column. Combining the like terms gives:

a2b2a^{2}b^{2} terms: 10+7=1710+7 = 17. ab2ab^{2} terms: 4+98=54+9-8 = 5. abab terms: 867+3=18-8-6-7+3 = -18. Constants: the constant column totals 1313.

=17a2b2+5ab218ab+13= 17a^{2}b^{2}+5ab^{2}-18ab+13

Example 5: find the sum of 2a2b+6ab2+72a^{2}b+6ab^{2}+7 and 8ab2+4a2b+4-8ab^{2}+4a^{2}b+4

Collect like terms:

a2ba^{2}b terms: 2+4=62+4 = 6. ab2ab^{2} terms: 6+(8)=26+(-8) = -2 (take the difference, keep the sign of the larger). Constants: 7+4=117+4 = 11.

=6a2b2ab2+11= 6a^{2}b-2ab^{2}+11

Subtracting expressions

To subtract one expression from another, change the subtraction to addition and flip the sign of every term in the second expression. In other words, add the inverse of the second expression.

Example 6: (2x2+4x9)(3x2+8x+10)\,(2x^{2}+4x-9)-(3x^{2}+8x+10)

Flip the signs of the second expression and add:

2x2+4x9  +  (3x28x10)2x^{2}+4x-9 \;+\; (-3x^{2}-8x-10)

x2x^{2} terms: 23=12-3 = -1. xx terms: 48=44-8 = -4. Constants: 910=19-9-10 = -19.

=x24x19= -x^{2}-4x-19

Example 7: (2x22x)(3x2+4x)\,(2x^{2}-2x)-(-3x^{2}+4x)

Flip the signs of the second expression and add. The x2x^{2} terms give 2+3=52+3 = 5, so 5x25x^{2}. The xx terms give 24=6-2-4 = -6, so 6x-6x.

=5x26x= 5x^{2}-6x

Example 8: subtract 4x2+10x+54x^{2}+10x+5 from 3x28x+103x^{2}-8x+10

Write the expression you subtract from first, then flip the signs of the one being subtracted:

3x28x+10  +  (4x210x5)3x^{2}-8x+10 \;+\; (-4x^{2}-10x-5)

x2x^{2} terms: 34=13-4 = -1. xx terms: 810=18-8-10 = -18. Constants: 105=510-5 = 5.

=x218x+5= -x^{2}-18x+5

Key takeaways

  • Only like terms, those with the same variables and powers, can be added or subtracted; combine their coefficients with the correct signs.
  • The column method and the row method give the same answer; use whichever layout is clearer.
  • To subtract an expression, change the sign of every term in it and add, that is, add the inverse.