 The previous two theorems showed that if you add a rank one matrix, the previous two theorems, meaning the theorem we showed just now and the last theorem we actually proved in the previous class. They showed that if you add a rank one matrix or if you border a Hermitian matrix, then the eigenvalues of the matrix interlace. So now the question is, if you take two interlacing sets of real numbers, then can you realize these interlacing set of real numbers by a Hermitian matrix with a suitable modification? So can I find matrices such that these set of interlacing numbers are such that one subset of numbers are the eigenvalues of one matrix and then if you, for example, border that matrix with a Y and an A, you can get another matrix for which the other set of numbers are the eigenvalues. The answer is yes and that is what is the essence of the following theorem. So it's kind of a converse result to the theorem we just proved. So let n be a positive integer and let lambda i, i equal to 1 to n and lambda hat i, i equal to 1 to n plus 1 be two given sequences of real numbers such that they have this interlacing property. So lambda hat 1 is less than or equal to lambda 1, less than or equal to lambda hat 2, lambda 2, lambda n minus 1, lambda hat n, less than or equal to lambda n, less than or equal to lambda hat n plus 1. Now let lambda equals a diagonal matrix with diagonal entries equal to lambda 1 up to lambda n, then there exists a real number A and Y in R to the n. In fact, it's enough to choose a real vector Y such that lambda hat 1 up to lambda hat n plus 1 are the eigenvalues of the real symmetric matrix A hat which is equal to lambda Y, Y transpose and A which is in R to the n plus 1 cross n plus 1. So that's the statement of the theorem. So we'll show this. So first of all, note that lambda i, i equal to 1 to n are eigenvalues of lambda. So we already have that first property that this matrix here has lambda i as its eigenvalues and what we are saying now is that the other set of eigenvalues lambda hat 1, lambda hat 2 up to lambda hat n plus 1 can will be the eigenvalues of this matrix A hat if you choose Y and A appropriately. So the proof is essentially going to be constructive. So we'll show how to choose Y and A such that lambda hat 1, lambda hat 2, etc up to lambda hat n plus 1 are in fact the eigenvalues of A hat. So straight away what you can do is you can look at trace of A hat and that is equal to trace of lambda plus A and trace of lambda is just the summation of lambda i, i going from 1 to n and trace of A hat is the summation of the eigenvalues of A hat and what we want them to be is lambda hat 1, lambda hat 2 up to lambda hat n plus 1 and so this just implies that A is equal to sigma i equal to 1 to n plus 1 lambda hat i, lambda hat i minus sigma i equal to 1 to n lambda i. So we already figured out what A should be. Now let us look at the characteristic polynomial P A hat of T. So P A hat of T is equal to the determinant of T i this is an n plus 1 cross n plus 1 identity matrix minus A hat which is equal to just substituting for A hat we can write it as the determinant of the matrix which has T i minus lambda this is an n cross n identity matrix and then minus y minus y transpose and T minus A. Now what I can do is I can do one small trick here which is I can pre and post multiply by other matrices whose determinant is 1 and that will not change the value of this determinant. So that is equal to the determinant of the identity matrix and below that I will have T i minus lambda inverse times y transpose 0 and a 1 here this times this matrix T i minus lambda minus y minus y transpose T minus A. I will just draw some partitions here so that the quantities do not get mixed up and the transpose of this matrix over here i T i minus lambda inverse y 0 and a 1 here. So these matrices have these are lower triangular and an upper triangular matrix and their determinant is equal to 1 so that does not change the value of this determinant. Now if you carefully multiply these out what you will find is that this reduces to the following form it becomes determinant of T i minus lambda and over here I will get T minus A minus y transpose T i minus lambda inverse y and 0 here and a 0 here so that is the reason I did all this so that I get a block diagonal matrix or in fact this is a completely diagonal matrix and since it is a diagonal matrix I can now readily compute its determinant and so that is just equal to the product of the diagonal entries which is this term T minus A minus sigma so I will just expand this product here i equal to 1 to n y i squared divided by T minus lambda i this is a diagonal matrix with lambda i's T minus lambda i's are on the diagonal this inverse of this matrix because after all T i minus lambda is diagonal so T i minus lambda is also a diagonal matrix so converting computing this inverse is super easy you just invert all the diagonal entries and so that is this value so this is the same as this times the product i equal to 1 to n T minus lambda i okay so we will call this equation star we will come back to it in a bit so now we have already determined what A is okay and so what we need to do is to find y such that this P A hat of lambda k hat is equal to 0 for k equal to 1 2 up to n plus 1 okay so we have already determined A so need to find y such that P A hat of lambda k hat equals 0 k equal to 1 2 up to n plus 1 okay so this is a little bit challenging so let us see how to do that so consider two functions f of T which is the product i equal to 1 to n plus 1 T minus T minus lambda hat i and this is of degree n plus 1 and another polynomial g of T which is equal to product i equal to 1 to n T minus lambda i this is of degree so what we really want is that this characteristic polynomial should end up becoming and coming out in this form so that then we know that lambda hat i i equal to 1 to n plus 1 are the eigenvalues of this are the zeros of this polynomial so we basically want to and this thing here is actually your g of T okay and so we have P A hat of T to be this quantity times g of T and we want back to somehow end up in this form where f of T is equal to product i equal to 1 to n plus 1 T minus lambda hat i okay now this is degree n plus 1 and so this is degree n so basically what you can do is you can you can write so you can you can find you can you can divide f of T by g of T and then you will get a quotient and a remainder and the quotient will be of degree 1 and the remainder will be of degree at most n minus 1 so by the Euclidean algorithm we must have f of T equal to g of T times some T minus C plus r of T where C is some real valued quantity because all the coefficients here are real and r of T must be of degree at most n minus 1 so this is the remainder polynomial and this is the this is the quotient polynomial so what we can do is now let us let us compare the coefficients of T power n on both sides so so the coefficient of T power n plus 1 is just going to be 1 because the T power n plus 1 comes from this T power n here times this T here but if you look at the coefficient of T power n the coefficient of T power n here is just the summation of lambda hat i okay because you will take n of these terms and one of these lambda hat i's okay and or rather it is minus lambda hat i but I will ignore the minus n I will consider a minus sign for the other thing also and so the coefficient of T to the n is the summation of lambda hat i i going from 1 to n plus 1 and if I look at this the coefficient of T to the n is going to be either I can take all the T terms here then it will multiply with minus C or I can take n minus 1 terms here and multiply with this T and then I will get a minus lambda i so basically that what that means is that sigma i equal to 1 to n plus 1 lambda hat i is equal to C plus sigma i equal to 1 to n lambda i and so then this means that C is equal to summation i equal to 1 to n plus 1 lambda hat i minus sigma i equal to 1 to n lambda i which is actually nothing but a okay and so basically this T minus C that we are looking at here that is nothing but T minus a okay and further if I compute f of lambda k okay that is going to be equal to G of lambda k times lambda k minus a plus r of lambda k and this is equal to 0 because there is a T minus lambda i term here product of T minus some right terms here so G of lambda k for any k is equal to 0 and so this is equal to r of k and this is true for k equal to 1 2 up to n okay and so now what that means is that if I compute f of lambda k for k equal to 1 to n I then know what r of lambda k is at n different points so r of t is known at n points okay lambda 1 through lambda n okay so f of lambda k I can compute because it is just this polynomial here and so I can just substitute lambda 1 lambda 2 etc I know what f of lambda k is and by this thing I know then what r of lambda 1 lambda 2 up to lambda n is so this has a degree at most r of t has a degree at most n minus 1 and I know this know its value at n different points and what that really means is that we actually know what r of t is so just for the moment in order to proceed further I'll assume that these lambda 1 to lambda n are distinct and then I'll come back to the case where some of these eigenvalues are repeated and I'll deal with that case later so for the moment assume lambda 1 lambda n are distinct okay then then we need we what that means is that g of t is the product of all these t minus lambda i terms and each of these are going to be first order terms okay and so g of t only has simple roots each lambda i occurs only once as a root and so g of t has or only has simple roots and we have the following see for example if you are given a first degree polynomial with the unknown coefficients all you need is the value of the polynomial at two points and you can determine what the polynomial is similarly if you are given a second degree polynomial all you need is the value of the polynomial at three points and you can determine what the polynomial is and for the first order polynomial case I'm sure you have seen this Lagrange interpolation formula which tells you how to write out what that what the straight line that matches the two values that you have observed is and we see that in linear regression and various problems many times but this is a generalization of that so we are looking for an n minus one degree polynomial such that its value matches with some given values r of lambda one r of lambda two up to r of lambda n at n at these n different points and so that formula is directly I mean there's a direct formula to write out what r of t should be and so this r of t is equal to the summation i equal to 1 to n f of lambda i times g of t divided by g dash of lambda i that is the derivative of g of t evaluated at t equal to lambda i times t minus lambda i so this is called the Lagrange interpolation formula so we'll take this on faith but maybe I can indicate why this is actually correct so for example if g of t if I write g of t to be equal to g i of t times t minus lambda i so all the other n minus one factors in g of t are in this g i of t then g dash of t I can write to be g i dash of t times t minus lambda i plus g i of t which means that if I want to evaluate g dash of lambda i that is equal to now if I substitute lambda i here I get lambda i minus lambda i so this term goes off to zero and so I'll be left with g i of lambda i okay so the derivative is actually equal to g i of lambda i it's a simple fact but it's true and so that means that at t equal to some lambda k if I were to evaluate what happens to this part here g of t divided by g dash of lambda i times t minus lambda i what I get is I will get either g i of t times so g of t is g i of t times t minus lambda i t minus lambda i over g dash of lambda i times t minus lambda i and I need to evaluate this at t equal to so I need to evaluate this as at t equal to lambda k so I'll have to consider the k equal to i and k not equal to i separately so I'll consider k equal to i here and so then I will be substituting t equal to lambda i and if I substitute t equals lambda i these two terms cancel and so I'll have g i of lambda i over g i dash of lambda i but g i dash of lambda i equals g i of lambda i so this is equal to g i of lambda i over g dash of lambda i which is equal to 1 so this is for k equal to i and the other case is when k is not equal to i I won't I don't need this factorization so I can just write it as g of lambda k divided by g dash of lambda i times t minus lambda i is lambda k minus lambda i but g of lambda k is equal to 0 for any lambda right because it has all these factors g of t is the product of t minus lambda i so if I substitute if I look at g of lambda k that's always going to be equal to 0 and g dash of lambda i is all the other factors it's g dash of g i of lambda k and if I drop the i term from g then this will be a non-zero quantity and lambda k minus lambda i is also non-zero because I assume the eigenvalues are distinct and so this is always going to be equal to 0 for k not equal to i so then so now we know what happens to this so if I if I if I look at what happens to r of lambda k then I will have a summation i going from 1 to n f i f of lambda i times this thing evaluated at t equals lambda k but this is non-zero only for k equal to i and so only the the kth term in this summation will survive and for k equals i this quantity equals 1 and so I'll be just left with f of lambda k r of lambda k is equal to f of lambda k okay which is what we wanted right we started out by saying that f of lambda k is something that's known and we want r of lambda k to equal f of lambda k at these k at these n points lambda 1 lambda 2 up to lambda n so I'll just write that here so r of t is a degree less than or equal to n minus 1 polynomial that satisfies or I'll put it this way that equals f of lambda k at lambda i i equal to 1 to n i e n distinct points so that means that r of t is actually unique and it is given by the formula that we determine this is a consequence of the Lagrange interpolation it's a consequence of polynomials so then what that means is that we now know what the form of r of t is so if we now consider what f of t divided by g of t is this is equal to t minus a so f of t was t minus a g of t plus r of t so plus r of t divided by g of t is equal to now I'll use this formula for r of t which is summation f of lambda i g of t divided by g dash of lambda i times t minus lambda i so I'll write this as t minus a minus summation i equal to 1 to n okay I wrote it with a minus so I have to write a minus f of lambda i over g dash of lambda i times 1 over t minus lambda i sir yes sir in the above point the one above r t is uniquely determined should it be f of lambda k or f of lambda i it is okay so let me to avoid confusion and just remove this so at n distinct points okay all I'm trying to say is that r of t matches certain given values at n distinct points happy is it clear no sir I'll think about it sir I'll ask one teams yeah so basically r of t is some polynomial we don't know what it is but we know that r of lambda k equals f of lambda k at k lambda one at k equal to for k equal to 1 to n that is all that I'm saying it's a degree n minus 1 polynomial up to at most n minus 1 polynomial where its value at n distinct points is completely determined so for example if I have the real line and I gave you 1 2 3 points and I say here is one value here is another value and here's another value now if I asked you to fit a degree 2 polynomial okay which is a quadratic which matches with these then it turns out that there's only one way you can do that which is a quadratic that somehow looks a bit like this I'm not good at drawing these things but it's a quadratic that looks like this there's no other way you can fit a quadratic that matches these three points if you had given me if you had allowed me to choose a third-order polynomial then it you can actually choose many different third-order polynomials where it matches with these three values but if I have to choose a quadratic this is the only way to do it it's easier to think of it if you go to an even more trivial case which is a straight line so if you give me two points and then you say the value here is this and the value here is this then there is only one way I can fit a straight line through both these points okay and this is the first-order polynomial and if you allow me to fit a quadratic through these I can I can fit many different quadratics this is in fact a quadratic where the the t squared coefficient equals zero but of course I can fit a quadratic maybe like this maybe like this etc etc so there are many ways to fit a quadratic through this but there's only one way to fit a straight line where it meets these two points so if you take if you are given that a polynomial is of degree at most n minus 1 and if you specify its value at n distinct points then the polynomial is completely determined I'm just illustrating that the way we've chosen r of t by using this Lagrange interpolation formula is such that it's r of lambda lambda k equals f of lambda k for lambda k lambda 1 lambda or for k equal to 1, 2 up to n okay so I'm not yeah I'm not shown the uniqueness here that's a property of polynomials but I'm just saying that the way we've chosen is actually something that works in the sense that it matches f of lambda k r of lambda k matches f of lambda k for k going from 1 to n I hope that's a bit clearer yes sir yes okay so now sir I have a question so so we need to determine a polynomial of degree at most n minus 1 that was rt and we we know the value at n minus 1 points n points here so we could write it in terms of general polynomial expression and and we know the different values so basically the coefficients are unknown so we could express it in ax equal to be linear set of equations and absolutely yes that also works this is a direct formula for the for the answer did that this is the answer you would get okay this Lagrange interpolation formula is the answer you would get if you did what you what you just suggested okay sir another side question that that you told that if I am given two points and then I can fit infinite number of quadratics through them so if I in this way if I form the set linear set of linear equations then I will find some some vector in the null space that is the interpretation in this absolutely so there's a very nice connection between polynomials and linear systems of equations and yeah so what you said is actually correct number of solutions if there is something in null space yes exactly okay yeah so yeah maybe time permitting I'll take a digression and discuss this this kind of connections also but we are actually closing in on the end of this course and so there is some more material that I need to cover let's see how it goes but your intuition is correct now coming back to this so what do we want we want that f of lambda k hat equals zero for k equal to one two up to n plus one okay so to oops to have f of lambda hat k equal to zero k equal to one two up to n plus one we must have now substituting directly into this formula here lambda hat k minus a minus sigma i equal to one to n minus f of lambda i divided by g dash of lambda i times one over lambda hat k minus lambda i equal to zero for k equal to one two up to n plus one okay now now one one small point is that what if I mean I'm dividing by lambda hat k minus lambda i and so if lambda hat k equals one of these lambda i's then of course I'm dividing by zero that doesn't make sense so this is not a problem because if lambda hat k equals lambda i then I have f of lambda i sitting here okay and so this coefficient will also be equal to zero because f of lambda hat k and lambda hat k equals lambda i so f of lambda hat k equals zero so these two actually first cancel and then you have one over g dash of lambda i so there's no singularity at t equal to lambda hat k okay so now what we'll do is we will set yi squared to be equal to minus f of lambda i over g dash of lambda i and this is for i equal to one two up to n now if we can show that this quantity is greater than or equal to zero okay then and now I'm telling you how to choose yi okay then okay so then let's see if I go oops we go up here yeah so p a hat of t is equal to t minus a divided by sorry minus yi squared over t minus lambda i times this product okay so now let's compare this okay against so you'll need to keep this in mind or maybe what I'll do is I'll write that here so that it will be clear p a hat of t is equal to t minus a minus sigma i equal to one to n yi squared over t minus lambda i times the product i equal to one to n t minus lambda i okay this is what we had earlier and and what we have here is that f of t over g of t is equal to t minus a minus sigma i equal to one to n f of minus f of lambda i over g dash of lambda i times one over t minus lambda i and g of t is exactly this polynomial here now f of t is something that we are choosing such that it has lambda hat one through lambda hat n plus one as its zeros and so if this polynomial exactly matches with this polynomial we know that a hat the characteristic polynomial of a hat has lambda hat one through lambda hat n as its zeros so if you look at this this g of t is exactly this thing here and so all you need is to make this equal to this and then you're home dry in the sense that these are exactly the same polynomials okay so all you need now is to show that yi squared if for for me to be able to define this to be yi squared this quantity should be non-negative then i can define this to be yi squared for some real valued quantity yi and so if i can show that um so if can show that yi squared or actually i'll put it this way minus f of lambda i over g dash of lambda i is greater than or equal to zero for i equal to one through n then pa hat of lambda hat k equals zero for k equal to one through n plus one from this equation star which is the same as this okay so that means that we have found the polynomial that we want i mean we found the y such that the characteristic polynomial of a hat is exactly the one that has lambda hat one up to lambda hat n as its roots okay so now i still need to show that these yi squareds are greater than or equal to zero or that um f of lambda i over g dash of lambda i is less than or equal to zero so um that's just one or two more steps but i'll do that in the next class because i'm run out of time um and then i need to extend this to the case where the eigenvalues could be repeated because i assume that lambda one lambda two up to lambda n are distinct the extension is going to turn out to be almost trivial because if for example lambda one equals lambda two then lambda two hat equals lambda one because lambda two hat is supposed to interlace between lambda one and lambda two and so that means that i can pull out some factors and deal with them separately and then consider only the distinct eigenvalues that remain okay so we'll complete this proof in the next class we'll stop here for today