# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/polynomial/addition-subtraction-polynomial
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/polynomial/addition-subtraction-polynomial/en.mdx

Learn polynomial addition and subtraction with worked examples. Understand like terms, horizontal and vertical methods, plus graphical visualization.

---

## Basic Concepts

The operations of addition and subtraction on polynomials are essentially the same as for other algebraic forms: we can only add or subtract **like terms**.

### What Are Like Terms?

**Like terms** are terms that have the **exact same variables and variable powers**. The coefficients of these terms can be different.

**Examples of Like Terms:**

- $$3x, \space -7x, \space -\frac{1}{5}x$$ (all have the variable $$x$$ to
  the power of $$1$$)
- $$\frac{1}{2}x^3, \space 4x^3, \space -2x^3$$ (all have the variable $$x$$ to
  the power of $$3$$)
- $$2x^2yz^3, \space \frac{3}{4}x^2yz^3, \space -5z^3x^2y$$ (all
  have the variable $$x$$ to the power of $$2$$, $$y$$ to
  the power of $$1$$, and $$z$$ to the power of $$3$$)

Visible text: - (all have the variable to
 the power of )
- (all have the variable to
 the power of )
- (all
 have the variable to the power of , to
 the power of , and to the power of )

**Examples of Unlike Terms:**

- $$11x$$ and $$4x^2$$ (different powers of $$x$$
  )
- $$4x^3$$ and $$-2x^4$$ (different powers of $$x$$
  )
- $$4x^2$$ and $$-x^5$$ (different powers of $$x$$
  )
- $$\frac{3}{4}x^2yz^3$$ and $$2x^2y$$ (missing
  the variable $$z^3$$)
- $$\frac{3}{4}x^2yz^3$$ and $$-7xy^2z^3$$ (different
  powers of $$x$$ and $$y$$)

Visible text: - and (different powers of 
 )
- and (different powers of 
 )
- and (different powers of 
 )
- and (missing
 the variable )
- and (different
 powers of and )

## Polynomial Addition

To add two polynomials, we simply **add the coefficients of like terms**.

**Horizontal Method:**

1.  Write both polynomials in parentheses connected by a plus sign.
2.  Remove the parentheses.
3.  Group the like terms.
4.  Add the coefficients of each group of like terms (use the distributive property).

Visible text: 1. Write both polynomials in parentheses connected by a plus sign.
2. Remove the parentheses.
3. Group the like terms.
4. Add the coefficients of each group of like terms (use the distributive property).

**Example:**

Find the result of $$(2x^3 + 7x^2 + 3x + 5) + (6x^3 + 2x^2 + 4x + 1)$$.

Visible text: Find the result of .

Component: MathContainer
Children:

```math
(2x^3 + 7x^2 + 3x + 5) + (6x^3 + 2x^2 + 4x + 1)
```

```math
= 2x^3 + 7x^2 + 3x + 5 + 6x^3 + 2x^2 + 4x + 1 \quad \text{(Remove parentheses)}
```

```math
= (2x^3 + 6x^3) + (7x^2 + 2x^2) + (3x + 4x) + (5 + 1) \quad \text{(Group like terms)}
```

```math
= (2 + 6)x^3 + (7 + 2)x^2 + (3 + 4)x + (5 + 1) \quad \text{(Distributive property)}
```

```math
= 8x^3 + 9x^2 + 7x + 6 \quad \text{(Final result)}
```

## Polynomial Subtraction

To subtract two polynomials, we **change the sign of each term in the polynomial being subtracted**, then add them as usual.

**Horizontal Method:**

1.  Write both polynomials in parentheses connected by a minus sign.
2.  Remove the parentheses. **Remember:** change the sign of each term in the second parenthesis (distribute the negative sign).
3.  Group the like terms.
4.  Add the coefficients of each group of like terms.

Visible text: 1. Write both polynomials in parentheses connected by a minus sign.
2. Remove the parentheses. **Remember:** change the sign of each term in the second parenthesis (distribute the negative sign).
3. Group the like terms.
4. Add the coefficients of each group of like terms.

**Example:**

