Saturday, December 22, 2012

Polynomial Multiplication: Don't Spoil with FOIL

I have been trying lately to keep my posts with less algebraic thinking than they have been, and more simple ideas and patterns. There is still algebra mentioned, but I don't want it to be the bulk of my blog. It really isn't what all of mathematics is based on, which is something I discussed at the TEDx Conference in India a few weeks ago. However, this algebraic concept is a really awesome one. This is actually something that I learned in school, which isn't common on my blog.

One of the key concepts in algebra, especially in quadratic and polynomial units, is how to multiply together two polynomials. For instance:

(x^2 - 4x + 3)(2x^2 - 5)

The main method you learn is FOIL, which is meant for a binomial times a binomial. It is an acronym for First, Outer, Inner, Last; meaning that you multiply the first term in each parentheses together, add that to the product of the outer terms, add that to the product of the inner terms, and then add that to the product of the last two terms in each parentheses.

Here, we follow the same idea, except we just multiply every term by every other term in the other set of parentheses. The product would look like:

(x^2 - 4x + 3)(2x^2 - 5)
2x^4 - 5x^2 - 8x^3 + 20x + 6x^2 - 15
2x^4 - 8x^3 + x^2 + 20x - 15


This might seem a little unnatural to you, since multiplication was always taught with the traditional process of setting up the two numbers vertically and multiplying all of the digits. Though I criticized that method and suggested the Criss-Cross Method a few posts ago, we will follow the rules of the traditional one.

Let's set up these two numbers vertically. I will pretend there is a 0x in the 2x^2 - 5 to make it line up.

        x^2 - 4x + 3
x    2x^2 + 0x - 5

First, we would do the -5 times everything above it, from right to left. Just bear with me and pretend this is a traditional multiplication problem. The only difference is that you don't need to carry, ever.

        x^2 - 4x + 3
x    2x^2 + 0x - 5
 -5x^2 + 20x - 15

Now, we could do it with the 0x, but everything would be zero. So, we will go to the 2x^2 and start. But remember with traditional multiplication that we need zeros to be a place holder. So here, we will have some terms with a zero coefficient to be place holders.

How many of them? Well, it is x to the second, so we need two of them. They will be 0x and 0.

        x^2 - 4x + 3
x    2x^2 + 0x - 5
 -5x^2 + 20x - 15
                 0x + 0

Let's multiply the rest.

                              x^2 - 4x + 3
x                          2x^2 + 0x - 5
                       -5x^2 + 20x - 15
2x^4 - 8x^3 + 6x^2  + 0x  +   0
2x^4 - 8x^3 +   x^2 + 20x - 15

And you got the same answer as before! Pretty cool, right!

Let's try it with this one:

(x^3 + 5x^2 - 8x + 10)(-x^3 + 2x^2 + 12x - 7)

           x^3 + 5x^2  -   8x + 10
x        -x^3 + 2x^2 + 12x  -   7

Okay, this looks really tough. I want you to try it on your own with a piece of scrap paper, and I will write the work down below for you to compare.

                                           x^3 + 5x^2  -   8x + 10
x                                       -x^3 + 2x^2 + 12x  -   7
                                     -7x^3  - 35x^2 +   56x - 70
                      12x^4 + 60x^3  - 96x^2 + 120x +  0
          2x^5 + 10x^4 -  16x^3 + 20x^2 +     0x +  0
-x^6 - 5x^5 +   8x^4 - 10x^3 +    0x^2 +     0x +  0
-x^6 - 3x^5 + 30x^4 + 27x^3 - 111x^2 + 176x - 70

If I did my math right, that should be the answer. If I did it wrong, let me know so I can fix it.

If you did it on your own, you probably noticed that it was a lot of work. Can that workload get cut down? This was a question that was not brought up in school.

The answer to that is yes, with a little help from our old friend the Criss-Cross Method. Do you remember how it works? Let's go through it.

                                           x^3 + 5x^2  -   8x + 10
x                                       -x^3 + 2x^2 + 12x  -   7

First, we multiply those last two terms on the end. 10 • -7 = -70.

                                           x^3 + 5x^2  -   8x + 10
x                                       -x^3 + 2x^2 + 12x  -   7
                                                                         - 70

Now, we do our first little cross. We do (-8x) • (-7) = 56x, and 12x • 10 = 120x. Now, we add those together to get 176x.

                                           x^3 + 5x^2  -   8x + 10
x                                       -x^3 + 2x^2 + 12x  -   7
                                                                176x - 70

Now, we do our first three-way cross. 5x^2 • (-7) = -35x^2, (-8x) • 12x = -96x, and 2x^2 • 10 = 20x^2. If you kept a running total, you probably computed in your head the answer to be -111x^2. Notice that all of the variables have the same exponent on them each time. I find that aspect to be the cool part.

                                           x^3 + 5x^2  -   8x + 10
x                                       -x^3 + 2x^2 + 12x  -   7
                                                111x^2 + 176x - 70

Next, we do the four-way cross. Here is where it gets the hardest. x^3 • (-7) = -7x^3, 5x^2 • 12x = 60x^3, (-8x) • 2x^2 = -16x, and 10 • (-x^3) = -10x^3. If you kept a running total, the math there shouldn't have been too challenging. You should have gotten 27x^3.


                                           x^3 + 5x^2  -   8x + 10
x                                       -x^3 + 2x^2 + 12x  -   7
                                  27x^3 + 111x^2 + 176x - 70

Now, we do the second three-way cross. x^3 • 12x = 12x^4, 5x^2 • 2x^2 = 10x^4, and (-8x) • (-x^3) = 8x^4. Add those up and you get 30x^4.


                                           x^3 + 5x^2  -   8x + 10
x                                       -x^3 + 2x^2 + 12x  -   7
                   30x^4 + 27x^3 + 111x^2 + 176x - 70

Now, we do our last cross, with just two computations luckily. x^3 • 2x^2 = 2x^5 and 5x^2 • (-x^3) = -5x^5. Add those and you get -3x^5.

                                           x^3 + 5x^2  -   8x + 10
x                                       -x^3 + 2x^2 + 12x  -   7
      -3x^5 + 30x^4 + 27x^3 + 111x^2 + 176x - 70

Finally, we do our last computation on the far left. x^3 • (-x^3) = -x^6.

                                              x^3 + 5x^2  -   8x + 10
x                                           -x^3 + 2x^2 + 12x  -   7
-x^6 - 3x^5 + 30x^4 + 27x^3 + 111x^2 + 176x - 70

And if you'll notice, this answer is the exact same one as before. I found the fact that you can multiply vertically fascinating, but the fact that you can apply the Criss-Cross Method as well even cooler.

No comments:

Post a Comment