ATLAB Lecture 4 School of Mathematical Sciences Xiamen University http∥gdjpkc.xmu.edu.cr The eigenvalue decomposition is the appropriate tool for analyzing a matrix when it represents a mapping from a vector space into itself, as it does for an ordinary differential equation. On the other hand. the singular value decomposition is the appropriate tool for analyzing a mapping from one vector space into another vector space, possibly with a different dimension. Most systems of simultaneous linear equations fall into this second category If A is square, symmetric, and positive definite, then its eigenvalue and singular value decompositions are the same. But, as A departs from symmetry and positive definiteness, the difference between the two decompositions increases. In particular, the singular value decomposition of a real matrix is always real, but the eigenvalue decomposition of a real nonsymmetric matrix might be complex >>A=9 7 >>US, V=svd(A) %the full singular value decomposition -0.61050.71740.3355 -0.66460.2336-0.7098 -0.43080.656306194 14.9359 05.1883 -0.69250.7214 -0.7214-0.6925 You can verify that U Sy is equal to a to within roundoff error. >>U,S, V=svd(A, 0) %the economy size decomposition is only slightly smaller -0.61050.7174 -0.6646-0.2336 -04308-0.6563 14.9359 05.1883 -0.69250.7214 -0.7214-0.6925 Again, USW is equal to a to within roundoff error ☆ MATLAB >>A=round(10*randn(3) Lec4-4MATLAB Lecture 4 School of Mathematical Sciences Xiamen University http://gdjpkc.xmu.edu.cn Lec44 The eigenvalue decomposition is the appropriate tool for analyzing a matrix when it represents a mapping from a vector space into itself, as it does for an ordinary differential equation. On the other hand, the singular value decomposition is the appropriate tool for analyzing a mapping from one vector space into another vector space, possibly with a different dimension. Most systems of simultaneous linear equations fall into this second category. If A is square, symmetric, and positive definite, then its eigenvalue and singular value decompositions are the same. But, as A departs from symmetry and positive definiteness, the difference between the two decompositions increases. In particular, the singular value decomposition of a real matrix is always real, but the eigenvalue decomposition of a real, nonsymmetric matrix might be complex. >> A =[9 4 6 8 2 7]; >> [U,S,V] = svd(A) %the full singular value decomposition U = 0.6105 0.7174 0.3355 0.6646 0.2336 0.7098 0.4308 0.6563 0.6194 S = 14.9359 0 0 5.1883 0 0 V = 0.6925 0.7214 0.7214 0.6925 You can verify that U*S*V' is equal to A to within roundoff error. >> [U,S,V] = svd(A,0) %the economy size decomposition is only slightly smaller. U = 0.6105 0.7174 0.6646 0.2336 0.4308 0.6563 S = 14.9359 0 0 5.1883 V = 0.6925 0.7214 0.7214 0.6925 Again, U*S*V' is equal to A to within roundoff error. ² MATLAB >> A = round(10*randn(3))