Jugami Algebra

Jugami › Algebra › Polynomials and Factoring

Polynomials and Factoring

How to add, subtract and multiply polynomials, and how to run multiplication backwards: factoring.

A rectangle is x + 3 meters long and x + 2 meters wide. Its area is (x + 3)(x + 2), and multiplying it out gives x² + 5x + 6. Both are the same area written two ways. Turning the first into the second is multiplying; turning the second back into the first is factoring. Factoring is how you solved quadratic equations in the last unit, and this unit shows how it works in detail.

Area model for (x + 2)(x + 3). A rectangle is x + 2 wide and x + 3 tall. It splits into four parts: an x by x square of area x squared, an x by 2 strip of area 2x, a 3 by x strip of area 3x, and a 3 by 2 block of area 6. Together: x squared + 5x + 6.x2xx²2x33x6
The area model: (x + 2)(x + 3) splits into four parts that add up to x² + 2x + 3x + 6 = x² + 5x + 6.

What is a polynomial?

A monomial is a number, a variable, or a product of a number and variables with whole-number exponents: 7, x, −3x² and 4xy are monomials. A polynomial is a monomial or a sum of monomials, which are called its terms. The number in front of a term is its coefficient.

Naming polynomials
PolynomialTermsNameDegree
5x1Monomial1
x² − 92Binomial2
2x² + 3x − 53Trinomial2
4x³ − x + 13Trinomial3
x⁴ + 2x³ − x² + 64Polynomial4

The degree of a polynomial in x is its highest power of x. It is in standard form when the terms go from the highest power down to the lowest. The first coefficient in standard form is the leading coefficient. In −2x³ + 5x − 1, the degree is 3 and the leading coefficient is −2.

Expressions like 1/x or √x are not polynomials, because their exponents are not whole numbers (1/x = x⁻¹ and √x = x^(1/2)).

Your turn

Write 3x − 7 + x³ in standard form. Give its degree and leading coefficient.

Show answer
x³ + 3x − 7Highest power firstDegree 3, leading coefficient 1x³ means 1x³

Adding and subtracting polynomials

Like terms have the same variable raised to the same power: 3x² and −5x² are like terms, but 3x² and 3x are not. To add polynomials, combine like terms by adding their coefficients. To subtract, change the sign of every term in the polynomial being subtracted, then add.

Example 1: (3x² − 2x + 5) + (x² + 6x − 8)

3x² − 2x + 5 + x² + 6x − 8Remove the brackets: nothing changes sign3x² + x² = 4x², −2x + 6x = 4x and 5 − 8 = −3Combine like terms4x² + 4x − 3Standard form

Example 2: (5x² + x − 4) − (2x² − 3x + 1)

5x² + x − 4 − 2x² + 3x − 1The minus sign changes the sign of every term in (2x² − 3x + 1)5x² − 2x² = 3x², x + 3x = 4x and −4 − 1 = −5Combine like terms3x² + 4x − 5Check with x = 1: 2 − 0 = 2 and 3 + 4 − 5 = 2 ✓

Multiplying polynomials

When you multiply powers of the same variable, add the exponents: x² · x³ = x⁵. Multiply the coefficients as usual: 4x · 3x² = 12x³.

A monomial times a polynomial: distribute

Example 1: 3x(2x² − 5x + 4)

3x · 2x² + 3x · (−5x) + 3x · 4Multiply 3x by each term6x³ − 15x² + 12xMultiply the numbers and add the exponents

Two binomials: FOIL

Every term in the first bracket multiplies every term in the second. For two binomials that is four products, often remembered as FOIL: First, Outer, Inner, Last.

Example 2: (x + 4)(x − 3)

x · x + x · (−3) + 4 · x + 4 · (−3)First, Outer, Inner, Lastx² − 3x + 4x − 12Multiply each pairx² + x − 12Combine like terms: −3x + 4x = x

The area model (box method)

Draw a box with one factor’s terms across the top and the other’s down the side. Each cell is a product. Negative terms work too: the box isn’t a real rectangle any more, but the bookkeeping is the same.

Example 3: (2x − 1)(x + 4)

