0.3: Expanding and Factoring

Goals:

Algebraic Expressions


Algebraic expressions are just operations, numbers, and variables mixed together. For example \[2x^2 - 3x + 4 \qquad \sqrt{x} + 10 \qquad (x + 1)(x + 2) \qquad (a + b + c)^2(x^2y + 3)\] are all algebraic expressions.

Adding and Subtracting


To add and subtract algebraic expressions, look for like terms.

Like terms
Like terms are terms with the same factors except for the numerical factor (called the coefficient).
Which are like terms?

Remember: identify the factors. This is your guiding light.

To add like terms, we undo the distributive law: \[x^3 + 2x^3 = 1\cdot x^3 + 2\cdot x^3 = x^3(1 + 2) = 3x^3\]

In essence, add together the coefficients for like terms.

Add and subtract the following:

Expanding (Multiplying)


Expanding is just multiplying algebraic expressions. You will apply the distributive law multiple times.

In expanding problems, you convert factors into terms.

Look at the Distibutive Property: \[a\cdot(b + c) = a\cdot b + a \cdot c\]

The Property is saying for the factor $a$ outside the parenthesis, distribute it to each term within the parenthesis.

Expand the following:

This last problem was a lot of work. Fortunately, we have special formulas for dealing with $(x+1)^2$ quickly, instead of having to use distributive property twice.

Special Product Formulas


Here are three special factor structures that quickly expand.

  1. $(A + B)(A - B) = A^2 - B^2$
  2. $(A + B)^2 = A^2 + 2AB + B^2$
  3. $(A - B)^2 = A^2 - 2AB + B^2$

Make sure to identify the local terms $A$ and $B$.

Expand the following using the formulas:
This is incorrect: $(2x + 1)^2 = (2x)^2 + 1^2$
Exponents do not interact with terms.

Factoring


Consider this expanding problem: \[(x+4)(x+3) = x^2 + 7x + 12\] The expression structure on the left is all factors.

On the right, it is all terms.

If we start from the right and move leftwards instead, this process is called factoring.

Factoring converts terms into factors and is the reverse process of expanding.

Method 1: Greatest Common Factor (among terms)


GCF factoring works on two or more terms.

GCF Factoring
  1. Identify all the terms (usually global).
  2. Identify the factors the terms have in common (the GCF).
  3. Factor out the common factor and write in the factor structure of the distributive property.
Factor each expression:

Once you do enough of these problems, you'll understand it's all about the fundamentals. The distributive law is key to understanding expanding/factoring.

Method 2: Factoring the form $ax^2 + bx + c$.


This method works on three terms. Some examples include \begin{align} &x^2 + 4x + 3 \\&x^2 - 4 \\&2(x+1)^2 - 7(x+1) + 3\end{align}

Intuition

Consider this expansion problem \begin{align}\definecolor{lavender}{RGB}{179,154,240} \definecolor{lightyellow}{RGB}{236, 231, 141} \definecolor{lightblue}{RGB}{142, 181, 227} (2x + 1)(3x - 5) &= {\color{lavender} 6 }x^2 \ {\color{lightblue}-} \ {\color{lightblue}10}x \ {\color{lightblue}+} \ {\color{lightblue}3}x \ {\color{lightyellow} -} \ {\color{lightyellow} 5} \\&= {\color{lavender}6}x^2 \ {\color{lightblue}-} \ {\color{lightblue}7}x \ {\color{lightyellow}-} \ {\color{lightyellow} 5}\end{align}

Here, ${\color{lavender} a = 6}, {\color{lightblue}b = -7}, {\color{lightyellow} c = -5}$.

Arrange the factors vertically and erase the $x$: \begin{align}(2 \ \ & \ + 1) \\ (3 \ \ & \ - 5) \end{align}