Find the result of $$(9x^3 + 4x^2 + 6x + 5) - (2x^3 + 3x^2 + 3x + 4)$$.

Visible text: Find the result of .

Component: MathContainer
Children:

```math
(9x^3 + 4x^2 + 6x + 5) - (2x^3 + 3x^2 + 3x + 4)
```

```math
= 9x^3 + 4x^2 + 6x + 5 - 2x^3 - 3x^2 - 3x - 4 \quad \text{(Change signs \& remove parentheses)}
```

```math
= (9x^3 - 2x^3) + (4x^2 - 3x^2) + (6x - 3x) + (5 - 4) \quad \text{(Group like terms)}
```

```math
= (9 - 2)x^3 + (4 - 3)x^2 + (6 - 3)x + (5 - 4) \quad \text{(Distributive property)}
```

```math
= 7x^3 + 1x^2 + 3x + 1 \quad \text{(Final result)}
```

```math
= 7x^3 + x^2 + 3x + 1
```

Note: When subtracting, the negative sign in front of the parenthesis changes the sign of _every_ term inside that parenthesis.

## Vertical Method

Besides the horizontal method, polynomial addition and subtraction can also be done using the vertical method, similar to adding and subtracting regular numbers.

**Steps:**

1.  Arrange both polynomials vertically.
2.  Ensure like terms are aligned in the same column.
3.  If a term is missing in one of the polynomials, leave a blank space or write a coefficient of $$0$$.
4.  Add or subtract the coefficients in each column.

Visible text: 1. Arrange both polynomials vertically.
2. Ensure like terms are aligned in the same column.
3. If a term is missing in one of the polynomials, leave a blank space or write a coefficient of .
4. Add or subtract the coefficients in each column.

**Example of Vertical Addition:**

```math
\begin{array}{rrrrr}
& 2x^3 & +7x^2 & +3x & +5 \\
+ & 6x^3 & +2x^2 & +4x & +1 \\
\hline
& 8x^3 & +9x^2 & +7x & +6
\end{array}
```

**Example of Vertical Subtraction:**

```math
\begin{array}{rrrrr}
& 9x^3 & +4x^2 & +6x & +5 \\
- & 2x^3 & +3x^2 & +3x & +4 \\
\hline
& 7x^3 & +1x^2 & +3x & +1
\end{array}
```

Both methods (horizontal and vertical) will yield the same answer. Choose the method that you find most comfortable and easiest to understand.

## Graphical Addition and Subtraction of Polynomial Functions

Besides performing operations algebraically, we can also understand polynomial addition and subtraction visually through their graphs.

Suppose we have three graphs of polynomial functions:

Component: ContentStack
Children:
Component: LineEquation
Props:
- title: Graph of $$f(x) = x + 1$$
  Visible text: Graph of
- description: Linear Function (Degree 1)
- showZAxis: false
- cameraPosition: [0, 0, 15]
- data: [
{
points: Array.from({ length: 51 }, (_, i) => {
const x = -2.5 + i * 0.1;
return { x, y: x + 1, z: 0 };
}),
color: getColor("SKY"),
showPoints: false,
},
]

Component: LineEquation
Props:
- title: Graph of $$g(x) = 0.5x^4 - 2x^2 + 1$$
  Visible text: Graph of
- description: Degree 4 Function
- showZAxis: false
- cameraPosition: [0, 0, 15]
- data: [
{
points: Array.from({ length: 51 }, (_, i) => {
const x = -2.5 + i * 0.1;
return { x, y: 0.5 * x ** 4 - 2 * x ** 2 + 1, z: 0 };
}),
color: getColor("LIME"),
showPoints: false,
},
]

Component: LineEquation
Props:
- title: Graph of $$h(x) = -0.5x^3 + 1.5x$$
  Visible text: Graph of
- description: Degree 3 Function
- showZAxis: false
- cameraPosition: [0, 0, 15]
- data: [
{
points: Array.from({ length: 51 }, (_, i) => {
const x = -2.5 + i * 0.1;
return { x, y: -0.5 * x ** 3 + 1.5 * x, z: 0 };
}),
color: getColor("AMBER"),
showPoints: false,
},
]