2x² − x + 8x − 4The four cells: 2x · x, −1 · x, 2x · 4 and −1 · 42x² + 7x − 4Combine like terms: −x + 8x = 7x
Area model for (2x − 1)(x + 4). The columns are 2x and −1, the rows are x and 4. The four parts are 2x squared, −x, 8x and −4; the two parts with −1 are drawn with dashed red borders because they are negative. Together: 2x squared + 7x − 4.2x−1x2x²−x48x−4
The box for (2x − 1)(x + 4). The dashed cells are negative.

FOIL only names the four products of two binomials. With longer polynomials, keep going: every term times every term.

Example 4: (x + 2)(x² − 3x + 1)

x(x² − 3x + 1) + 2(x² − 3x + 1)Multiply each term of x + 2 by the whole bracketx³ − 3x² + x + 2x² − 6x + 2Distribute: six productsx³ − x² − 5x + 2Combine like terms: −3x² + 2x² = −x² and x − 6x = −5x

Special products

Three products come up so often that they are worth knowing by heart.

Special products
PatternResultExample
(a + b)²a² + 2ab + b²(x + 5)² = x² + 10x + 25
(a − b)²a² − 2ab + b²(x − 3)² = x² − 6x + 9
(a + b)(a − b)a² − b²(x + 7)(x − 7) = x² − 49

In (a + b)², the 2ab comes from the two middle products ab and ba: in a square like (x + 3)², they are two matching strips. In (a + b)(a − b), the middle products are −ab and ab, and they cancel.

Example: (2x − 3)²

(2x)² − 2 · 2x · 3 + 3²(a − b)² with a = 2x and b = 34x² − 12x + 9Work out each term

Not just squares

(x + 5)² is not x² + 25. Don’t forget the middle term: (x + 5)² = x² + 10x + 25. Try x = 1: 6² = 36, but 1 + 25 = 26.

Factoring out the greatest common factor

Factoring means writing a polynomial as a product. Always start by looking for the greatest common factor (GCF): the largest number, times the highest power of x, that divides every term. Then divide each term by it.

Example 1: 12x³ − 18x²

6x² · 2x − 6x² · 3The GCF of 12 and 18 is 6, and both terms have at least x²6x²(2x − 3)Factor out 6x²

Example 2: 4x² + 8x − 20

4 · x² + 4 · 2x − 4 · 5The GCF of 4, 8 and 20 is 4. The last term has no x4(x² + 2x − 5)Factor out 4

Check by multiplying back: 6x²(2x − 3) = 12x³ − 18x² ✓.

Factoring trinomials

When the leading coefficient is 1

Since (x + p)(x + q) = x² + (p + q)x + pq, to factor x² + bx + c find two numbers that multiply to c and add to b.

Sign patterns for x² + bx + c
cbThe two numbersExample
PositivePositiveBoth positivex² + 7x + 10 = (x + 2)(x + 5)
PositiveNegativeBoth negativex² − 7x + 10 = (x − 2)(x − 5)
NegativeEitherOne positive, one negativex² − 3x − 10 = (x − 5)(x + 2)

Example 1: x² − 2x − 15

−5 · 3 = −15 and −5 + 3 = −2Two numbers that multiply to −15 and add to −2(x − 5)(x + 3)Put them in the brackets

When the leading coefficient isn’t 1: the ac method

For ax² + bx + c, find two numbers that multiply to a · c and add to b. Use them to split the middle term, then factor the two pairs (this is factoring by grouping).

Example 2: 3x² + 10x + 8

3 · 8 = 24Multiply a · c6 · 4 = 24 and 6 + 4 = 10Two numbers that multiply to 24 and add to 103x² + 6x + 4x + 8Split 10x into 6x + 4x3x(x + 2) + 4(x + 2)Factor each pair; both share (x + 2)(x + 2)(3x + 4)Factor out (x + 2)

Example 3: 2x² − 7x + 3

2 · 3 = 6Multiply a · c−6 · (−1) = 6 and −6 + (−1) = −7Both numbers are negative: the product is positive and the sum is negative2x² − 6x − x + 3Split −7x into −6x − x2x(x − 3) − (x − 3)Factor each pair: take out −1 from −x + 3(x − 3)(2x − 1)Factor out (x − 3)

If no pair of whole numbers works, the trinomial doesn’t factor over the integers. For example, nothing multiplies to 1 and adds to 1, so x² + x + 1 stays as it is.

Special factoring patterns

Read the special products backwards.

Difference of squares

a² − b² = (a + b)(a − b)

Example 1: 9x² − 25

