 The next thing I want to talk about is polynomials and matrices. So basically given a polynomial P of t, I can always compute or define something called P of a, where all the t's are replaced by a and the constant term is replaced by that constant term times the identity matrix. And we have already seen that there is a strong connection between polynomials and matrices. For example, the Kelly Hamilton theorem which says that for every matrix a, there is a characteristic polynomial which annihilates a, that is P a of a equals 0. But there could be polynomials of lower degrees, degree n minus 1 or n minus 2, etc., that also annihilates a. So one related question you can ask is what is the minimal degree polynomial that annihilates a? Now for any polynomial that annihilates a, you can always scale that polynomial and make the leading coefficient, that is the coefficient of the highest power of that polynomial or in that polynomial equal to 1. And such polynomials are called monic polynomials. And of course, note that since the highest power has a leading coefficient equal to 1, a monic polynomial cannot be an identically zero polynomial. Of course, if you take the identically zero polynomial, that annihilates any matrix but that is not saying much. So we're not interested in that polynomial. So we want to find the lowest degree monic polynomial that annihilates a. So that is given by the following theorem. So given a matrix a in c to the n cross n, there exists a unique monic polynomial qa of a of degree at most n that annihilates a. That is qa of a is equal to zero. So for given such a polynomial, if p of t is any polynomial that such that p of a equals zero, then qa of t divides p of t. So that is the theorem. So let's see how to show this. So p of a is a polynomial that annihilates a. And so suppose p a of t is the characteristic polynomial a of t is that it annihilates a. This is the Kelly Hamilton theorem and it has a degree equal to n. So that means that there exists a minimum integer m such that there is a monic polynomial q of t with degree m and q of a equals zero. So we've already found something that is of degree n. So the minimum degree polynomial that annihilates a call that q of t and this has some degree m which is going to be at most equal to n and it satisfies the condition that it annihilates a that is q of a equals zero. So that's basically degree of q of t is less than or equal to the degree of p of t. Now p a of t. Now suppose p of t. Yes. Sir here p and p a of t are different. Different. So annihilates a and say q of t. Now q of t we've defined it to be the minimal polynomial of minimal degree that annihilates a. Then certainly it must be true that the degree of p of t is greater than or equal to the degree of q of t because q of t is after all the polynomial of minimal degree that annihilates a. So now what we'll do is we'll divide p of t by q of t. You can divide polynomials. You have seen this in your high school. There's an algorithm called Euclid's algorithm you can use and what this does when you do this division is that you will end up with p of t is equal to some h of t times q of t plus some r of t. So this is the quotient polynomial. This is the remainder polynomial. And by I mean since this is the remainder polynomial the only property it needs to satisfy is that degree of r of t is strictly less than the degree of q of t. Because if there is some extra power left in r of t then you could take out one more factor into this h of t. So now since p of a is another polynomial that annihilates a so p of a equals zero and this is equal to h of a times q of a plus r of a and q of a is already equal to zero and so that implies r of a equals zero. So what we've done is we've now found a polynomial of smaller degree than q of t that annihilates a. So this is a contradiction because we started out by assuming that a the q of t is the minimal degree polynomial that annihilates a. So that means that r of t must be must be the all zero or the it's just a zero polynomial. In other words it means that q of t divides p of t if p of t is any other polynomial that annihilates a. Now if there are two monic polynomials of the smallest degree we have to show uniqueness. So if there are two monic polynomials of smallest degree that annihilate a then this same argument here implies that both these polynomials divide each other. And if they divide each other then it means that they have the same degree and it also means that one is a scalar multiple of the other. But they are monic that means that their leading coefficient is equal to one. So if they're just a scalar multiple of each other and the leading coefficient equals one in both of them then the scale factor is just equal to one and so they're identical. So this establishes the uniqueness. So basically that's basically the definition. So the unique monic polynomial through a of t of minimum degree that annihilates a is called the minimal polynomial. So basically these minimal polynomials have lots of very nice properties. I'll just talk about one here but I think you can look at the textbook for many more interesting results around minimal polynomials. So here's a corollary. Similar matrices have the same minimal polynomial. So this is very easy to see. So A and B are n cross n matrices and A is similar to B. That means I can write A as S B S inverse for some invertible using some invertible matrix S. So if I take Q, if I compute Q B of A, so Q B of A, Q B of T is the minimal polynomial of the matrix B and if I compute Q B of A that is equal to Q B of S B S inverse and this is equal to S Q B of B times S inverse and Q B of B equals 0 because Q B is the polynomial of minimal degree that annihilates B. So this is equal to 0. So that implies that so Q B of A is 0 that means the degree of Q B of T is greater than or equal to the degree of Q A of T because Q A of T is the polynomial of minimal degree that annihilates A and Q B of T is some other polynomial that all so the Q B of T must be at least equal to the degree of Q A of T. Now there is nothing special about A or B in this argument so you can simply repeat the argument exchanging A and B and similarly say that degree of Q A of T is greater than or equal to the degree of Q B of T and so that means that they have the same degree and adding the fact that they are monic implies that they have the same polynomial. That is the same argument we made about uniqueness at the previous proof. So here is actually one more corollary that says that for every A in C to the n cross n Q A of T divides P A of T. P A of T is the characteristic polynomial. This of A and Q A of T is the minimal polynomial. Moreover, Q A of lambda if and only if lambda is an eigenvalue of A. So that means that every root of every root of P A of T equals 0 is also a root of Q A of T equals 0. So there are not any additional zeros in P A of T which are not roots of Q A of T equals 0. So since P A of A equals 0 there exists a polynomial H of T such that P A of T equals H of T times Q A of T. This is just because of the previous theorem we saw. If P A of T is some other polynomial that annihilates A then Q A of T divides that other polynomial which is P A of T in this case. So that means that so because it's like this every root of Q A of T equals 0 is a root of P A of T equals 0 obviously right because if I say Q A of lambda is equal to 0 then I have that P A of lambda is H of lambda times Q A of lambda and Q A of lambda equals 0 so P A of lambda is also equal to 0. So that means that every root of Q A of T equals 0 is an eigenvalue of A is an eigenvalue of A because P A of that root is equal to 0. Now then and if x not equal to 0 is an associated eigenvector then from A x equals lambda x we have that 0 which is equal to Q A of A times x is also equal to Q A of lambda times x because A x equals lambda yeah so whatever and if x not equal to 0 is an associated eigenvector x equals lambda x implies that Q A of A times x which is equal to Q A of lambda times x is equal to Q A of lambda times x and since x is not equal to 0 this must mean that for Q A of lambda times x to be equal to 0 we must have that Q A of lambda equals 0 okay and therefore it is true that if lambda is an eigenvalue of A then Q A of lambda equals 0 which proves the result and so basically the what this implies is that if P A of T if I write it out in its product form i equal to 1 to T minus lambda i power say si where 1 less than or equal to si less than or equal to n and s1 plus s2 plus etc plus sm equals n then with lambda i being distinct then Q A of T must have this okay so that is to say that for every factor that appears in the characteristic polynomial the product form of the characteristic polynomial there should be a corresponding factor in the minimal polynomial and this ri here is at least equal to 1 but it need not equal si all the way so the summation of ri could potentially be less than n but you will have some factors like this so this is one way to even to actually search for minimal polynomials that is you take ri equal to 1 2 all the way up to si for each i and then see what is the minimal degree polynomial that you can generate out of this which for which Q A of A equals 0 of course for very large dimensional systems this is difficult to compute and also note that if si equals 1 for that is any if there's a particular eigenvalue that is appearing with multiplicity 1 then that same factor will certainly appear in the minimal polynomial if only in the case where there is a factor here that appears with power 2 or more that it's possible for ri to be less than si okay so here's something for you to think about i dare not ask you because you won't answer so the first question is yeah yeah only if ri is equals to 1 we will get the minimal polynomial right for all right it may not be so so let me uh no it's not true so it's possible that you do have to take um higher powers of ri in order to annihilate a so for example let me see if i can give you a very quick example um huh so if we take our favorite defective matrix 0 1 0 0 then if i take the polynomial so both its eigenvalues are equal to 0 and its characteristic polynomial so this is a pa of t is equal to t square right now um basically you can see that in this case if i take um uh so my choices for Q of Q A of t are t and t square right because i i have to get that here and get this factor for each eigenvalue i must get a factor here and the powers available to me are only one or two obviously if i take Q A of t equals t and i compute Q A of A i will not get the zero matrix i'll i'll get the matrix A but if i take Q A of t equal to t squared then Q A of A equals zero so in this case Q A of t equals pa of t yes okay thank you yeah so it's possible that you do have to take higher powers here it's not always true that you will have to take ri equals one so here are some questions so question one is what is the polynomial what is the minimal polynomial of the identity matrix what is the minimal polynomial of the all-ones matrix so you can think about these very easy questions but uh i'll let you think about them