ReviewExample 1. Elementary matrices in action :(a)0 0 10 1 01 0 0a b cd e fg h i=g h id e fa b c(b)1 0 00 1 00 0 7a b cd e fg h i=a b cd e f7g 7h 7i(c)1 0 00 1 03 0 1a b cd e fg h i=a b cd e f3a + g 3b + h 3c + i(d)a b cd e fg h i1 0 00 1 03 0 1=a + 3c b cd + 3f e fg + 3i h i(e)1 0 02 1 00 0 1−1=1 0 0−2 1 00 0 1Armin [email protected] decomposition, continuedGauss ia n elimination revisitedExample 2. Keeping track of the elementary matric es during G aussian elimination on A:A =2 14 −6R2 → R2 − 2R1EA =1 0−2 12 14 −6=2 10 −8Note tha t :A = E−12 10 −8=1 02 12 10 −8We factored A as the product of a lower and upper triangular ma tr ix!We say thatA has triangular factorization.A = LU is known as the LU decompositio n of A.L is lower triangular, U is upper triangular.Definition 3.lower triangular∗ 0 0 0 0 0 0 0∗∗ 0 0∗ ∗∗ 0∗ ∗ ∗∗upper triangular∗ ∗ ∗∗∗ ∗∗∗∗ ∗m issing entries are 0Armin [email protected] 4. Factor A =2 1 14 −6 0−2 7 2as A = LU.Solution. We begin with R2 → R2 − 2R1 followed by R3 → R3 + R1:E1A =1 0 0−2 1 00 0 12 1 14 −6 0−2 7 2E2(E1A) =1 0 00 1 01 0 12 1 10 −8 −2−2 7 2E3E2E1A =1 0 00 1 00 1 12 1 10 −8 −20 8 3=2 1 10 −8 −20 0 1= UThe fa c tor L is given by: no te that E3E2E1A = UA = E1−1E2−1E3−1UL = E1−1E2−1E3−1=12 1111−1 111−1 1=12 1111−1 −1 1=12 1−1 −1 1In conclusion , we found the following LU decomposition of A:2 1 14 −6 0−2 7 2=12 1−1 −1 12 1 1−8 −21Note: Th e extra steps to compute L were unnecessary! The entries in L are preciselythe negatives of the ones in the elementary matrices during elimination. Can you see it?Armin [email protected] we have A = LU , it is simple to sol ve Ax = b.Ax = bL(Ux) = bLc = b and Ux = cBoth of the final systems are triangular and hence easily solved:• Lc = b by forward substitution to find c, and then• Ux = c by backward substitutio n to find x.Important pr actical point: c an be quickly repeated for many differentb.Example 5. Solve2 1 14 −6 0−2 7 2x =410−3.Solution. We a lready found the LU decomposition A = LU :2 1 14 −6 0−2 7 2=12 1−1 −1 12 1 1−8 −21Forward substitutio n to solve Lc = b for c:12 1−1 −1 1c =410−3c =423Backward substitution to solve Ux = c for x:2 1 1−8 −21x =423x =1−13It’s always a good idea to do a quick check:2 1 14 −6 0−2 7 2x =410−3Armin [email protected] factors for any matrixCan we factor any matrixA as A = LU ?Yes, almost! Think about the process of Gaussian elimination.• In each step, we use a pivot to produce zeros below it.The corresponding elementary matrices are l ower diagonal!• The on ly other thing we might have to do, is a row exchange.Namely, if we run into a zer o in the positi on of the pivot.• All of these row excha nges can be do ne at the beginning!Definition 6. A permutation matrix is one that is obtained by performing rowexchanges on an identity matrix.Example 7. E =1 0 00 0 10 1 0is a permutation matrix.EA is the matrix obtained from A by permuting the last two rows.Theorem 8. For any matrix A there is a permutation m atrix P such that PA = LU.In other words, it might not be possible to write A as A = LU , but we only need to permu te therows ofA and the r esu lting matrix P A now has an LU decomposition: P A = L U .Armin [email protected] ce problems• Is2 00 1upper triangular? Lower triangular?• Is0 11 0upper triangular? Lower triangular?• True or false?◦ A permutation matrix is one that is obta ined by performing column exchangeson an identity matrix.• Why do we care a bout LU decomposition if we alr e a dy have Gaussian elimina tion?Example 9. Solve2 1 14 −6 0−2 7 2x =5−29using the factorization we already have.Example 10. The matrixA =0 0 11 1 02 1 0cannot be written as A = LU (so it doesn’t have a LU decomp osition). But there is apermutation ma tr ix P such that PA has a LU decomposition.Namely, letP =0 1 00 0 11 0 0. Then PA =1 1 02 1 00 0 1.PA can now be fact ored as PA = LU . Do it!!(By the way,P =0 0 10 1 01 0 0would work as well.)Armin
View Full Document