(3x)² − 5²Both terms are perfect squares(3x + 5)(3x − 5)a = 3x and b = 5

A sum of squares such as x² + 25 does not factor over the real numbers.

Perfect-square trinomials

a² + 2ab + b² = (a + b)² and a² − 2ab + b² = (a − b)²

Example 2: x² − 14x + 49

x² − 2 · x · 7 + 7²x² and 49 = 7² are squares, and the middle term is 2 · x · 7 = 14x(x − 7)²a² − 2ab + b² with a = x and b = 7

Factoring completely

A polynomial is factored completely when no bracket can be factored any further. A good order of checks:

  1. Take out the GCF.
  2. Count the terms. Two terms: is it a difference of squares (or of cubes)? Three terms: is it a perfect square, or does the a = 1 or ac method work?
  3. Check every bracket again.
  4. Multiply back to check.

Example 1: 2x³ − 18x

2x(x² − 9)Take out the GCF, 2x2x(x + 3)(x − 3)x² − 9 is a difference of squares

Example 2: x⁴ − 16

(x²)² − 4²A difference of squares(x² + 4)(x² − 4)Factor it(x² + 4)(x + 2)(x − 2)x² − 4 is a difference of squares again; x² + 4 doesn’t factor

Example 3: 3x² + 12x + 12

3(x² + 4x + 4)Take out the GCF, 33(x + 2)²x² + 4x + 4 is a perfect square

A taste of cubes

Sums and differences of cubes also factor, into a binomial times a trinomial:

a³ + b³ = (a + b)(a² − ab + b²)
a³ − b³ = (a − b)(a² + ab + b²)

Example: x³ − 8

x³ − 2³8 = 2³(x − 2)(x² + 2x + 4)a³ − b³ with a = x and b = 2

The trinomial x² + 2x + 4 does not factor over the integers. You will meet cubes again in later courses; for now, check the pattern by multiplying it out.

Area-model explorer

Build the product (ax + p)(x + q) and watch the four cells of its area model. Change a, p and q until the four cells add up to the target trinomial. That is factoring by trial. Negative cells have a dashed red border.

Common mistakes

✗Squaring a sum term by term: (x + 4)² = x² + 16.✓Use (a + b)² = a² + 2ab + b²: (x + 4)² = x² + 8x + 16.
✗Subtracting only the first term: (5x² + 3x) − (2x² − x) = 3x² + 2x.✓The minus changes every sign in the bracket: 5x² + 3x − 2x² + x = 3x² + 4x.
✗Multiplying exponents instead of adding: x² · x³ = x⁶.✓Add them: x² · x³ = x⁵.
✗Adding unlike terms: 2x² + 3x = 5x³.✓2x² and 3x aren’t like terms, so 2x² + 3x stays as it is (or factors as x(2x + 3)).
✗Losing a 1 when factoring out the GCF: 3x² + 3x = 3x(x).✓Dividing 3x by 3x leaves 1: 3x² + 3x = 3x(x + 1).
✗Factoring a sum of squares: x² + 9 = (x + 3)(x + 3).✓(x + 3)² = x² + 6x + 9. A sum of squares like x² + 9 doesn’t factor over the real numbers.
✗Stopping too soon: 2x² − 8 = (2x + 4)(x − 2).✓(2x + 4) still has a common factor of 2. Take the GCF out first: 2(x² − 4) = 2(x + 2)(x − 2).
✗Getting the signs backwards: x² − x − 6 = (x + 3)(x − 2).✓Check by multiplying: that gives x² + x − 6. The right answer is (x − 3)(x + 2).

Practice problems

