If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:14:47

Sum of polynomial roots (proof)

Video transcript

what I want to do in this video is figure out if there's any fast way to figure out the sum of the roots of any polynomial then actually we there actually is and so that's why I'm doing this video so let's start with the second degree polynomial so let's say it's x squared plus a 1 X plus a 2 is equal to zero so this is just a standard set quadratic equation right here second degree equation and you might be saying hey when you put the coefficient on the x-term being equal to one and in general you can always convert you can always convert any any polynomial I'll do it with a second degree but if you have ax squared plus BX plus C is equal to zero you can just divide both sides of this equation by a by a and you're going to have something that's in this form where the coefficient on the x squared term is going to be equal to 1 you can do that with any polynomial you can do that with any polynomial that's set equal to 0 so with that out of the way let's think about the sum of the roots of this are going to be so this is the second degree this is a second degree polynomial it's a quadratic equation so it'll have two roots that could be real or complex so let's call the roots r1 and r2 and that tells us that these are roots that X minus r1 times X minus r2 is going to be equal to 0 and if we multiply this out we get x times X is x squared x times negative R 2 is negative R 2x [ __ ] and then we have negative r1 times x so negative r1 X and then we have negative r1 times negative R 2 which is plus r1 r2 is equal to 0 and we can simplify this middle term a little bit it becomes x squared minus r1 plus r2 r1 plus r2 x plus r1 r2 is equal to 0 so let's think about what the sum of the roots are so based on what we're looking at right over here what is r1 plus r2 well we see it right over here when we when we multiply it out these two expressions r1 plus r2 is the neg this second coefficient right over here or it's the negative of the coefficient the on the first degree term so if we look at the first degree term over here a 1 a 1 must be the same thing as negative r1 as negative r1 plus r2 or another way to think about it is r1 plus r2 must be equal to negative a1 so that wasn't too bad for the second degree case let's try the third degree case let's try let's see if we have X to the 3rd plus a1 x squared plus a2 x plus a3 is equal to 0 let's think about let's think about what the sum of its roots might be well this guy is now going to have one more root I'm not saying it's the exact same equation but let's say we're keeping everything general so now we could say we have roots r1 r2 and r3 or we could say that X minus r1 times X minus r2 times X minus r3 is equal to 0 now we could multiply all of this out but we already figured out we already figured out what X minus r1 times X minus r2 is it's this business it's this business over here so we just have to multiply this times X minus r3 and actually I'm not even going to do the full expansion because we have a hunch here that's something it always deals it seems with with the with the coefficient on the term that's one degree lower than the degree of the polynomial this was the second degree we looked at the coefficient on the first degree term maybe to find the sum we only have to look at this coefficient over here so I'm only going to figure out this product up to this point and then we can just we can just ignore the rest of it and see if we get something that is useful so let's do the expansion let's multiply this right over here times this over here and what do we get so we could get the X to get the X to the third term the only way to get that is to multiply this X is to multiply this x times this x squared so we're going to get X to the third and then when you multiply and then and that's the only way to get the X to the third term that's the only we get the third degree term now how do we get this term over here how do we get let me do this in a new color how do we get the x squared term over here well we could multiply this x times this over here times this term right over here because the x times the X is going to give us x squared so it'll be negative r1 plus r2 x squared times that term and then if you multiply this x times that you'll get r1 r2 X and all of that but I'll just write Bob you know so on and so forth and then what other ways can we get an x squared term here there's no other way to get an X to the third term but what other ways can we get an x squared term well when we do the when we multiply this times this you have the negative r3 let me do this in another color we have you have the negative r3 times this you're obviously going to take this term and multiply it by everything and then add it to this term multiplied by everything but we only care about the things you know I did this just to show you that it's there but I only care because we have a hunch that what matters is the coefficient on the x squared term so we just want to see how do you build the x squared term in our in our I guess our expanded polynomial so if you have the only the other way to get an x squared is to multiply the negative r3 times this x squared over here so this is going to be negative r3 times x squared and then when you multiply this times this you're going to get something else then when you multiply this times this you're going to get the negative product of all the roots so that's just something else and so when we add everything together when we add everything together you get X to the third and then what's the sum of these two things it's negative r1 plus r2 plus r3 x squared and then you're just going to have a bunch of other stuff that we didn't take the time to add but it looks like our hunch paid off because what is now the sum of the roots r1 plus r2 plus r3 what is that equal to well that's sitting right over here that's equal to the negative of this coefficient right over here that's once again equal to negative a1 it's equal to the negative the negative of the coefficient on the degree term that's one less than one less than the degree of our polynomial so we already see a pattern let's if we can prove it generally let's prove it see if we can prove it generally so we've already proven essentially to base cases we've proven it for a degree of to a degree of three let's assume that it's true for a degree of N and then we can prove it for a degree of n plus one and essentially this will be a proof by induction for polynomials of any degree so let's just assume so let's just say we have an nth degree polynomial so let's just assume this so we're going to assume this step and this is gives us a little proof by mathematical induction practice so let's just assume that we have a polynomial X to the N its nth degree so X to the n plus a 1 X to the n minus 1 and it just goes on and on and on all the way down to the zeroth degree term it has roots it has roots obviously r1 r2 all the way to R sub N and we're going to assume we're going to assume that r1 plus r2 plus all the way to R sub n is equal to negative a1 is equal to negative a1 or another way to think about it if we were to multiply if we were to multiply X minus r1 times X minus r2 and just keep multiplying all the way to X minus R sub n is equal to 0 this should give us X to the N minus r1 plus r2 plus all the way to RN all the way to RN X to the N minus 1 and then plus a bunch of other stuff that we're not going to calculate so this this tells us this that this this coefficient right over here is going to be equal to this right over here so that is what we are going to assume so now let's think about so now let's so now let's and this we're not assuming this part so now let's think about given that let's think about let's think about the situation where we have a polynomial X to the n plus 1 plus a 1 X to the n plus and it just keeps going you get all of the degree terms there so now this is going to have the roots r1 r2 all the way to R and then it'll have our n plus 1 so it'll have all the it'll have these end routes and then they'll have an RN plus one so essentially that tells us that we're going to have essentially if this product times R minus R times X minus RN plus 1 is equal to 0 let me write it out I don't wanna skip step so this tells us if these are all the routes that X minus r1 times X minus r2 above all the way to X minus RN times X minus RN plus 1 is going to be equal to 0 it has one more route than the previous example then the one where we made the assumption so if we were to expand this thing out how can we do that well this thing if we were to multiply it out if we were to multiply it out it's just this thing over here times this new binomial because this thing over here is let me set up let me use color coded this thing let me do a different color this thing over here we already established we assumed is this thing over here which is this thing over here so if we want this entire expansion we just have to multiply this times this so how can we get an X to the n plus 1 term how can we get to the X X to the n plus 1 term well there's only way there's only one way to get the X to the n plus 1 term and that's what I'm multiplying this X times this X to the N so that'll will give us X to the N X to the n plus 1 that's the only way to do it that's the only way to get this highest degree term now how can we get how can we get let me do it in purple how can we get it the X to the N term how can we get the X to the N term well we can multiply this x times this second term over here so if you multiply this x times this business over here you're going to get negative r1 plus r2 plus all the way to RN x times X to the n minus 1 is just going to be X to the N and then obviously you're going to multiply this x times all the other terms you're just going to get a bunch of other stuff so that's how we can get these two terms using the X and then can we get either of these degree terms using the R times R the R sub n plus 1 well we can multiply we can multiply R sub n plus 1 or negative R sub n plus 1 X to the N and then we'll also get a similar degree term so we'll have negative R sub n plus 1 times X to the N and then obviously were going to multiply this times all of the other characters in this polynomial so you're going to have all this plus so on and so forth but this will suit our purposes because when you add these two things what do we get we get X to the n plus 1 and then we get - well these are this and this are the coefficients on the X to the N term so this is going to be minus r1 plus r2 plus all the way to plus RN and then this is minus RN plus 1 we have the minus out front so this is plus R sub n plus 1 X to the N and then we're going to have a bunch of a bunch of other lower degree terms that don't matter but we've just proven our case what is what is r1 r1 plus r2 plus all the way to plus R sub n plus 1 what is this equal to well in our expansion we have it right over here that's equal to that over there that is equal to the negative of this coefficient it's equal to the negative it's equal to the negative of a 1 and the reason why this works out no matter what even you know you say hey wait if I have complex roots how does it always end up being a real number and that's because the imaginary parts cancel out when you take their sum so let's just apply it we've proven it we've proven actually two base cases we've proven it for a degree two for a degree three and then we show that if it's true for any degree n then it's definitely true for any degree n plus one so we know if it's true for degree three then it's definitely true for degree four which means it's definitely degree true for degree five so when you a mathematical induction it's kind of this Domino proof that if it's true for three which makes it true for four then micki assuming it's true for four makes it true for five and it just keeps going to any N so in general if someone gives you a polynomial let me think of some crazy polynomial if I were to give you x squared let me do it X to the seventh minus minus PI X to the sixth plus E X to the fifth minus square root of 2x to the fourth minus I won't write out all the terms so minus three is equal to zero someone were to give you this polynomial and they were to say what do the seven roots of this polynomial add up to you say oh well the some of these roots is going to be the negative of this coefficient right over here so r1 plus r2 plus all the way to r7 all seven roots are going to add up to the negative of this coefficient they're going to be equal to PI and one other thing you might be saying hey wait every polynomial you did had a one coefficient in front of the highest degree term you know that not all polynomials have that and the answer there is let's say if I were able to give you a polynomial I don't know 7x to the fifth minus six X to the fourth plus plus I don't know PI X to the third plus a bunch of stuff is equal to zero and you want to find the sum of these of this polynomials roots you first divide everything by seven so it becomes X to the fifth minus six over seven X to the fourth plus PI over seven X to the third plus so on and so forth is equal to zero over seven which is just zero and now you look at this problem well the sum is going to be the negative of this coefficient here so it's going to be the sum of all five roots R is going to be 6 over 7 anyway hopefully you enjoyed that