### Sketching the Graph of the Sum and Difference

Without needing the exact equations of functions $$f$$, $$g$$, or $$h$$, we can sketch the graph of their sum (e.g., $$f(x) + g(x)$$) or difference (e.g., $$f(x) - g(x)$$) as follows:

Visible text: Without needing the exact equations of functions , , or , we can sketch the graph of their sum (e.g., ) or difference (e.g., ) as follows:

1.  Choose several identical $$x$$ values on both graphs.
2.  For each $$x$$ value, read the $$y$$ value from each graph. Let $$y_f = f(x)$$ and $$y_g = g(x)$$.
3.  **For addition ($$f(x) + g(x)$$):** Calculate the value $$y_{\text{new}} = y_f + y_g$$.
4.  **For subtraction ($$f(x) - g(x)$$):** Calculate the value $$y_{\text{new}} = y_f - y_g$$.
5.  Plot the point $$(x, y_{\text{new}})$$.
6.  Repeat for several other $$x$$ values.
7.  Connect the new points with a smooth curve.

Visible text: 1. Choose several identical values on both graphs.
2. For each value, read the value from each graph. Let and .
3. **For addition ():** Calculate the value .
4. **For subtraction ():** Calculate the value .
5. Plot the point .
6. Repeat for several other values.
7. Connect the new points with a smooth curve.

**Why does this work?**

Because the definition of function addition or subtraction is to add or subtract their output values ($$y$$) for each corresponding input value ($$x$$).

Visible text: Because the definition of function addition or subtraction is to add or subtract their output values () for each corresponding input value ().

### Example Sketches

Here are example sketches of the graphs resulting from the sum $$f(x) + g(x)$$ and difference $$f(x) - g(x)$$, obtained by vertically adding/subtracting the y-values for each x.

Visible text: Here are example sketches of the graphs resulting from the sum and difference , obtained by vertically adding/subtracting the y-values for each x.

Component: ContentStack
Children:
Component: LineEquation
Props:
- title: Graph of $$f(x) + g(x)$$,{" "}
$$f(x) = x + 1$$, and{" "}
$$g(x) = 0.5x^4 - 2x^2 + 1$$
  Visible text: Graph of ,{" "}
, and{" "}
- description: The result of $$f(x) + g(x)$$ is{" "}
$$x + 1 + 0.5x^4 - 2x^2 + 1$$
  Visible text: The result of is{" "}
- showZAxis: false
- cameraPosition: [0, 0, 15]
- data: [
{
points: Array.from({ length: 51 }, (_, i) => {
const x = -2.5 + i * 0.1;
return { x, y: x + 1 + (0.5 * x ** 4 - 2 * x ** 2 + 1), z: 0 };
}),
color: getColor("VIOLET"),
showPoints: false,
},
]

Component: LineEquation
Props:
- title: Graph of $$f(x) - g(x)$$,{" "}
$$f(x) = x + 1$$, and{" "}
$$g(x) = 0.5x^4 - 2x^2 + 1$$
  Visible text: Graph of ,{" "}
, and{" "}
- description: The result of $$f(x) - g(x)$$ is{" "}
$$x + 1 - (0.5x^4 - 2x^2 + 1)$$
  Visible text: The result of is{" "}
- showZAxis: false
- cameraPosition: [0, 0, 15]
- data: [
{
points: Array.from({ length: 51 }, (_, i) => {
const x = -2.5 + i * 0.1;
return { x, y: x + 1 - (0.5 * x ** 4 - 2 * x ** 2 + 1), z: 0 };
}),
color: getColor("PINK"),
showPoints: false,
},
]

In the same way, you can sketch the graphs of $$f(x) + h(x), \space g(x) + h(x), \space f(x) - h(x), \space \text{and} \space g(x) - h(x)$$. The key is to add or subtract the heights (y-values) of the original graphs at each corresponding x-value.

Visible text: In the same way, you can sketch the graphs of . The key is to add or subtract the heights (y-values) of the original graphs at each corresponding x-value.