Work each one on paper, then open the answer to check your work. Problem 5 has a surprise.

  1. Simplify: (4x² − 3x + 2) − (x² + 5x − 7)
    Show answer
    4x² − 3x + 2 − x² − 5x + 7Change every sign in the second bracket3x² − 8x + 9Combine like terms
  2. Multiply: −2x(3x² − x + 5)
    Show answer
    −2x · 3x² − 2x · (−x) − 2x · 5Distribute −2x−6x³ + 2x² − 10xMultiply each term
  3. Multiply: (3x − 2)(x + 5)
    Show answer
    3x² + 15x − 2x − 10FOIL3x² + 13x − 10Combine like terms
  4. Multiply: (x − 6)²
    Show answer
    x² − 2 · x · 6 + 6²(a − b)²x² − 12x + 36Not x² + 36
  5. Factor out the GCF: 15x³ + 10x² − 5x
    Show answer
    5x(3x² + 2x − 1)The GCF is 5x; −5x ÷ 5x = −15x(3x − 1)(x + 1)The trinomial factors too, so this is factored completely
  6. Factor: x² + 9x + 20
    Show answer
    4 · 5 = 20 and 4 + 5 = 9Multiply to 20, add to 9(x + 4)(x + 5)
  7. Factor: x² + 2x − 24
    Show answer
    6 · (−4) = −24 and 6 + (−4) = 2Multiply to −24, add to 2(x + 6)(x − 4)
  8. Factor: 5x² − 13x − 6
    Show answer
    5 · (−6) = −30a · c−15 · 2 = −30 and −15 + 2 = −13Multiply to −30, add to −135x² − 15x + 2x − 6Split the middle term5x(x − 3) + 2(x − 3)Factor each pair(x − 3)(5x + 2)Factor out (x − 3)
  9. Factor: 49x² − 1
    Show answer
    (7x)² − 1²Difference of squares(7x + 1)(7x − 1)
  10. Factor completely: 3x³ − 12x² + 12x
    Show answer
    3x(x² − 4x + 4)Take out the GCF, 3x3x(x − 2)²A perfect-square trinomial

History: from pictures to letters

Long before algebra had symbols, Greek geometers worked with areas. Book II of Euclid’s Elements states, in Proposition 4, that if a straight line is cut at random, the square on the whole line equals the squares on the two pieces plus twice the rectangle made by the pieces. Draw it and you get the area model at the top of this page; in today’s symbols it says (a + b)² = a² + 2ab + b². Euclid wrote it about lines and areas, not letters and numbers.

Writing such rules with letters came much later. In 1591 the French mathematician François Viète published In artem analyticam isagoge (Introduction to the analytic art) at Tours. MacTutor describes it as the first systematic algebraic notation: Viète used vowels for unknown quantities and consonants for known ones, and he is credited with the word coefficient.

The habit of using letters from the end of the alphabet, like x, for unknowns and letters from the start, like a, b and c, for known numbers comes from René Descartes. His La Géométrie, published in 1637 at Leiden as an appendix to his Discours de la méthode, used that convention, and it is still how this page writes ax² + bx + c.

Connections to quadratic equations

In the Quadratic Equations unit, factoring was one way to solve an equation. Factor the quadratic, then use the zero-product property: if (x − 5)(x + 3) = 0, then x = 5 or x = −3. The factors and the roots match up: a factor (x − r) gives the root x = r, which is where the parabola crosses the x-axis.

Solve x² − 2x − 15 = 0 by factoring
(x − 5)(x + 3) = 0Factor: see Example 1 abovex = 5 or x = −3Zero-product property

The special products are behind completing the square, too: x² + 6x + 9 = (x + 3)² is a perfect-square trinomial. And if a quadratic doesn’t factor over the integers, like x² + x − 1, the quadratic formula still finds its roots.

Practice: Multiply and Factor

A new problem every time, with hints and full steps. Choose a level, or mix them all. Type powers with the x² button or as x^2. Any equivalent answer is accepted: terms in any order, and factors in any order, like (x + 3)(x − 2) or (x − 2)(x + 3).

Sources

  • Euclid, Elements, Book II, Proposition 4, in D. E. Joyce’s online edition, Clark University: Proposition II.4 (the square on a whole line equals the squares on the two segments plus twice the rectangle contained by them).
  • J. J. O’Connor and E. F. Robertson, MacTutor History of Mathematics, University of St Andrews: François Viète (In artem analyticam isagoge, Tours, 1591; vowels for unknowns and consonants for knowns; the word “coefficient”; Descartes’s later convention of letters at the end of the alphabet for unknowns).
  • J. J. O’Connor and E. F. Robertson, MacTutor: René Descartes (La Géométrie, published at Leiden in 1637 as an appendix to the Discours de la méthode).
  • Common Core State Standards for Mathematics: Arithmetic with Polynomials and Rational Expressions (A-APR.A.1, adding, subtracting and multiplying polynomials) and Seeing Structure in Expressions (A-SSE.A.2 and A-SSE.B.3, rewriting and factoring), which this lesson supports.

Credits: all diagrams on this page are original SVG drawings made for Jugami. Every product, factorization and step was checked by a script.