科学计算科学计算 (12).pdf
The mathematical definition of matrix eigenvalues.Find matrix eigenvalues and eigenvectorsGeometric significance of eigenvalues2 2.4 4 MMatrixatrix E Eigenvaluesigenvalues andand E EigenvectorsigenvectorsLet A be a square matrix with n rows and n columns.If there is a constant and an n-dimensional non-zero column vector x,which makes the equation Ax=x hold,then is called the eigenvalue of A,and x is the eigenvector corresponding to theeigenvalue。1 1Mathematical Mathematical D Definition of efinition of MMatrix atrix E Eigenvalueigenvalues sE=eig(A):finds all eigenvalues of matrix Ato form vector E.X,D=eig(A):finds all eigenvalues of matrix A to form diagonal matrix D,andgenerates matrix X.Each column of X is a corresponding eigenvector.2 2Find Find MMatrix atrix E Eigenvalues and igenvalues and E EigenvectorsigenvectorsIn MATLAB,the eig function is used to calculate matrix eigenvalues and eigenvectors.There are two commonly used call forms.A=1,1,0;1,0,5;1,10,2A=1 1 01 0 51 10 2 X,D=eig(A)X=0.0722 0.9751 0.08860.5234 -0.0750 -0.63560.8490 -0.2089 0.7669D=8.2493 0 00 0.9231 00 0 -6.1723 A*X(:,1)ans=0.59564.31747.0040 D(1)*X(:,1)ans=0.59564.31747.0040Example 1:Let=33322322Let be the eigenvalue of R and the eigenvalue of S,=1,2,3 be the eigenvector of R corresponding to,j=1,2 be the eigenvector of S corresponding to,try to verify:(1),are eigenvalues of A.(2)=1,2,3,0,0 s the eigenvector of A corresponding to,j=0,0,0,1,2is the eigenvector of A corresponding to.R=-1,2,0;2,-4,1;1,1,-6;S=1,2;2,3;A=R,zeros(3,2);zeros(2,3),S;X1,d1=eig(R)X2,d2=eig(S)X3,d3=eig(A)X3=0.8553 0.4517 0.1899 0 00.4703 -0.8395 -0.5111 0 00.2173 -0.3021 0.8383 0 00 0 0 -0.8507 -0.52570 0 0 0.5257 -0.8507d3=0.0996 0 0 0 00 -4.7165 0 0 00 0 -6.3832 0 00 0 0 -0.2361 00 0 0 0 4.2361X1=0.8553 0.4517 0.18990.4703 -0.8395 -0.51110.2173 -0.3021 0.8383d1=0.0996 0 00 -4.7165 00 0 -6.3832X2=-0.8507 0.52570.5257 0.8507d2=-0.2361 00 4.2361The eigenvalues of matrix A are made up of the eigenvalues of matrix R and matrix S.According to the eigenvector of each eigenvalue of matrix A,the first three elements of thefirst three eigenvectors are the eigenvectors of R.The last two elements of the last twoeigenvectors are the eigenvectors of S.The calculation result is consistent with theconclusion.Let =3.80.60.62.2,the eigenvector has 1=31,2=13,and the corresponding eigenvalues are 1=4 and 2=2,let y1=Ax1=1x1,y2=Ax2=2x2,we discuss the relation between y1 andx1,y2 and x2.3 3Geometric Geometric SignificanceSignificance of of E EigenvaluesigenvaluesThe y1and y2are the result of transforming x1and x2through matrix A,and A isequivalent to a transformation matrix.With 1and 2as stretching factors,y1and y2arethe results of stretching x1and x2through 1and 2.As shown in the figure,the blackpart represents the vectors x1and x2,and the red part represents the result of stretchingx1and x2.Moreover,continuously make the unit vector x keep its length of 1.Then Ax will stretch a quarter of circular arc into a quarter of ellipse.MATLAB offers the eigshow function,which can demonstrate the relationship between vectors xand Ax.The operation is shown in the figure.Drag the green unit vector x with the mouse aroundthe origin,and the blue vector Ax appears synchronously in the figure.The size and direction ofAx are changing,and the direction of Ax is not necessarily the same as that of x.In the process ofchange,the position where x and Ax are collinear is called the characteristic direction.In thecharacteristic direction,Ax is equal to x.x00.50.535.55.56630y0060600818(1)Draw the figure of M.(2)Let =10.501,transform the node coordinates of M by A,and then draw the transformed figure.Example 2:The coordinates of each node with known capital letter M are shown in the table.The first row represents abscissa,and the second row represents ordinate.x=0,0.5,0.5,3,5.5,5.5,6,6,3,0;0,0,6,0,6,0,0,8,1,8;A=1,0.5;0,1;y=A*x;subplot(2,2,1);%Select No.1 subplot,see chapter 4 for detailsfill(x(1,:),x(2,:),r);%Draw the figure of M and fill it with redsubplot(2,2,2);%Select subplot 2fill(y(1,:),y(2,:),r);%Draw the transformed M figure and fill it with redFirstly,the transformation matrix A is defined,then x is transformed by A,and y matrixis obtained.Finally,the figures before and after transformation are drawn respectively.M is original normal body and changed to italics after transformation.This example tells us that when building a font library,you dont need to create aitalicized font library alone,but only need to make a proper linear transformation to theregular font library,which can greatly save storage space.