Math FoundationsEquationsQuadratic Equations

Factoring quadratics

Rewriting quadratic trinomials and quadratic equations as a product of factors instead of a sum of terms. Lets you solve equations quickly, simplify messy expressions, and spot the roots immediately.
Key elements:
Connections:
Completing the square is required to factor a quadratic trinomial in the general case, so you absolutely need to know how to use this method.
Factoring a quadratic trinomial uses the discriminant and the general root formula for quadratic equations. You need all of that, no excuses.
Statistics:
Statement1
Important1
Problem9

The plus way and the multiplication way

Any number can be written in infinitely many different ways. All those ways split into two categories: writing it as a sum of terms (addition) and writing it as a product of factors (multiplication).
So which side are you on?
It may seem like there is no real difference between these notations. Just write everything with plus signs and don't give a damn. But factor form is useful too. Why? Because in complicated expressions, factor form lets you cancel stuff, while a sum of terms does not. See for yourself with the number 42:
3+13+261173= ?!\frac{\yellow{3 + 13 + 26}}{11 \cdot 7 \cdot 3} = \ \red{\text{?!}}
2371173=211 \frac{\blue{2 \cdot \cancel{3} \cdot \cancel{7}}}{11 \cdot \cancel{7} \cdot \cancel{3}} = \green{\frac{2}{11}}
Just like ordinary numbers can be written through addition or multiplication, quadratic trinomials can also be written in two ways. So far we've only been using the sum form, for example:
x2+8x+15x^2 + 8x + 15
So how the hell do you rewrite that as multiplication? Looks impossible. But if you mess around with the middle term a bit and factor out a common factor twice in a row, you can pull off some dark magic:
x2+8x+15==x2+3x+5x8x+15==x(x+3)+5(x+3)==(x+3)(x+5)x^2 + 8x + 15 = \\ = x^2 + \underbrace{3x + 5x}_{\small 8x} + 15 = \\ = x(x + 3) + 5(x + 3) = \\ = (x + 3)(x + 5)
We started with a sum of three terms (x2x^2, 8x, and 15), and ended up with a product of two factors (x + 3 and x + 5). That process is called factoring a quadratic trinomial:
Imagine we had some ugly complicated expression. In the sum form we'd be stuck, but in factor form we can simplify it!
x2+8x+152(x+3)= ?!\frac{\yellow{x^2 + 8x + 15}}{2(x + 3)} = \ \red{\text{?!}}
(x+3)(x+5)2(x+3)=x+52 \frac{\blue{\cancel{(x + 3)} \cdot (x + 5)}}{2\cancel{(x + 3)}} = \green{\frac{x + 5}{2}}
Just don't start thinking that now everything should always be written as multiplication. That's bullshit. There are countless situations where the sum form simplifies an expression and factor form just shits the bed:
15+x2+8x+15x2=8x-\cancel{15} + \yellow{\cancel{x^2} + 8x + \cancel{15}} - \cancel{x^2} = \green{8x}
15+(x+3)(x+5)x2=?! -15 + \blue{(x + 3) \cdot (x + 5)} - x^2 = \red{\text{?!}}

Both plus and multiplication matter!

Both ways of writing expressions, whether as a sum or as a product of factors, turn out to be damn useful in different situations. If you want actual mathematical harmony, you need to handle both of them freely.

Why do this at all?

