You are on page 1of 15

LU Decomposition

Chapter 10

Provides an efficient way to compute matrix inverse by separating the time consuming elimination of the Matrix [A] from manipulations of the right-hand side {B}. Gauss elimination, in which the forward elimination comprises the bulk of the computational effort, can be implemented as an LU decomposition.
Chapter 10 1

LU Decomposition

LU Decomposition is numerically more efficient than Gaussian Elimination Decompose a nonsingular matrix into LU Show how LU Decomposition is used to find matrix inverse

Chapter 10

LU Decomposition
If we have a set of three simultaneous equations, [A]{X} = {B}
Suppose the set of equations could be expressed as an upper triangular system, [U]{X} = {D} u u x d u
0 0
11 12

u22 0

u23 x2 = d 2 u33 x3 d 3

13

Assume that there is a lower diagonal matrix with 1s on the diagonal, [L] 1 0 0

[L] = l21

l31 l32

0 1

If [U]{X} - {D} is premultiplied by [L] the result will be [A]{X} - {B} [L]{ [U]{X}-{D} } = [A]{X} - {B}, if this equation holds [L][U]=[A] and [L]{D}={B}
Chapter 10 3

For any nonsingular matrix [A] on which one can conduct Gauss elimination forward elimination steps, one can also write it is [L][U]=[A] If, L- lower triangular matrix U- upper triangular matrix Then, [A]{X}={B} [A] can be decomposed into two matrices [L] and [U] such that [L][U]=[A] [L][U]{X}={B} Similar to first phase of Gauss elimination, consider [U]{X}={D} [L]{D}={B} [L]{D}={B} is used to generate an intermediate vector {D} by forward substitution Then, [U]{X}={D} is used to get {X} by back substitution.
Chapter 10 4

Decomposition

Forward Substitution

Backward Substitution

Chapter 10

LU decomposition requires the same total manipulations as for Gauss elimination. Saves computing time by separating timeconsuming elimination step from the manipulations of the right hand side. Provides efficient means to compute the matrix inverse

Chapter 10

Chapter 10

a11 a 21 [A] = a31 M an1

a12 a22 a32 M an 2

a13 L a1n 1 0 l 1 a23 L a2 n 21 a33 L a3n = l31 l32 M M O M M an 3 L ann ln1 ln 2

0 0 1 M ln 3

L L L O L

0 u11 u12 0 u 0 22 0 0 0 M M M 1 0 0

u13 u23 u33 M 0

L L L O L

u1n u2 n u3 n M unn

1. The elements of the [U] matrix are exactly the same as the coefficient matrix one obtains at the end of forward elimination steps in Nave Gauss Elimination. 2. The lower triangular matrix [L] has 1 in its diagonal entries. The Non zero elements on the non-diagonal elements in [L] are multipliers that made the corresponding entries zero in the upper triangular matrix [U] during forward elimination.
Chapter 10 8

Example
Find the LU decomposition of the matrix A.

25 [A] = 64 144 1 [A] = l21 l31

1 8 1 12 1 0 0 u11 u12 1 0 0 u22 l32 1 0 0 5

u13 u23 u33

The [U] matrix is the same as found at the end of the forward elimination of gauss Elimination methods.
Chapter 10 9

25 5 1 [A] = 64 8 1 144 12 1

Use Gaussian Elimination to transform the coefficient matrix into an Upper Triangular Matrix

5 1 25 64 0 4 . 8 1 . 56 Row2 Row1 = 25 1 144 12 5 1 25 144 Row3 Row1 = 0 4.8 1.56 25 0 16.8 4.76 5 1 25 16.8 Row3 Row2 = 0 4.8 1.56 4.8 0 0.7 0
Chapter 10

10

To find [L], l21, l31, and l32. What multiplier was used to make the a21 and a31, and a32 element zero. Remember a32 element was made zero in the second step of forward elimination.

5 25 64 Row2 Row1 = 0 4.8 25 144 12 5 25 144 0 4.8 = Row3 Row 1 25 0 16.8 5 25 16.8 0 4.8 Row3 Row = 2 4 . 8 0 0

1 64 1 1.56 ; so l21 = = 2.56 25 1


144 1.56 ; so l31 = = 5.76 25 4.76 1 16.8 1.56; so l32 = = 3.5 4.8 0.7 1
11

Chapter 10

0 0 5 1 25 1 ; [U ] = 0 4.8 1.56 [L] = 2 . 56 1 0 0 0.7 0 5.76 3.5 1


Confirm

[L][U] = [A]
0 0 25 5 1 0 4.8 1.56 1 0 3.5 1 0 0.7 0 5 1 8 1 12 1
Chapter 10 12

1 [L][U ] = 2.56 5.76 25 = 64 144

Example
Find the LU decomposition to solve the following simultaneous linear equations.

25 5 1 x1 106.8 64 8 1 x = 177.2 2 144 12 1 x3 279.2

In the previous example we found [L] and [U]

0 0 5 1 1 25 ; [U ] = 0 4.8 1.56 [L] = 2 . 56 1 0 0 0.7 5.76 3.5 1 0

Chapter 10

13

First we solve for [Z]

[L][Z ] = [C ]
0 0 z1 106.8 1 2.56 1 0 z = 177.2 2 5.76 3.5 1 z3 279.2

2.56z1 + z 2 = 177.2 z 2 = 96.21 5.76z1 + 3.5 z 2 + z3 = 279.2 z3 = 0.735


z1 106.8 = 96.21 [Z ] = z 2 0.735 z3
Chapter 10 14

z1 = 106.8

Now we solve for [x]

[U ][X ] = [Z ]
0.735 x3 = = 1.050 0.7

5 1 x1 106.8 25 0 4.8 1.56 x = 96.21 2 0 0.7 0 x3 0.375

96.21 + 1.56 x3 x2 = = 19.70 4.8


x1 0.290 [X ] = x2 = 19.70 x3 1.050
15

106.8 5 x2 x3 = 0.29 x1 = 25

Chapter 10

You might also like