1 / 32

Lecture 11 - LU Decomposition

Lecture 11 - LU Decomposition. CVEN 302 June 26, 2002. Lecture’s Goals. LU Decomposition Doolittle’s technique Cholesky’s technique Pivoting of matrices Tridiagonal Method. LU Decomposition (Doolittle’s method). Matrix decomposition. Doolitte’s method.

marv
Télécharger la présentation

Lecture 11 - LU Decomposition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 11 - LU Decomposition CVEN 302 June 26, 2002

  2. Lecture’s Goals • LU Decomposition • Doolittle’s technique • Cholesky’s technique • Pivoting of matrices • Tridiagonal Method

  3. LU Decomposition (Doolittle’s method) • Matrix decomposition

  4. Doolitte’s method The method alternates from solving from the upper triangular to the lower triangular

  5. General formulation of Doolittle’s The problem is reverse of the Crout’s reduction, starting with the upper triangular matrix and going to the lower triangular matrix.

  6. LU Programs • There are two programs • LU_factor - the program does a Doolittle decomposition of a matrix and returns the L and U matrices • LU_solver uses an L and U matrix combination to solve the system of equations.

  7. Example • The matrix is broken into a lower and upper triangular matrices.

  8. Cholesky’s method The Cholesky decomposition is used on symmetric positive definite matrix: where, lii = uii

  9. Cholesky’s Method The method does not alternate but does it from the diagonal out.

  10. Cholesky’s Method The second row in.

  11. Cholesky’s Method General Method

  12. Cholesky’s Method General Method

  13. Example The matrices can contain imaginary values.

  14. LU Programs • Test program • LU_cholesky_factor - the program does a Cholesky’s decomposition of a matrix and returns the L and U matrices • LU_Solve uses an L and U matrix combination to solve the system of equations.

  15. Tridiagonal Matrix For a banded matrix using Doolittle’s method, i.e. a tridiagonal matrix.

  16. Tridiagonal LU Decomposition The tridiagonal solver first step: The second step:

  17. Tridiagonal LU Decomposition The tridiagonal solver for LU decomposition breaks down into form:

  18. Tridiagonal Example

  19. LU Programs for Tridiagonal Matrices • Test program • [dd,bb]=LU_tridiag(a,d,b) - the program does a decomposition of a tridiagonal matrix and returns the lower diagonal of L and the diagonal of U matrices • x = LU_tridiag_solve(a,dd,b,r) uses the lower diagonal of the L matrix and the diagonal and a vectors of the U matrix combination to solve the system of equations r is the right hand side.

  20. Pivoting of the LU Decomposition • Still need pivoting in LU decomposition • Messes up order of [L] • What to do? • Need to pivot both [L] and a permutation matrix [P] • Initialize [P] as identity matrix and pivot when [A] is pivoted  Also pivot [L]

  21. Pivoting of the LU Decomposition • Permutation matrix [ P ] - permutation of identity matrix [ I ] • Permutation matrix performs “bookkeeping” associated with the row exchanges • Permuted matrix [ P ] [ A ] • LU factorization of the permuted matrix [ P ] [ A ] = [ L ] [ U ]

  22. Permutation Matrix • Bookkeeping for row exchanges • Example: [ P1] interchanges row 1 and 3 • Multiple permutations [ P ]

  23. LU Decomposition with Pivoting Start with No need to consider {b} in decomposition

  24. Forward Elimination Interchange rows 1 & 4 Gaussian elimination of first column Save -mi1in the first column of [L]

  25. Forward Elimination No interchange required Gaussian elimination of second column Save -mi2in the second column of [L]

  26. Forward Elimination Interchange rows 3 &4 Partial pivoting for [L] and [P]

  27. Forward Elimination Gaussian elimination of third column Save -mi3 in third column of [L]

  28. Doolittle LU with Pivoting Gauss elimination with partial pivoting

  29. Doolittle LU with Pivoting Forward substitution Back substitution

  30. LU Pivoting Program • Test program • [L U P]=LU_pivot(A) - the program does a decomposition of a matrix and returns the L and U matrices and P matrix which represents the pivoting problem.

  31. Summary • Setup of the LU decomposition techniques. • Doolittle’s method • Cholesky’s method is for symmetric positive definite matrices • Tridiagonal matrices compression techniques • Pivoting of matrices

  32. Homework • Check the Homework webpage

More Related