Vous êtes sur la page 1sur 4

Department of Electrical and Electronic Engineering

Bangladesh University of Engineering and Technology


EEE 424: Numerical Methods Laboratory
Experiment 2 # LU decomposition
Introduction:
One way to solve a system of linear equations is to use LU decomposition. This is a direct
method of solving as it transforms the original equations into equivalent equations (equations
having the same roots) that can be solved more easily.
It is possible to show that any square matrix A can be expressed as a product of a lower
triangular matrix L and an upper triangular matrix U:

The process of computing L and U for a given A is known as LU decomposition or LU


factorization. LU decomposition is not unique (the combinations of L and U for a prescribed A
are endless), unless certain constraints are placed on L or U. These constraints distinguish one
type of decomposition from another. Three commonly used decompositions are listed in Table 1.

Name
Doolittle s decomposition
Crout s decomposition
Choleski s decomposition

Constraints
Lii = 1, i = 1, 2,..., n
Uii = 1, i = 1, 2,..., n

After decomposing A, it is easy to solve the equations Ax = b. We rst rewrite the equations as
LUx = b. Upon using the notation Ux = y, the equations become
Ly = b,
which can be solved for y by forward substitution. Then
Ux = y
will yield x by the back substitution process.

The advantage of LU decomposition over the Gauss elimination method is that once A is
decomposed, we can solve Ax = b for as many constant vectors b as we please. The cost of each
additional solution is relatively small, since the forward and back substitution operations are
much less time consuming than the decomposition process.

Page 1 of 4

Doolittles Decomposition Method


Decomposition phase Doolittles decomposition is closely related to Gauss elimination. In order
to illustrate the relationship, consider a 3 3 matrix A and assume that there exist triangular
matrices
[

such that A = LU. After completing the multiplication on the right hand side, we get

Method to find U from A:


1. Apply Gausss elimination choosing the first row as the pivot row. The result will be:

2. Take the 2nd row as pivot row now. The result will be:

3. You can store the multipliers in the lower triangular portion of the coefcient matrix,
replacing the coefcients as they are eliminated. The final form can be like this:

Solution Phase Now solve Ly = b by forward substitution. The scalar form of the equations is:

Page 2 of 4

Solving them yields:

The back substitution phase for solving Ux = y to find x is identical to that used in the Gauss
elimination method.

Exercise:
1. Solve the equations Ax = b by Doolittle s decomposition method, where

2. Find the LU decomposition of the matrix

] . You may have to use

reordering.

Report:
1. A Hilbert matrix is an ill-conditioned matrix.

Write a program that specializes in solving the equations Ax = b by Doolittles


Decomposition method, where A is the Hilbert matrix of arbitrary size n n, and

Page 3 of 4

2. For any set of equations compare the time needed for solving using LU decomposition
and A-1. Comment on the faster method.

Prepared By:

Fariah Hayee
Lecturer,
Dept. of EEE, BUET
Date: 18-11-2013

Page 4 of 4

Vous aimerez peut-être aussi