That's a damn good question. Was moral and spiritual decay not enough already? Now we're going to corrupt young and innocent quadratic trinomials too?! Still, there are good reasons to do this, and there are plenty of them:
  • 1
    You can simplify expressions
    Writing a quadratic trinomial as a product of factors often lets you simplify complicated expressions:
    5(x22x24)(x+4)(x6)10=5(x+4)(x6)10(x+4)(x6)=510=12=0.5\frac{5 \cdot (x^2 - 2x - 24)}{(x+4) \cdot (x-6) \cdot 10} = \frac{5 \cdot \cancel{(x+4)} \cdot \cancel{(x-6)}}{10 \cdot \cancel{(x+4)} \cdot \cancel{(x-6)}} = \frac{5}{10} = \frac{1}{2} = 0.5
  • 2
    Getting back to the sum is easy
    Once a quadratic trinomial is factored, getting the sum form back is just a matter of expanding the brackets:
    2(x1)(4+x)=2(4x+x24x)=2(x2+3x4)=2x2+6x82(x-1)(4+x) = 2(4x + x^2 - 4 -x) = 2(x^2 + 3x - 4) = \boxed{2x^2 + 6x - 8}
    But going the other way, from the sum form to factors, is much harder!
    2x2+6x8= ? =2(x1)(4+x)2x^2 + 6x - 8 = \ldots \text{ ? } \ldots = \boxed{2(x-1)(4+x)}
  • 3
    The roots become visible immediately
    Writing a quadratic trinomial as a product of factors lets you immediately see the roots of its “equation.” In that form it falls under Zero factors — you just set each factor equal to zero separately and get a true equality 0 = 0:
    In factor form, the roots are the numbers next to x, but with the opposite sign!
  • 4
    It's a way to solve quadratic equations
    Factoring is one more way to solve quadratic equations, alongside the methods you already know: completing the square and the general root formula. We rewrite the quadratic trinomial as multiplication and immediately see the roots if that expression were a quadratic equation. A big plus is that for simple quadratics, this lets you find the roots fast, sometimes right in your head!
  • Because of all those advantages, quadratic trinomials are usually written in factored form, and only in rarer cases, when there's a real need, do we quickly expand the brackets and switch back to the sum form.

    Don't confuse a trinomial with an equation!

    One more time, just in case: do not confuse a quadratic trinomial with a quadratic equation. A quadratic trinomial is just an expression. It does not have to be tied to any equality or equation at all. When we factor it, we're simply rewriting it in another form.
    x2+8x+15=(x+3)(x+5)x^2 + 8x + 15 = (x + 3)(x + 5)
    A quadratic equation, on the other hand, is not just an expression but an equality, and it must contain an equal sign “=”. On one side of that sign there must definitely be some quadratic trinomial, and on the other side there must definitely be zero. Of course, the quadratic trinomial “inside” a quadratic equation can also be factored:
    x2+8x+15=0(x+3)(x+5)=0x^2 + 8x + 15 = 0 \\ (x+3)(x+5) = 0
    As you can see, a nice “side effect” of that factoring is that we instantly start seeing the roots of this quadratic equation: –3 and –5.

    Factoring by hand

    Writing the number 42 as 2372 \cdot 3 \cdot 7, and writing the quadratic trinomial x2+8x+15x^2 + 8x + 15 as (x+3)(x+5)(x + 3)\cdot(x + 5), are both called factoring. Factoring a number is usually easy, but factoring a trinomial turns into a little puzzle. Now we're going to learn how to crack that puzzle.
    The main trick is always the same: split coefficients B and C into two numbers, let's call them t and k. But you can't split them however you feel like it. There are infinitely many ways to do that. You need a split where the sum t + k gives coefficient B, while the product tkt \cdot k gives coefficient C!
    Why does B come from addition while C comes from multiplication? Why not both from addition, or both from multiplication? Because now we can pull off a brutal combo of repeated factoring out of a common factor, and that's exactly what creates multiplication inside the expression.
    First we factor out x from the first and second terms. Then we factor out k from the second and third terms. Finally, we factor out the new common factor (x + t). And that's it, the quadratic trinomial is factored!
    You probably want to see a visualization of the process. Yep, there is one, and it shows perfectly why the numbers t and k need to work both in addition and in multiplication. We have a little square with area x2x^2, a rectangle with area Bx, and some weird shapeless blob with area C. We split the rectangle Bx into two smaller rectangles so the leftover space can be filled by a rectangle with area tk=Ct \cdot k = C. Long story short, when completing the square we built a square out of pieces, and now we're building a rectangle out of them.
    Now that you've got the core idea, you absolutely need to drill it on a bunch of examples. Try to solve every one of them yourself.

    Examples of hand factoring

    👀
    Example
    Factor the quadratic trinomial and find the roots of the corresponding quadratic equation:
    x2+5x+6x^2 + 5x + 6

    Factoring in the general case

    Tricks and visualizations are cool, sure, but they only work for special cases. Just like with the general root formula for quadratic equations, we need to factor not specific quadratic trinomials, but their standard form right away:
    Ax2+Bx+C,A0Ax^2 + Bx + C, \quad A \neq 0
    Here's the plan. We'll complete the square inside the quadratic trinomial, then use the identity “difference of squares” to get the final factors. In a simplified toy version, it looks something like this:
    x2+2x+1perfect square9=(x+1)232difference of squares==(x+13)(x+1+3)==(x2)(x+4)\underbrace{x^2 + 2x + 1}_{\text{perfect square}} - 9 = \underbrace{(x + 1)^2 - 3^2}_{\text{difference of squares}} = \\ = (x + 1 - 3)(x + 1 + 3) = \\ = (x - 2)(x + 4)
    Let's do it. First we need to get rid of coefficient A in front of x2x^2. Why? Because we don't know its sign. God forbid it turns out to be negative, because then we won't be able to take the square root of Ax2Ax^2! So we factor it out of all three terms:
    A(x2+BAx+CA)A\left( x^2 + \frac{B}{A}x + \frac{C}{A} \right)
    We leave the constant term C/A alone for now. We'll need it for the difference of squares. The remaining two terms will be packed into the square of a sum, a2+2ab+b2=(a+b)2a^2 + 2ab + b^2 = (a+b)^2. But we're missing what we need to complete the square. There's no factor of two, and there's no third term playing the role of b2b^2. So we have to add those missing pieces and then subtract them back out to keep the value of the expression unchanged:
    A(x2+2xBA12+CA)A(x2+2xB2A+CA)A\left( x^2 + \yellow{2} \cdot x\frac{B}{A} \cdot \yellow{\frac{1}{2}} + \frac{C}{A} \right) \\ A\left( x^2 + 2 \cdot x \cdot \frac{B}{2A} + \frac{C}{A} \right)
    The fraction B2A\frac{B}{2A} naturally becomes b, because a is already being played by x. To complete the square, the only thing left is to add and compensate b2b^2:
    A(x2+2xB2A+(B2A)2a2+2ab+b2=(a+b)2(B2A)2+CA)A([x+B2A]2[B2A]2+CA)A([x+B2A]2[B24A2CA])A([x+B2A]2B24AC4A2)A\left( \underbrace{x^2 + 2 \cdot x \cdot \frac{B}{2A} + \yellow{\left( \frac{B}{2A} \right)^2}}_{\small a^2 + 2ab + b^2 = (a+b)^2} - \yellow{\left( \frac{B}{2A} \right)^2} + \frac{C}{A} \right) \\ A\left( \left[ x + \frac{B}{2A} \right]^2 - \left[ \frac{B}{2A} \right]^2 + \frac{C}{A} \right) \\ A\left( \left[ x + \frac{B}{2A} \right]^2 - \left[ \frac{B^2}{4A^2} - \frac{C}{A} \right] \right) \\ A\left( \left[ x + \frac{B}{2A} \right]^2 - \frac{B^2 - 4AC}{4A^2} \right) \\
    There it is, our old friend, the discriminant. We substitute it in to simplify this already ugly expression:
    A([x+B2A]2D4A2)A\left( \left[ x + \frac{B}{2A} \right]^2 - \frac{D}{4A^2} \right)
    We successfully completed the square. Now notice that inside the brackets we get a difference of squares. Technically, it only becomes one if the discriminant D0D \geq 0, because only then can we take its square root. So let's assume that condition and finally finish the factoring:
    A([x+B2A]2[D2A]2)==A([x+B2AD2A][x+B2A+D2A])==A(x+BD2A)(x+B+D2A)A\left( \left[ x + \frac{B}{2A} \right]^2 - \left[ \frac{\sqrt{D}}{2A} \right]^2 \right) = \\ = A\left( \left[ x + \frac{B}{2A} - \frac{\sqrt{D}}{2A} \right] \cdot \left[ x + \frac{B}{2A} + \frac{\sqrt{D}}{2A} \right] \right) = \\ = A\left( x + \frac{B - \sqrt{D}}{2A} \right) \left( x + \frac{B + \sqrt{D}}{2A} \right)
    Notice that next to x in both brackets, we almost got the formulas for the two possible roots of the quadratic equation. To make them match exactly, we just need to pull a minus sign out of the numerators:
    A(xB+D2Ax1)(xBD2Ax2)A(xx1)(xx2)A\left( x - \underbrace{\frac{-B + \sqrt{D}}{2A}}_{\small x_1} \right) \left( x - \underbrace{\frac{-B - \sqrt{D}}{2A}}_{\small x_2} \right) \\ \boxed{A (x - x_1)(x - x_2)}
    That's it. This nightmare is over. As you can see, factoring a quadratic trinomial in standard form almost repeats the derivation of the general root formula for a quadratic equation. The only difference is that we don't have an equation here, no “left” or “right” side, so instead of taking a square root “from both sides of the equation,” we used the difference-of-squares identity.

    Factoring a quadratic trinomial

    If a quadratic trinomial has roots (let's call them x1x_1 and x2x_2), then that trinomial can always be factored:
    These are two different notations, one through addition and one through multiplication, but they mean the same thing, just like 10 + 6 and 282\cdot8 denote the same number. You can switch a quadratic trinomial into factor form and back again in absolutely any situation!
    No more tricks are needed. To factor a quadratic trinomial, you just solve the corresponding quadratic equation in whatever way is most convenient for you. If that equation has no roots, then the quadratic trinomial cannot be factored. Let's practice the procedure on some examples:

    Examples of factoring through roots

    👀
    Example
    Factor the quadratic trinomial by solving the corresponding quadratic equation:
    4x2+15x44x^2 + 15x - 4

    “Rectangular” quadratic trinomials

    Factoring a quadratic trinomial can be pictured as assembling one full rectangle from several smaller pieces; we already saw that. But that visualization can also be extended to negative numbers t and k, which are the numbers we split coefficients B and C into. To do that, we place both numbers on a coordinate plane where t is the horizontal axis and k is the vertical axis, or vice versa.
    Every point on that coordinate plane represents some quadratic trinomial. So we can even name the plane accordingly, for example, the plane of “rectangular” trinomials. Not bad, huh? 😎
    We ignore coefficient A because you can always factor it out and get a trinomial without coefficient A. Those even have their own name: monic quadratic trinomials.
    Ax2+Bx+C=A(x2+BAx+CA)Ax^2 + Bx + C = A\left( x^2 + \frac{B}{A}x + \frac{C}{A} \right)
    So all quadratic trinomials split into two categories:
  • 1
    “Rectangular” quadratic trinomials
    These quadratic trinomials have either two roots or one root. They can be factored and represented as a rectangle or a line.
  • 2
    “Wrong” quadratic trinomials
    These quadratic trinomials have no roots, cannot be factored, and do not form a rectangle or a line.
  • Factoring quadratics