# Subtracting Polynomials

Subtraction of polynomials is quite similar to addition of polynomials. You just need to be careful with minus sign.

Similarly to adding, we can subtract polynomials either horizontally or vertically.

Example 1. Simplify ${\left({9}{x}+{3}{y}\right)}-{\left({3}{x}-{7}{y}\right)}$ (parenthesis are written to separate polynomials).

Horizontally.

First, we need to get rid of minus sign in front of parenthesis. This can be done using distributive property of multiplication: ${9}{x}+{3}{y}-{1}\cdot{\left({3}{x}\right)}-{1}\cdot{\left(-{7}{y}\right)}$.

Note, that I wrote 1 to show distributive property ${a}{\left({b}+{c}\right)}={a}{b}+{a}{c}$ explicitly. In above case ${a}=-{1}$, ${b}={3}{x}$ and ${c}=-{7}{y}$.

Now, we just perform multiplication and simplification: ${9}{x}+{3}{y}-{1}\cdot{\left({3}{x}\right)}-{1}\cdot{\left(-{7}{y}\right)}={9}{x}+{3}{y}-{3}{x}+{7}{y}={6}{x}+{10}{y}$.

Vertically.

$\begin{array}{r} \ & 9\color{blue}{x}&+&3\color{green}{y}&\phantom{)} \\- ( & 3\color{blue}{x}&-&7\color{green}{y}&) \\ \hline \end{array}$

Probably. you've already noticed that running negative sign through parenthesis changes sign of each term inside parenthesis.

This means, that we can write, that ${\left({9}{x}+{3}{y}\right)}-{\left({3}{x}-{7}{y}\right)}={\left({9}{x}+{3}{y}\right)}{\color{red}{{+}}}{\left({\color{red}{{-}}}{3}{x}{\color{red}{{+}}}{7}{y}\right)}$.

Thus, that instead of writing minus sign, we can discard minus sign and swap signs.

$\begin{array}{r} \ & 9\color{blue}{x}&+&3\color{green}{y}\\\color{red}{-} & 3\color{blue}{x}&\color{red}{+}&7\color{green}{y} \\ \hline \ & 6\color{blue}{x}&+&10\color{green}{y}\end{array}$

Thus is ${\left({9}{x}+{3}{y}\right)}-{\left({3}{x}-{7}{y}\right)}={6}{x}+{10}{y}$.

Rule for subtracting polynomials: change signs of terms of a polynomial that is subtracted. Perform addition instead of subtraction.

Sometimes, there are some terms in one polynomial, that can be absent in another. In this case, for vertical subtraction, you need to correctly line up polynomials and leave gaps, where needed.

Also, terms in polynomials can be written in different order. When subtracting vertically, write like terms one under another.

Example 2. Simplify ${\left({3}{{x}}^{{4}}+{5}{{x}}^{{3}}+{1}\right)}-{\left({2}{{x}}^{{4}}-{5}-{9}{{x}}^{{2}}\right)}$.

Horizontally.

Change signs: ${\left({3}{{x}}^{{4}}+{5}{{x}}^{{3}}+{1}\right)}-{\left({2}{{x}}^{{4}}-{5}-{9}{{x}}^{{2}}\right)}={\left({3}{{x}}^{{4}}+{5}{{x}}^{{3}}+{1}\right)}+{\left(-{2}{{x}}^{{4}}+{5}+{9}{{x}}^{{2}}\right)}$.

${3}{{x}}^{{4}}+{5}{{x}}^{{3}}+{1}-{2}{{x}}^{{4}}+{5}+{9}{{x}}^{{2}}={{x}}^{{4}}+{5}{{x}}^{{3}}+{9}{{x}}^{{2}}+{6}$.

Vertically.

Remember to line up correctly.

