RSS Amplifier

Threeven Numbers · Sep 19, 2024

How to factor a quadratic

0
Sign in to vote or save

Dane · Threeven Numbers

Many of those reading will already be familiar with factoring a quadratic polynomial. You have something that looks like x²+bx+c, you find two numbers h,k such that h+k=b and h×k = c, then you can rewrite

\(x²+bx+c = (x+h)(x+k)\)

It’s not hard to see why this works. Simply expand the product on the right.

\((x+h)(x+h) = x^2 + (\underbrace{h+k}_{b})x + \underbrace{hk}_c\)

Easy peasy extraction of lemon juice.

A proper subset of those who know how to factor a monic quadratic (one where the coefficient on x is 1) also know the so-called AC method for factoring a general quadratic; one of the form ax²+bx+c. There, we want to find h,k where h+k=b and h×k = a×c. The next steps are hard to write down in general form, so I’ll pick an example: 6x²+11x+4.

We first want numbers that add to 11 and multiply to 24. 3 and 8 fit the bill, so we us that to split the linear term: 6x²+3x + 8x+4. I’ve suggestively grouped the four terms into two groups of two, which we will treat separately.

First, we have 6x²+3x. We want to factor out as much as we can from those two terms. Both coefficients are multiples of 3, and both have a factor of x, so we pull out 3x and get 3x(2x+1). Then, both coefficients in 8x+4 are multiples of 4, so we factor it into 4(2x+1), and we’ve rewritten 6x²+11x+4 = 3x(2x+1) + 4(2x+1). Attentive readers might note that both of these terms now have a factor of 2x+1, so we can then factor that out and get (3x+4)(2x+1).

To me, this feels a bit like black magic. You pick your h,k carefully, then split up the term, factor the two halves, and then by forces yet unknown to science, both terms share a common factor again, and we can factor the quadratic entirely. Let’s see if we can unpack those forces a bit.

For the fans of quick and unenlightening answers, I’ll spoil it a little bit. Take ax²+bx+c, and suppose we have integers h,k such that h+k=b and h×k=a×c. Then our factorization takes the form.

Where GCD denotes the greatest common divisor. By construction, everything is an integer, and you can expand everything out to show that it’s equal to the desired result. I for one don’t find this satisfying though. Sure, it proves that it works, but it doesn’t give much insight as to why picking those specific h and k make it work, nor does it help you understand how someone might have come up with this method on their own. To those readers similarly dissatisfied, strap in because this is going to get a little bit crunchy.

We start with a generic quadratic integer polynomial: ax²+bx+c. Our first step is going to be to assume that a,b,c have no common factors. If they did, then we could simply factor it out:

\(d \left( \frac ad x^2 + \frac bd x + \frac cd \right)\)

Now we’re going to assume that we have some integers h and k such that h×k = a×c. And to be sure, this isn’t always possible. Not all quadratics are factorizable, but our claim is that if we can find such integers h and k, then we can factor it.

Now because we’ve assumed that a,b,c have no common factors, we can say something a bit more: a,c,h,k also have no common factors. If they did, then since b=h+k, b would also share that factor, and we’ve already assumed that a,b,c have no common factors.

We can actually say a bit more: GCD(k,c) also shares no factors with a. To see this, let’s write condense our notation. We define

\(d_{ah} = \mathrm{GCD}(a,h) \quad \quad d_{ck} = \mathrm{GCD}(c,k)\)

And then write

\(a = d_{ah} a’, \quad h = d_{ah} h', \quad c = d_{ck}c’, \quad k = d_{ck}k’\)

And then we do our factorization

\(\begin{align*} ax^2+bx+c &= ax^2 + hx + kx + c \\ &= d_{ah}a'x^2 + d_{ah}h'x + d_{ck}k'x + d_{ck}c' \\ &= d_{ah}x(a'x + h') + d_{ck}(k'x + c') \end{align*}\)

If we want this to factor well, we want a’=k’ and h’=c’, so that those two linear terms are the same.1 My colleague Julian found a very nice proof of this fact, which I include here:

\(\begin{align*} h' = c' &\iff h \cdot d_{ck} = c' \cdot d_{ck} \\ &\iff \mathrm{GCD}(hc, hk) = \mathrm{GCD}(hc, ac) \\ \end{align*}\)

Basically, multiplying by d꜀ₖ doesn’t change the equality, c’×d꜀ₖ=c, and the fact that GCD(xz,yz) = GCD(x,y)×z. The same shape of argument works to show that a’ = k’, so we’re guaranteed that the factorization works!

\(\begin{align*} ax^2+bx+c &= ax^2 + hx + kx + c \\ &= d_{ah}a'x^2 + d_{ah}h'x + d_{ck}k'x + d_{ck}c' \\ &= d_{ah}x(a'x + h') + d_{ck}(k'x + c') \\ &= d_{ah}x(a'x + h') + d_{ck}(a'x + h') \tag{By Julian} \\ &= (d_{ah}x + d_{ck})(a'x + h') \end{align*}\)

You might notice that, modulo notation, this is the same factorization that I provided up above, with the quick and unsatisfying solution. And depending on how well you could follow the arguments that it works, you might not find it especially satisfying either.

But it’s neat, and that’s really what matters. For the first time in my life, I can provide a proof that this method of factoring quadratics works that doesn’t involve pulling an expression out of a hat. We’ve found a way to verify that h and k will let you factor the polynomial without already knowing what the factored form is.

What’s even cooler though is that this generalizes. You might notice that our solution doesn’t actually assume that a,b,c,h,k are integers. All we really need is that they have greatest common divisors. Readers versed in algebra will notice then that we can conduct this factorization over R[x] for R being any GCD domain - any commutative ring over which greatest common divisors can be defined. That means that our coefficients can actually be polynomials in another variable. You could use this method to factor this polynomial in x and y into two terms that are each linear in x.

\(3 x^2 y^2 + 2 x^2 y - 8 x^2 + 3 x y^2 - 21 x y + 26 x + y - 6\)

But that’s left as an exercise to the reader.

1

Technically we want that a’ = k’ or that a’ = -k’, likewise h’ = c’ or -c’. More generally, we want to say that a’ and k’ are associates, in the more general context of commutative algebra. The proof given doesn’t technically work as stated, but if you repace equality by association then it follows fine, and that’s the contect in which Julian presented it to me.

Indeed in general, we might need to make things negative sporadically, but I chose not to worry about that in the exposition.

No posts

Read the original on threevennumbers.substack.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.