Tutorial 9
Tutorial 9
1. LU Factorization
2. Permutation
PAGE 2
The LU Factorization
▪ A factorization of a matrix 𝐴 is an equation that expresses 𝐴 as a product of two or more
matrices.
▪ Assume that 𝐴 is an 𝑛 × 𝑛 matrix that can be row reduced to echelon form, without row
interchanges. Then, 𝐴 can be written in the form 𝐴 = 𝐿𝑈. Such a factorization is called an
LU Factorization.
▪ 𝐿 is an n × 𝑛 lower triangular matrix with 1’s on the diagonal. 𝐿 is invertible and is called a
unit lower triangular matrix.
▪ 𝑈 is an 𝑛 × 𝑛 echelon form of 𝐴.
1 0 0 0 ∎ ∗ ∗ ∗
1 0 0 0 ∎ ∗ ∗
▪ A= ∗
∗ ∗ 1 0 0 0 ∎ ∗
∗ ∗ ∗ 1 0 0 0 ∎
PAGE 3
Why LU Factorization is useful?
▪ When 𝐴 = 𝐿𝑈, the equation 𝐴𝒙 = 𝒃 can be written as 𝐿 𝑈𝒙 = 𝒃. Written y for 𝑈𝒙, we can
find 𝒙 by solving the pair of equations
𝐿𝒚 = 𝒃
𝑈𝒙 = 𝒚
PAGE 4
Problem 1
3 −7 −2 2 1 0 0 0 3 −7 −2 2
−3 5 1 0 −1 1 0 0 0 −2 −1 2 =LU
▪ A= =
6 −4 0 −5 2 −5 1 0 0 0 −1 1
−9 5 −5 12 −3 8 3 1 0 0 0 −1
−9
5
Use this LU factorization of 𝐴 to solve 𝐴𝒙 = 𝒃, where 𝒃 =
7
11
PAGE 5
An LU Factorization Algorithm
▪ Suppose 𝐴 can be reduced to an echelon form 𝑈 using only row replacements that add a
multiple of one row to another row below it. In this case, there exist unit lower triangular
elementary matrices 𝐸1 … . 𝐸𝑝 such that
𝐸𝑝 … . 𝐸1 𝐴 = 𝑈
Then
−1
𝐴 = 𝐸𝑝 … . 𝐸1 𝑈 = 𝐿𝑈
Where
−1
𝐿 = 𝐸𝑝 … . 𝐸1
PAGE 6
Book-Keeping method to calculate L and U
▪ The row operations appear in L without interfering with each other.
▪ We can recover row operation coefficients in the entries for U that we know are zero.
▪ Book-Keeping requires row operations like 𝑅𝑗 + 𝑘𝑅𝑖 → 𝑅𝑗 in which 𝑖 < 𝑗 and there is no
factor in front of the 𝑅𝑗 because the diagonal elements of L all are 1.
PAGE 7
Problem 2
Solve the equation 𝐴𝒙 = 𝒃 by using the LU factorization.
3 −7 −2 −7
𝐴 = −3 5 1 ,𝒃 = 5
6 −4 0 2
PAGE 8
Problem 3
Solve the equation 𝐴𝒙 = 𝒃 by using the LU factorization.
2 −2 4 0
𝐴 = 1 −3 1 , 𝒃 = −5
3 7 5 7
PAGE 9
Permutation
▪ If in making echelon form of matrix 𝐴 we have to use “interchange operation”, we need to
use permutation method.
▪ PA=LU which P is called permutation matrix.
PAGE 10
Problem 4
Find the LU factorization for matrix A.
2 −3 4
𝐴 = 2 −3 4
0 −1 1
PAGE 11
Permutation (continue)
▪ Why
Note: If you are solving 𝐴𝑥 = 𝑏 and have a permuted LU-factorization, remember to
change the vector b into Pb:
𝐴𝒙 = 𝒃 ≫ 𝑃𝐴𝒙 = 𝑃𝒃 ≫ 𝐿𝑈𝒙 = 𝑃𝒃
▪ When
PAGE 12
Permutation LU factorization algorithm
Strict/Partial pivoting
▪ Consider the potential pivots and choose one with the largest absolute value.
▪ Apply a permutation to move that row to the proper location.
▪ Do this at every step in Gaussian elimination.
PAGE 13
Problem 5
Solve the equation 𝐴𝒙 = 𝒃 by using permuted LU factorization.
4 3 −5 2
𝐴 = −4 −5 7 , 𝒃 = -4
8 6 −8 6
PAGE 14
Problem 6*
PAGE 15