$\begin{array}{r} \ & 3x^4&+&5x^3&\phantom{+}&\phantom{9x^2}&+&1 \\ - &2x^4&\phantom{+}&\phantom{5x^3}&+&9x^2&+&5 \\ \hline & x^4&+&5x^3&+&9x^2&+&6 \\ \end{array}$

Therefore, ${\left({3}{{x}}^{{4}}+{5}{{x}}^{{3}}+{1}\right)}-{\left({2}{{x}}^{{4}}-{5}-{9}{{x}}^{{2}}\right)}={{x}}^{{4}}+{5}{{x}}^{{3}}+{9}{{x}}^{{2}}+{6}$.

Finally, you can add/subtract more than 2 polynomials.

Example 3. Perform subtraction: ${\left({7}{{x}}^{{2}}-{2}{x}{y}+{3}{{y}}^{{2}}-{1}\right)}-{\left({6}{{x}}^{{2}}+{2}{x}{y}-{3}\right)}-{\left({2}{x}{y}-{5}{{y}}^{{2}}+{{x}}^{{2}}-{3}\right)}$.

Horizontally.

Change signs: ${7}{{x}}^{{2}}-{2}{x}{y}+{3}{{y}}^{{2}}-{1}-{6}{{x}}^{{2}}-{2}{x}{y}+{3}-{2}{x}{y}+{5}{{y}}^{{2}}-{{x}}^{{2}}+{3}$.

Now, perform addition: ${7}{{x}}^{{2}}-{2}{x}{y}+{3}{{y}}^{{2}}-{1}-{6}{{x}}^{{2}}-{2}{x}{y}+{3}-{2}{x}{y}+{5}{{y}}^{{2}}-{{x}}^{{2}}+{3}=-{6}{x}{y}+{8}{{y}}^{{2}}+{5}$.

Vertically. Don't forget to write like terms under each other and fill gaps, where necessary.

$\begin{array}{r} \ & 7x^2&-&2xy&+&3y^2&-&1 \\ -& 6x^2&-&2xy&\phantom{+}&\phantom{3y^2}&+&3 \\- &x^2&-&2xy&+&5y^2&+&3 \\ \hline & &-&6xy&+&8y^2&+&5 \\ \end{array}$

Answer: ${\left({7}{{x}}^{{2}}-{2}{x}{y}+{3}{{y}}^{{2}}-{1}\right)}-{\left({6}{{x}}^{{2}}+{2}{x}{y}-{3}\right)}-{\left({2}{x}{y}-{5}{{y}}^{{2}}+{{x}}^{{2}}-{3}\right)}=-{6}{x}{y}+{8}{{y}}^{{2}}+{5}$.

Now, it is time to exercise.

Exercise 1. Simplify ${\left({3}{{x}}^{{2}}-{2}{x}{y}+{5}{{y}}^{{2}}\right)}-{\left(-{2}{{y}}^{{2}}-{3}{{x}}^{{2}}+{5}{x}{y}\right)}$.

Answer: ${6}{{x}}^{{2}}-{7}{x}{y}+{7}{{y}}^{{2}}$.

Exercise 2. Perform subtraction: ${\left({5}+{2}{{x}}^{{3}}\right)}-{\left({{x}}^{{2}}-{4}-{5}{{x}}^{{3}}+{x}\right)}$.

Answer: ${7}{{x}}^{{3}}-{{x}}^{{2}}-{x}+{9}$.

Exercise 3. Simplify ${\left(-{x}{{y}}^{{2}}+{4}{{x}}^{{2}}{{y}}^{{2}}-{5}{{x}}^{{3}}\right)}-{\left({7}{{x}}^{{2}}{{y}}^{{2}}-{{x}}^{{3}}-{6}{{x}}^{{2}}{y}\right)}+{\left({4}{{x}}^{{3}}-{8}{{x}}^{{2}}{{y}}^{{2}}\right)}$.

Answer: $-{11}{{x}}^{{2}}{{y}}^{{2}}+{6}{{x}}^{{2}}{y}-{x}{{y}}^{{2}}$.