Transcription of 0.1 Eigenvalues and Eigenvectors - UC Davis Mathematics
1 Eigenvalues AND EIGENVECTORS1 MATH 22 ALComputer LAB for Linear AlgebraDr. DaddelEigenvalues and EigenvectorsPlease save your MATLAB Session (diary)as and Eigenvalues and EigenvectorsIn this LAB we will cover the following topics regarding Eigenvalues andEigenvectors. An Example Definitions How to find Eigenvalues How to find Eigenvectors Applications2 How to do this LAB: 1. Format of this lab is different from previous labs, You start diaryby typing diary 2. Then read the Lab, and when ever needed type the command inthe MATLAB, continue reading and enter in MATLAB the commandsappeared in the LAB. 3. In this LAB : a. ) When it says letv1=v1= 16 13 it means Enter v1 = [1 6 13] in MATLAB (note thetranspose) b.) When it says FindAv3 it means Enter A v3 in MATLAB c.
2 When you see Explain , type the percentage character andenter your comments. d.) When it says in the lab that you should be able to provethis That means it may be helpful in your Linear Algebra coursebe able to prove it. Do not provide proof here. d.) When it says Find That means Type in ExampleLets look at some examples of Eigenvalues and Eigenvectors , then have aquick look to an application:Consider the square matrixA= 1216 10 1 2 1 EnterAin 16 13 Enterv1in (Note: you need to typeA v1) will see thatAv1= 0 andA2v1= 0. So,v1is in the NULL space let Letv2= 121 Enterv2in will see thatAv2= 4v2andA2v2= ( 4)2v2, So, multiplication byAstretchesv2by factor of 4 and reverses the Letv3= 23 2 Enterv3in will see thatAv3= 3v3andA2v3= (3)
3 2v3, So, multiplication byAstretchesv3by factor of 3 and preserves the let s choose a random vectoru= 123 Enteruin will see that multiplication byAchangesuto new vectorAuwhich iscompletely different vector and is not in the direction ofuor its the matrixAabove the vectorsv1,v2andv3are special vectors, multi-plication byAwill keep the direction of the these vectors, it might stretch,compress or collapse them in the same direction or opposite DefinitionsThis section is just for your reading, all is covered in your 22A LetAbe ann nmatrix, the number is called aneigenvalueofAifthere exists a nonzero vectorxsuch thatAx= The vectorx6= 0 is called aneigenvectorcorresponding to ifAx= The equationAx= xis equivalent to (A I)x= All of the following are equivalent: is an eigenvalue of A.
4 (A I)x= 0 has a nontrivial solution. A Iis singular. det(A I) = non-zero solutions of (A I)x= 0 are the Eigenvectors for These vectors together with the 0 vector form a subspace which is calledtheeigenspace corresponding to eigenvalue .The expressiondet(A I) is a polynomial of degreenof , which is calledthe characteristic polynomial that the Eigenvalues are the roots ofthe characteristic equationdet(A I) = An ApplicationNow consider the matrixA= 1216 10 1 2 1 enter A in MATLAB with the three eigenvectorsv1= 16 13 ,v2= 121 andv3= 23 2 Form MatrixPwhose columns are these three 1 12623 131 2 Use MATLAB to find det(P).means enterA,v1,v2,v3andPin MATLAB and then enter det(P) You should get 84. SoPis MATLAB to find inverse type inv(P) Now findD=P 1AP.
5 By typing D=inv(P)*A*P .Notice that we have a diagonal matrix with Eigenvalues ofAon the diag-onal entry ofD. You can solveD=P 1 APforAasA=PDP part is just for your reading, all is covered in your 22A you need a pen and paper to convince yourself thatA2=A A=(PDP 1) (PDP 1) = (PD2P 1) and prove thatA200=A A A .. A A= (PDP 1) (PDP 1) .. (PDP 1) (PDP 1) = (PD200P 1)Now computeD2,D3andD4this will show thatDnis a diagonal matrixwhose diagonal entries are the diagonal entries ofDraised to for any given vectoruit is easier to findA200uasA200u=PD200P 1uThis is only an example of many applications of Eigenvalues and HOW TO FIND Eigenvalues AND Eigenvectors USING How to find Eigenvalues and Eigenvec-tors using MATLABC onsider a matrixAA= 1216 10 1 2 1 enter A in MATLABType:d = eig(A)This will show you a vector of the Eigenvalues of matrix A.
6 But might notlook pretty!!!type : format rattype : d = eig(A)It should give you eigenvlaues in rational form, like this:-431/3850048286914616 The last one is the : format longType: d = eig(A)you will basically represents -4, 3 and 0. This is true also when you use matlabto find Eigenvectors :type: [V,D] = eig(A)this will produces two matrices:A diagonal matrixD. On the main diagonal ofDare Eigenvalues ofA,and a matrixVwhose columns are Eigenvectors ofAcorresponding to theeigenvalues in the diagonal may see:V= The first column is a multiple ofv1= 121 Do this in MATLAB:If you multiply the first column by -5 and divide by 2 and round it up, youwill get FindAVandV Dfor matrixA, they must be equal, Are they? HOW TO FIND Eigenvalues AND Eigenvectors USING Does row operation preserve Eigenvalues ?
7 LetA= 1216 10 1 2 1 LetBobtained by interchanging the first and second row ofA. To obtainB, define the permutation matrixP= 0 1 01 0 00 0 1 Enter A, B and P in MATLABFindB=PA( recall to type P*A in MATLAB)Type: eig(B) to find Eigenvalues ofBObserve that Eigenvalues changed because of the row operation done on row operations will change the Eigenvalues of a What is the effect of adding a multiple of I(identitymatrix) to A?letA= 1216 10 1 2 1 Enter A in MATLABType: eig(A)Type: A1=A-3*eye(3)Type: eig(A1)Type: A2=A+4*eye(3)Type: eig(A2)Type: A3=A-5*eye(3)Type: eig(A3)Type: A4=A-10*eye(3)10 Type: eig(A4)answer this question If 3 is an eigenvalue of a matrixMwhat is an eigenvalueofM 6I?You should be able to generalize and prove this observation as : Ifkis aneigenvalue of a matrixMwhat is an eigenvalue ofM sI?
8 HOW TO FIND Eigenvalues AND Eigenvectors USING Are Eigenvalues ofAandA 1are related?LetC= 1 1 1 12 00 1 2 Enter C in MATLAB andFind det(C) to verify thatAis inverse ofCby typing inv(C).Find Eigenvalues of bothCandC what you see and generalize your should be able to prove it. Not here , in your 22A Eigenvectors ofCandC 1, your Are Eigenvalues ofAandAnare related?LetC= 1 1 1 1200 1 2 Enter C in MATLABFind Eigenvalues of Eigenvalues ofC3, what you see and generalize your should be able to prove it. Not here , in your 22A withC,C2, Is there any relation between Eigenvectors ofCand Eigenvectors ofCn? HOW TO FIND Eigenvalues AND Eigenvectors USING Two important properties of eigenvaluesRecall that trace of a square matrix is the sum of the entries in main 1 1 1 1200 1 2 andA= 1216 10 1 2 1 Enter A and C in MATLABFind trace ofCandAby typing : trace(A) and trace(C)Find Eigenvalues Do you see any relation between Eigenvalues and trace of of amatrix?
9 Find det(A) and det(C)Explain Do you see any relation between Eigenvalues and determinant of amatrix?