






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main Points are:Lu Decomposition, Naïve Gauss Elimination, Elimination Steps, Nonsingular Matrix, Partial Pivoting, Simultaneous Linear Equations, Computational Time, Square Matrix, Clock Cycle Time, Back Substitution
Typology: Exams
1 / 10
This page cannot be seen from the preview
Don't miss anything!







After reading this chapter, you should be able to:
elimination forward elimination steps, one can always write it as
where
Then if one is solving a set of equations [ A ][ X ]= [ C ], then
Let
04.07.2 Chapter 04.
then
and
So we can solve Equation (1) first for [ Z ] by using forward substitution and then use
This is all exciting but LU decomposition looks more complicated than Gaussian elimination. Do we use LU decomposition because it is computationally more efficientthan Gaussian elimination to solve a set of n equations given by [ A ][ X ]=[ C ]?
For a square matrix [ A ] of n × n size, the computational time^1 CT | DE to decompose the [ A ] matrix to (^) [ L ][ U ]form is given by CT | DE = (^) ^83 + 4 2 −^203 T n^3 n n , where T = clock cycle time^2.
CT | FS = T ( 4 n 2 − 4 n )
CT | BS = T ( 4 n 2 + 12 n ) So, the total computational time to solve a set of equations by LU decomposition is CT | LU = CT | DE + CT | FS + CT | BS = T (^) ^83 n^3 + 4 n^2 −^203 n + T ( 4 n^2 − 4 n )+ T ( 4 n 2 + 12 n ) = T ^83 n^3 + 12 n^2 +^43 n
Now let us look at the computational time taken by Gaussian elimination. The computational time CT | (^) FE for the forward elimination part, CT | FE = (^) ^83 + 8 2 −^323 T n^3 n n ,
(^1) The time is calculated by first separately calculating the number of additions, subtractions, multiplications, and divisions in a procedure such as back substitution, etc. We then assume4 clock cycles each for an add, subtract, or multiply operation, and 16 clock cycles for a divide operation as is the case for a typical AMD®-K7 chip. http://www.isi.edu/~draper/papers/mwscas07_kwon.pdf 2 As an example, a 1.2 GHz CPU has a clock cycle of 1 /( 1. 2 × 109 )= 0. 833333 ns
04.07.4 Chapter 04.
= T ^83 n^4 + 12 n^3 +^43 n^2
Clearly for large n , CT | inverse (^) GE >> CT | inverse (^) LU as CT | inverse (^) GE has the dominating terms of n^4 and CT | inverse (^) LU has the dominating terms of n^3. For large values of n , Gaussian elimination method would take more computational time (approximately n / 4 times – prove it) than the LU decomposition method. Typical values of the ratio of the computational time for different values of n are given in Table 1. Table 1 Comparing computational times of finding inverse of a matrix using LU decomposition and Gaussian elimination. n (^) 10 100 1000 10000 CT | inverse (^) GE / CT | inverse (^) LU 3.28 25.83 250.8 2501
Are you convinced now that LU decomposition has its place in solving systems of equations?We are now ready to answer other curious questions such as
If forward elimination steps of the Naïve Gauss elimination methods can be applied on a
n n nn
n
n
a a a
a a a
a a a A
1 2
21 22 2
11 12 1 [ ]
nn
n
n
n n u
u u
u u u
22 2
11 12 1
1 2
21
the end of the forward elimination steps in Naïve Gauss elimination.
Let us look at this using the same example as used in Naïve Gaussian elimination.
LU Decomposition 04.07.
Example 1 Find the LU decomposition of the matrix
Solution
33
22 23
11 12 13 31 32
21 0 0
u
u u
u u u
elimination method, that is
To find 21 and 31 , find the multiplier that was used to make the a (^) 21 and a (^) 31 elements zero in the first step of forward elimination of the Naïve Gauss elimination method. It was
25
To find 32 , what multiplier was used to make a (^) 32 element zero? Remember a (^) 32 element
the second step of forward elimination was
So
Hence
LU Decomposition 04.07.
z 2 (^) == 177177. (^). 22 −− 22 .. 5656 z × (^1106). 8 =− 96. 208 z 3 (^) = 279. 2 − 5. 76 z 1 − 3. 5 z 2
Hence
3
2
1 z
z
z Z
This matrix is same as the right hand side obtained at the end of the forward elimination steps of Naïve Gauss elimination method. Is this a coincidence? Now solve
3
2
1 .
a
a
a
25 a 1 + 5 a 2 + a 3 = 106. 8 − 4. 8 a 2 − 1. 56 a 3 =− 96. 208
a =. = 1. Substituting the value of a 3 in the second equation, − 4. 8 a 2 − 1. 56 a 3 =− 96. 208
a = − + a
Substituting the value of a 2 and a 3 in the first equation, 25 a 1 + 5 a 2 + a 3 = 106. 8 25 a 1 =^106.^8 −^5 a^2 −^ a^3
04.07.8 Chapter 04.
25
Hence the solution vector is
3
2
1 a
a
a
How do I find the inverse of a square matrix using LU decomposition?
How can we use LU decomposition to find the inverse of the matrix? Assume the first
[ b 11 b 12 ...... bn 1 ] Then from the above definition of an inverse and the definition of matrix multiplication
1
21
11 b n
b
b A
2
22
12 b n
b
b A
column of the right hand side being the n columns of the identity matrix. Example 3 Use LU decomposition to find the inverse of
Solution Knowing that
04.07.10 Chapter 04.
7 b 31 = 3. 2 Backward substitution starting from the third equation gives
7 b 31 =^3.^2 = 4. 571
8
b = − + b
b 11 =^1 −^5 b^21 −^ b^31 25
31
21
11 b
b
b
Similarly by solving
32
22
12 b
b
b gives
32
22
12 b
b
b
and solving
33
23
13 b
b
b gives
33
23
13 b
b
b
Hence
Can you confirm the following for the above example?
Key Terms: LU decomposition Inverse