Insights:

  1. First column product is
    • \[2 \cdot 3 = 6 = {\color{lavender}a}\]
    • \begin{align}(2 \ \ & \ + 1) \\ \downarrow \ & \ \ \ \ \\ (3 \ \ & \ - 5) \end{align}
  2. Second column product is
    • \[1 \cdot (-5) = -5 = {\color{lightyellow}c}\]
    • \begin{align}(2 \ \ & \ + 1) \\ \ \ & \ \ \ \ \downarrow \\ (3 \ \ & \ - 5) \end{align}
  3. Cross product and sum
    • \begin{align}2 \cdot (-5) + 3 \cdot 1 &= {\color{lightblue}-10 + 3} \\&= -7 \\&= {\color{lightblue}b}\end{align}
    • \begin{align}(2 \ \ & \ + 1) \\ \ & \hspace{-0.38em}{\LARGE\diagup} \hspace{-1.45em}{\LARGE\diagdown}\ \ \ \ \ \\ (3 \ \ & \ - 5) \end{align}

But we are trying to factor. Given $\color{lavender} a = 6$, you do not know beforehand that it must be $2\cdot 3$. It could be $1\cdot 6$!

Therefore you need to generate candidates for ${\color{lavender} a}$ and ${\color{lightyellow} c}$!

See this handout for more examples.

"new" X method

Given $ax^2 + bx + c$:

First, write the coefficient structure: \begin{align} ( \ \_ \ &\ \ \_ \ ) \\ (\ \_ \ &\ \ \_ \ ) \end{align} Then:

  1. Generate candidates for $a$ (left column product, all possibilities of two numbers that multiply to $a$).
  2. Generate candidates for $c$ (right column product, all possibilities of two numbers that multiply to $c$).
  3. Choose the right candidates by checking the cross-product and sum against $b$.

Factor: \[x^2 + 7x + 12\]

Solution:

If $a \neq 1$, you only need to check the "flipped" candidates only for left column or only for right column. If you check flipped candidates for both right/left column, you'll be checking repeated candidates. Two examples follow.

Factor: \[2x^2 - 5x + 2\]
  • We first identify ${\color{lavender} a = 2}, {\color{lightblue}b = -5}, {\color{lightyellow}c = 2}$.

    Make your coefficient structure

    \begin{align} ( \ \_ \ &\ \ \_ \ ) \\ (\ \_ \ &\ \ \_ \ ) \end{align}
    • Candidates for ${\color{lavender} a = 2}$ (left column): \begin{array}{c|c} 2 & 1 \\ 1 & 2 \end{array} Keep the flipped candidates.
    • Candidates for ${\color{lightyellow}c = 2}$ (right column): \begin{array}{c|c|c|c} {\color{grey}2} & -2 & {\color{grey}1} &{\color{grey}-2} \\ {\color{grey}1} & -1 & {\color{grey}2} & {\color{grey}-1} \end{array}
      • Because ${\color{lightblue}b = -5}$ is negative, you'll need to account for the product ${\color{lightyellow}c = 2} = (-2)(-1)$ in order for the cross-product to be negative.
      • Ignore the right column's flipped candidates (the last two greyed out candidates). Only the left column candidates or right candidates need to be flipped (in our case, left is flipped alread).
      • The first candidate is greyed out because ${\color{lightblue}b}$ must be negative. Only the second candidate could generate a negative ${\color{lightblue}b}$.
    • Now check candidates against ${\color{lightblue}b = -5}$ until cross-product is ${\color{lightblue}5}$: \begin{align}(2 \ \ & \ \ -2) \\ \ & \hspace{-0.38em}{\LARGE\diagup} \hspace{-1.45em}{\LARGE\diagdown}\ \ \ \ \ \\ (1 \ \ &\ \ -1) \end{align} $ 2 \cdot (-1) + 1 \cdot (-2) = 4$. Wrong choice, try another candidate. \begin{align}(1 \ \ & \ \ -2) \\ \ & \hspace{-0.38em}{\LARGE\diagup} \hspace{-1.45em}{\LARGE\diagdown}\ \ \ \ \ \\ (2 \ \ &\ \ -1) \end{align} $1 \cdot (-1) + 2\cdot (-2) = {\color{lightblue}-5}$. Matches with ${\color{lightblue} b}$!
      Put $x$'s back into first column and signs in second column \begin{align}(1x \ \ & \ - \ 2) \\ \ & \ \ \ \ \ \\ (2x \ \ &\ - \ 1) \end{align} and write in one line: $\boxed{(x-2)(2x-1)}$
