Adding and Subtracting Polynomials

In this tutorial, we’ll learn all about adding and subtracting polynomials. But first, there are a few fundamental concepts we need to look at.

Terms in a Polynomial

Here’s an example of a polynomial (with four terms).

4x32x29x+54x^3 - 2x^2 - 9x + 5

The parts of the polynomial separated by the addition/subtraction symbols are called terms. And each term can be seen as having two parts – the coefficient and the variables (along with their exponents).

Here’s the first term in our polynomial above.

Anatomy-of-a-term
Anatomy of a term

Note – You will frequently come across terms that appear to have no coefficients (or have variables without exponents). So remember, if the coefficient is not visible, it’s 1\hspace{0.2em} 1 \hspace{0.2em}. Same with the exponent. For example –

a2b=1a2b1 {\color{Orchid} a^2 b} \, = \, {\color{Red} 1} {\color{Orchid} a^2 b^ {\color{Red} 1} }

Terms are important because they hold the key when it comes to adding and subtracting polynomials.

Like/Unlike Terms

Like terms in a polynomial are those that have the same variable part (variables along with their exponents).

Here are a few examples of like terms. Focus on the variables parts (orchid and green).

  • 2x2,5x2,8x2\hspace{0.2em} 2 {\color{Orchid} x^2} , \hspace{0.5em} 5 {\color{Orchid} x^2} , \hspace{0.5em} -8 {\color{Orchid} x^2} \hspace{0.2em}
  • 9a2b,a2b,4a2b\hspace{0.2em} 9 {\color{Teal} a^2 b} , \hspace{0.5em} - {\color{Teal} a^2 b} , \hspace{0.5em} 4 {\color{Teal} a^2 b} \hspace{0.2em}

Now, terms that are not like are known as “unlike terms”. Their variable parts (the variables themselves or their exponents) are different. For example (differences in red) –

  • 4x2,3x\hspace{0.2em} 4x^ {\color{Red} 2} , \hspace{0.5em} 3x \hspace{0.2em}
  • 5p3q2,2p2q2\hspace{0.2em} 5 p^ {\color{Red} 3} q^2, \hspace{0.5em} 2p^ {\color{Red} 2} q^2 \hspace{0.2em}
  • 7ab2c3,3a2c3\hspace{0.2em} 7a {\color{Red} b^2} c^3, \hspace{0.5em} 3a^ {\color{Red} 2} c^3 \hspace{0.2em}

Adding and Subtracting Like Terms

The important thing about like terms is we can add (or subtract) them into a single term.

Let me explain. Here we have two like terms being added together.

8x2y+3x2y8x^2y + 3x^2y

Now, there are two steps to adding like terms.

Step 1.  Take the coefficients and add/subtract them.

8x2y+3x2y=(8+3)=11\begin{align*} {\color{Red} 8} {\color{Teal} x^2y} + {\color{Red} 3} {\color{Teal} x^2y} \, &= \, ( {\color{Red} 8} + {\color{Red} 3} ) \rule{2em}{0.05em} \\[1em] &= \, {\color{Red} 11} \rule{2em}{0.05em} \end{align*}

Step 2.  Copy the variable part.

8x2y+3x2y=11x2y {\color{Red} 8} {\color{Teal} x^2y} + {\color{Red} 3} {\color{Teal} x^2y} \, = \, {\color{Red} 11} {\color{Teal} x^2y}

Nothing too difficult, right? We can also subtract like terms using the same steps.

8x2y3x2y=(83)x2y=5x2y\begin{align*} {\color{Red} 8} x^2y - {\color{Red} 3} x^2y \, &= \, ( {\color{Red} 8} - {\color{Red} 3} ) x^2y \\[1em] &= \, {\color{Red} 5} x^2y \end{align*}

Alright, let’s do a couple of examples.

Example

Simplify.

(i)2ab+5ab7ab(ii)7p2qr3p2qr+5p2qr\begin{align*} &(i) \hspace{1em} 2ab + 5ab - 7ab \\[1em] &(ii) \hspace{0.8em} -7p^2qr - 3p^2qr + 5p^2qr \end{align*}

Solution (i\hspace{0.2em} i \hspace{0.2em})

Just like we did earlier, we’ll bring the coefficients together, simplify them, and copy down the variables.

2ab+5ab7ab=(2+57)ab=0ab=0\begin{align*} {\color{Red} 2} ab {\color{Red} \hspace{0.25em} +\hspace{0.25em} 5} ab {\color{Red} \hspace{0.25em} -\hspace{0.25em} 7} ab \, &= \, ( {\color{Red} 2 + 5 - 7} ) ab \\[1em] &= \, {\color{Red} 0} \,ab \\[1em] &= \, 0 \end{align*}

Solution (ii\hspace{0.2em} ii \hspace{0.2em})

Again, the same two steps.

7p2qr3p2qr+5p2qr=(73+5)p2qr=5p2qr\begin{align*} {\color{Red} -7} p^2qr {\color{Red} \hspace{0.25em} -\hspace{0.25em} 3} p^2qr {\color{Red} \hspace{0.25em} +\hspace{0.25em} 5} p^2qr \, &= \, ( {\color{Red} -7 - 3 + 5} ) p^2qr \\[1em] &= \, {\color{Red} -5} \,p^2qr \end{align*}

Great! We are all set to start adding and subtracting polynomials.

Adding and Subtracting Polynomials

We'll go with addition first. Subtraction would require only a slight adjustment.

Adding Polynomials

To add two or more polynomials,
  1. Write all the polynomials one after the other connected with the plus sign.
  2. Group the like terms together.
  3. Simplify each group of like terms into one term.

Let’s apply these steps to solve a few polynomial addition problems.

Example

Add and simplify.

(i)2x2+3x4,x25x+9(ii)3p2q5pq6p,p2q26pq+1\begin{align*} &(i) \hspace{1em} 2x^2 + 3x - 4, \hspace{1em} x^2 - 5x + 9 \\[1em] &(ii) \hspace{0.55em} -3p^2q - 5pq - 6p, \hspace{1em} p^2q^2 - 6pq + 1 \end{align*}

Solution (i\hspace{0.2em} i \hspace{0.2em})

Step 1.  We write the two polynomials one after the other with a plus sign between them.

2x2+3x4+x25x+9 {\color{Red} 2x^2} {\color{Teal} \hspace{0.25em}+\hspace{0.25em}3x} {\color{Orchid} \hspace{0.25em}-\hspace{0.25em}4} \hspace{0.1em} + \hspace{0.1em} {\color{Red} x^2} {\color{Teal} \hspace{0.25em}-\hspace{0.25em}5x} {\color{Orchid} \hspace{0.25em}+\hspace{0.25em}9}

Like terms are in the same color.

Step 2.  Next, we bring the like terms together and simplify each group (using what we learned in the last section).

2x2+x2+3x5x4+9=3x22x+5\begin{align*} & {\color{Red} 2x^2} {\color{Red} \hspace{0.25em}+\hspace{0.25em} x^2} {\color{Teal} \hspace{0.25em}+\hspace{0.25em}3x} {\color{Teal} \hspace{0.25em}-\hspace{0.25em}5x} {\color{Orchid} \hspace{0.25em}-\hspace{0.25em}4} {\color{Orchid} \hspace{0.25em}+\hspace{0.25em}9} \\[1em] = \, \, & {\color{Red} 3x^2} {\color{Teal} \hspace{0.25em}-\hspace{0.25em}2x} {\color{Orchid} \hspace{0.25em}+\hspace{0.25em}5} \end{align*}

We can’t simplify any further (can’t combine unlike terms). So that’s the answer.

Solution (ii\hspace{0.2em} ii \hspace{0.2em})

Nothing really different in this example. Using the same two steps from above, we get –

3p2q5pq6p+p2q6pq+1=3p2q+p2q5pq6pq6p+1=2p2q11pq6p+1\begin{align*} & {\color{Red} -3p^2q} {\color{Teal} \hspace{0.25em}-\hspace{0.25em}5pq} {\color{Orchid} \hspace{0.25em}-\hspace{0.25em}6p} \hspace{0.1em} + \hspace{0.1em} {\color{Red} p^2q} {\color{Teal} \hspace{0.25em}-\hspace{0.25em}6pq} + 1 \\[1em] = \, \, & {\color{Red} -3p^2q} {\color{Red} \hspace{0.25em}+\hspace{0.25em} p^2q} {\color{Teal} \hspace{0.25em}-\hspace{0.25em}5pq} {\color{Teal} \hspace{0.25em}-\hspace{0.25em}6pq} {\color{Orchid} \hspace{0.25em}-\hspace{0.25em}6p} + 1 \\[1em] = \, \, & {\color{Red} -2p^2q} {\color{Teal} \hspace{0.25em}-\hspace{0.25em}11pq} {\color{Orchid} \hspace{0.25em}-\hspace{0.25em}6p} + 1 \end{align*}

That’s it.

Vertical (Column-wise) Addition

Instead of writing all the polynomials in one row, you can also arrange their terms in columns and add.

To add two or more polynomials (vertically),
  1. Write all the polynomials one below the other such that each group of like terms falls in a separate column.
  2. Add the terms (with their signs) in each column.

The following examples should help you understand this better.

Example

Add and simplify.

(i)9a2b+5ab23ab,4a2b+5ab+7(ii)x3y28x2y+3xy2,9x3y2+8x2y+2xy\begin{align*} &(i) \hspace{1em} 9a^2b + 5ab^2 - 3ab, \hspace{1em} 4a^2b + 5ab + 7 \\[1em] &(ii) \hspace{0.5em} -x^3y^2 - 8x^2y + 3xy^2, \hspace{1em} -9x^3y^2 + 8x^2y + 2xy \end{align*}

Solution (i\hspace{0.2em} i \hspace{0.2em})

Step 1.  We write the polynomials one below the other such that each group of like terms falls in a separate column.

Also, draw a horizontal line below the polynomials as shown below.

Adding polynomials columnwise addition (1)

Step 2.  Add the terms (with their signs) in each column and write the sum below the line.

So the sum of the two polynomials is 13a2b+5ab2+2ab+7\hspace{0.2em} 13a^2b + 5ab^2 + 2ab + 7 \hspace{0.2em}.

Solution (ii\hspace{0.2em} ii \hspace{0.2em})

Again, the same two steps. Just make sure only like terms go into the same column.

Adding polynomials columnwise addition (2)

In our final answer, we don’t need to write the second term (it’s 0\hspace{0.2em} 0 \hspace{0.2em}). The sum is 10x3y2+3xy2+2xy\hspace{0.2em} -10x^3y^2 + 3xy^2 + 2xy \hspace{0.2em}

Subtracting Polynomials

Subtracting a polynomial is the same as inverting the sign of each of its terms (\hspace{0.2em} - \hspace{0.2em}+\hspace{0.2em} + \hspace{0.2em}), and adding the polynomial.

Let me explain through this example.

Example

Subtract the second polynomial from the first.

(i)3x22xy,x2xy+2(ii)4a2b2+2a2b+9ab,5a2b24ab\begin{align*} &(i) \hspace{1em} 3x^2 - 2xy, \hspace{1em} x^2 - xy + 2 \\[1em] &(ii) \hspace{0.75em} 4a^2b^2 + 2a^2b + 9ab, \hspace{1em} 5a^2b^2 - 4ab \end{align*}

Solution (i\hspace{0.2em} i \hspace{0.2em})

Step 1.  We write the two polynomials one after the other with a minus sign between them.

Now it’s important to write the second polynomial inside parentheses because it’s the whole polynomial we are subtracting and not just the first term.

3x22xy(x2xy+2)=3x22xyx2+xy2\begin{align*} &3x^2 - 2xy - (x^2 - xy + 2) \\[1em] = \, \, &3x^2 - 2xy - x^2 + xy - 2 \end{align*}
Steps 1 & 2

Step 2.  Open the parentheses and distribute the minus sign across the second polynomial. In other words, we flip the sign of each term in the second polynomial from +\hspace{0.2em} + \hspace{0.2em} to \hspace{0.2em} - \hspace{0.2em} and the other way around. (Shown above)

Step 3.  Group the like terms together and simplify.

3x22xyx2+xy2=3x2x22xy+xy2=2x2xy2\begin{align*} & {\color{Red} 3x^2} {\color{Teal} \hspace{0.2em} - \hspace{0.2em} 2xy} {\color{Red} \hspace{0.2em} - \hspace{0.2em} x^2} {\color{Teal} \hspace{0.2em} + \hspace{0.2em} xy} - 2 \\[1em] = \, \, & {\color{Red} 3x^2 - x^2} {\color{Teal} \hspace{0.2em} - \hspace{0.2em} 2xy + xy} - 2 \\[1em] = \, \, & {\color{Red} 2x^2} {\color{Teal} \hspace{0.2em} - \hspace{0.2em} xy} - 2 \end{align*}

Solution (ii\hspace{0.2em} ii \hspace{0.2em})

Again, we start by writing the polynomials together with a minus sign between them.

I repeat, make sure the second polynomial is enclosed within parentheses. And that you flip the signs when opening the parentheses.

4a2b2+2a2b+9ab(5a24ab)=4a2b2+2a2b+9ab5a2+4ab\begin{align*} &4a^2b^2 + 2a^2b + 9ab - (5a^2 - 4ab) \\[1em] = \, \, &4a^2b^2 + 2a^2b + 9ab - 5a^2 + 4ab \end{align*}

And now, it’s time to simplify each group of like terms.

4a2b2+2a2b+9ab5a2b2+4ab=4a2b25a2b2+2a2b+9ab+4ab=a2b2+2a2b+13ab\begin{align*} & {\color{Red} 4a^2b^2} + 2a^2b {\color{Teal} \hspace{0.2em} + \hspace{0.2em} 9ab} {\color{Red} \hspace{0.2em} - \hspace{0.2em} 5a^2b^2} {\color{Teal} \hspace{0.2em} + \hspace{0.2em} 4ab} \\[1em] = \, \, & {\color{Red} 4a^2b^2 - 5a^2b^2} + 2a^2b {\color{Teal} \hspace{0.2em} + \hspace{0.2em} 9ab + 4ab} \\[1em] = \, \, & {\color{Red} -a^2b^2} + 2a^2b {\color{Teal} \hspace{0.2em} + \hspace{0.2em} 13ab} \end{align*}

Cool! Now let’s do a couple of examples using the vertical method – column-wise subtraction.

Vertical (Column-wise) Subtraction
To subtract two or more polynomials vertically,
  1. Write the two polynomials one below the other such that each group of like terms falls in a separate column.
  2. Flip the signs of each term (\hspace{0.2em} - \hspace{0.2em}+\hspace{0.2em} + \hspace{0.2em}) in the second row (of the polynomial being subtracted).
  3. Add the terms (with their signs) in each column.
Example

Subtract the second polynomial from the first.

(i)5x29x+2,2x2+5(2)p3q2p2q+pq,4p2q+6pq+1\begin{align*} &(i) \hspace{0.8em} -5x^2 - 9x + 2, \hspace{1em} 2x^2 + 5 \\[1em] &(2) \hspace{1em} p^3q^2 - p^2q + pq, \hspace{1em} -4p^2q + 6pq + 1 \end{align*}

Solution (i\hspace{0.2em} i \hspace{0.2em})

Step 1.  Write the second polynomial below the first such that each pair of like terms falls in a separate column.

Again, draw a horizontal line below the polynomials as shown below.

Step 2.  Flip the signs of each term in the second row.

Remember, if a term doesn’t have a visible sign, its sign is +\hspace{0.2em} + \hspace{0.2em} (and so, we change it to \hspace{0.2em} - \hspace{0.2em}).

Subtracting polynomials columnwise addition (1)

Step 3.  Add the terms (with their news signs) in each column and write the sum below the line.

So, the difference is 7x29x3\hspace{0.2em} -7x^2 - 9x - 3 \hspace{0.2em}

Solution (ii\hspace{0.2em} ii \hspace{0.2em})

The same three steps and we’ll get the answer.

Subtracting polynomials columnwise addition (2)

So p3q2+3p2q5pq1\hspace{0.2em} p^3q^2 + 3p^2q - 5pq - 1 \hspace{0.2em} is our answer.


And that brings us to the end of this tutorial on adding and subtracting polynomials. Until next time.