Engineering Analysis ENG 3420 Fall 2009Lecture 18The inverse of a square Canonical base of an n-dimensional vector spaceMatrix Inverse (cont)The response of a linear systemLU FactorizationGauss Elimination as LU FactorizationCholesky FactorizationEngineering Analysis ENG 3420 Fall 2009Dan C. MarinescuOffice: HEC 439 BOffice hours: Tu-Th 11:00-12:0022Lecture 18Lecture 18 Last time: Linear algebra functions in Matlab Vector products Tensor product of two matrices Norm and matrix condition number Characteristic equation, eigenvectors, eigenvalues Today: Midterm: solutions and discussions More on characteristic equation, eigenvectors, eigenvalues The inverse of a matrix More on LU Factorization Cholesky decomposition Next Time (Chapter 12) Gauss-SiedelThe inverse of a square If [A] is a square matrix, there is another matrix [A]-1, called the inverse of [A], for which [A][A]-1=[A]-1[A]=[I] The inverse can be computed in a column by column fashion by generating solutions with unit vectors as the right-hand-side constants:A[]x1{}=100⎧ ⎨ ⎪ ⎩ ⎪ ⎫ ⎬ ⎪ ⎭ ⎪ A[]x2{}=010⎧ ⎨ ⎪ ⎩ ⎪ ⎫ ⎬ ⎪ ⎭ ⎪ A[]x3{}=001⎧ ⎨ ⎪ ⎩ ⎪ ⎫ ⎬ ⎪ ⎭ ⎪ A[]−1= x1x2x3[]Canonical base of an n-dimensional vector space100……000010……000001……000…………….000…….100000…….010000…….001Matrix Inverse (cont) LU factorization can be used to efficiently evaluate a system for multiple right-hand-side vectors - thus, it is ideal for evaluating the multiple unit vectors needed to compute the inverse.The response of a linear system The response of a linear system to some stimuli can be found using the matrix inverse.Interactions[]response{}=stimuli{}sArIAAsAArAsAr1111−−−−====LU Factorization LU factorization involves two steps: Decompose the [A] matrix into a product of: a lower triangular matrix [L] with 1 for each entry on the diagonal. and an upper triangular matrix [U Substitution to solve for {x} Gauss elimination can be implemented using LU factorization The forward-elimination step of Gauss elimination comprises the bulk of the computational effort. LU factorization methods separate the time-consuming elimination of the matrix [A] from the manipulations of the right-hand-side [b].Gauss Elimination as LU Factorization To solve [A]{x}={b}, first decompose [A] to get [L][U]{x}={b} MATLAB’s lu function can be used to generate the [L] and [U] matrices:[L, U] = lu(A) Step 1 Æ solve [L]{y}={b}; {y} can be found using forward substitution. Step 2Æ solve [U]{x}={y}, {x} can be found using backward substitution. In MATLAB:[L, U] = lu(A)d = L\bx = U\d LU factorization Æ requires the same number of floating point operations (flops) as for Gauss elimination. Advantage Æ once [A] is decomposed, the same [L] and [U] can be used for multiple {b} vectors.Cholesky Factorization A symmetric matrix Æ a square matrix, A, that is equal to its transpose:A = AT(T stands for transpose). The Cholesky factorization Æ based on the fact that a symmetric matrix can be decomposed as:[A]= [U]T[U] The rest of the process is similar to LU decomposition and Gauss elimination, except only one matrix, [U], needs to be stored. Cholesky factorization with the built-in chol command:U = chol(A) MATLAB’s left division operator \ examines the system to see which method will most efficiently solve the problem. This includes trying banded solvers, back and forward substitutions, Choleskyfactorization for symmetric systems. If these do not work and the system is square, Gauss elimination with partial pivoting is
View Full Document