Factor: \[6x^2 + 7x - 5\]
  • We first identify ${\color{lavender} a = 6}, {\color{lightblue}b = 7}, {\color{lightyellow}c = -5}$.

    Make your coefficient structure

    \begin{align} ( \ \_ \ &\ \ \_ \ ) \\ (\ \_ \ &\ \ \_ \ ) \end{align}
    • Candidates for ${\color{lavender} a = 6}$ (left column): \begin{array}{c|c|c|c} 6 & 3 & 2 & 1 \\ 1 & 2 & 3 & 6 \end{array} Keep the flipped candidates.
    • Candidates for ${\color{lightyellow}c = -5}$ (right column): \begin{array}{c|c|c|c} -5 & -1 & {\color{grey} 5} & {\color{grey} 1} \\ 1 & 5 & {\color{grey} -1} & {\color{grey} -5} \end{array}

      Here, the last two candidates are greyed out because we don't have to check them. They are flipped from the first two.
      Advice: If ${\color{lightyellow}c}$ is negative (in our case), then you should look at ${\color{lightblue}b}$ before checking candidates. Here, ${\color{lightblue}b = 7}$. So we should not pick the candidate \begin{align}-5 \\ 1\end{align} first when checking because $-5$ is far from our required result of ${\color{lightblue}b = 7}$. That leaves one good candidate for the right column.

    • Now check candidates against ${\color{lightblue}b = 7}$ until cross-product is ${\color{lightblue}7}$: \begin{align}(6 \ \ & \ \ -1) \\ \ & \hspace{-0.38em}{\LARGE\diagup} \hspace{-1.45em}{\LARGE\diagdown}\ \ \ \ \ \\ (1 \ \ &\ \hphantom{+} \ 5) \end{align} $ 6 \cdot 5 + 1 \cdot (-1) = 29$. Wrong choice, try another candidate. \begin{align}(3 \ \ & \ \ -1) \\ \ & \hspace{-0.38em}{\LARGE\diagup} \hspace{-1.45em}{\LARGE\diagdown}\ \ \ \ \ \\ (2 \ \ &\ \hphantom{+} \ 5) \end{align} $3 \cdot 5 + 2\cdot (-1) = 13$. Getting close to 7. Try again: \begin{align}(2 \ \ & \ \ -1) \\ \ & \hspace{-0.38em}{\LARGE\diagup} \hspace{-1.45em}{\LARGE\diagdown}\ \ \ \ \ \\ (3 \ \ &\ \hphantom{+} \ 5) \end{align} $2 \cdot 5 + 3\cdot (-1) = {\color{lightblue} 7}$. Matches with ${\color{lightblue} b}$!
      Put $x$'s back into first column and signs in second column \begin{align}(2x \ \ & \ - \ 1) \\ \ & \ \ \ \ \ \\ (3x \ \ &\ + \ 5) \end{align} and write in one line: $\boxed{(2x-1)(3x+5)}$

I highly recommend this method. It handles all cases of $ax^2 + bx + c$, even when $b$ or $c$ is negative. It is also quick to check cross-products, so you can find the factors quickly.

Method 3: Special Factoring Formulas


The three special product formulas reversed give the special factoring formulas.

  1. $A^2 - B^2 = (A-B)(A+B)$
  2. $A^2 + 2AB + B^2 = (A+B)^2$
  3. $A^2 - 2AB + B^2 = (A-B)^2$
Factor:

Method 4: Grouping


This method works on four terms. First order terms in descending powers.

We group first two/last two terms together, then use GCF on both groups.

Factor:

The last example shows even though we did have all factors, we sometimes can keep factoring a factor. We may need to use multiple methods.

Multiple Methods


Remember, before even starting a factoring problem, identify the terms and how many there are.

Doing so helps you to choose a correct strategy. Here's what I use (in order from left to right):

Number of Terms Factoring Methods to Try (in order)
2 terms GCF, $A^2 - B^2$
3 terms GCF, $\text{"new" X method}, A^2 + 2AB + B^2, A^2 - 2AB + B^2$
4 terms GCF, grouping
$\geq$ 5 terms GCF

GCF factoring is the most ubiquitous factoring method; always try it first!

Factor: