You are on page 1of 2

Let A = (aij ) be a n-by-n matrix. The LU factorization can be done by the following procedure: 1. Set A(0) = A.

(k1) = Lk A , where Lk = 1 ... 1 lk+1,k 1 . .. . . . lnk for k = 1, . . . , n 1. 3. A = L1 . . . L1 A(n1) = LU , where U = A(n1) . 1 n1 Here we assume akk is non-zero for all k. We will relax this assumption later. In step 3, L is written as the products of L1 . In fact, there is no need to compute the i matrix multiplications; L can be constructed directly from lij . First we note that if each lij in Lj is replaced by lij , we get L1 . Second, Li Lj = j Li + Lj I for i < j, where I is the identity matrix. This is to say that applying Li before Lj does not aect the non-zero entries of Lj for i < j; the lk,i s are simply added to the i-th column of Lj below the diagonal. As noted in the rst point, the same conclusion hold for the inverse of Li . That is, L1 L1 can be simply constructed i j by putting all the lk,i from L1 to the k,i-th entry of L1 if i < j. i j With the above observations, we can construct L directly 1 l21 the ij-th entry of the identity matrix. That is, L = l31 . . .
(k1) (k1)

and ljk = 1
ajk
(k1)

2. A(k)

(k1) akk

by putting all the lij s into 1 l32 . . . 1 . . . . ... ... 1

ln1 ln2 ln3

When akk = 0, we need to permute the k-th rows with some lower row such that (k1) its k-th column is non-zero. If we permute the rows of A rst so that akk = 0, then we can factorize P A = LU directly using the algorithm above, where P is a suitable permutation matrix. However, there is no way to know which permutation to apply before we factorize A. Is there a easy way to get the lower triangular matrix L of P A = LU ? To answer this question, we rewrite the algorithm to handle the problem (k1) of akk = 0: 1. Set A(0) = A. 2. A(k) = Lk Pk A(k1) , where Lk is dened as before and Pk is a permutation matrix (k1) such that the k-th row of A(k1) will be permuted whenever akk is zero. 1

T T 3. A = P1 L1 . . . Pn1 L1 A(n1) , and Pn1 . . . P1 A = P A = LU . 1 n1 T T Now L = Pn1 . . . P2 P1 P1 L1 P2 L1 . . . L1 . How do we get L without multiplying 1 2 n1 all the permutation and lower triangular matrices? Of course the permutation matriT T ces P1 and P1 in the middle cancelled each other out. For P2 L1 P2 , the permutation 1 matrix P1 on the left swap the second row of L1 with some lower i-th rows, and the 1 T right permutation matrix P1 swap the second column of L1 with the i-th column. 1 The result is l21 and li1 of L1 are swapped while the ones on the diagonal remains 1 T 1 1 2 T intact. Denote P2 L1 P2 by L1 , we proceed to calculate P3 L1 L1 P3 . Recall that 1 when Li acts on the left of Lj , the non-zero entries of Lj are not aected by Li if i < j. Therefore we may simply replace the rst column of L1 by the rst column 2 1 1 2 1 2 of L1 to get L1 L1 , and permute the third row of L1 L1 by P3 as discussed before. Continue this process until we get L. There is no need to perform any matrix multiplications.

The procedure of constructing the lower triangular matrix L with permutation is summarized as follows:
T 1 1. L1 = P2 L1 P2 . 1 T 2. L1 = Pk+1 L1 L1 Pk+1 . Note that this step can be easily done by swapping k k1 k rows of the lower triangular part of L1 according to P2 ; there is no need to 1 T swap the entire row because the permutation matrix Pk+1 on the right will put the ones back to the diagonal.

n2 n1 3. L = L1 L1 . reference: LU decomposition (Wikipedia); Linear Algebra and Its Applications by Gilbert Strang.

You might also like