0% found this document useful (0 votes)
68 views29 pages

Numerical Solution of Linear Systems: Gauss Elimination Method LU Decomposition

The document discusses numerical methods for solving systems of linear equations. It describes direct methods, including Gaussian elimination and LU decomposition. Gaussian elimination uses row operations to convert the coefficient matrix into upper triangular form. LU decomposition factors the coefficient matrix A into the product of a lower triangular matrix L and upper triangular matrix U. The document provides examples of LU decomposition using Doolittle, Crout, and Cholesky methods. It also shows how to use LU decomposition to solve linear systems.

Uploaded by

shajiaikram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views29 pages

Numerical Solution of Linear Systems: Gauss Elimination Method LU Decomposition

The document discusses numerical methods for solving systems of linear equations. It describes direct methods, including Gaussian elimination and LU decomposition. Gaussian elimination uses row operations to convert the coefficient matrix into upper triangular form. LU decomposition factors the coefficient matrix A into the product of a lower triangular matrix L and upper triangular matrix U. The document provides examples of LU decomposition using Doolittle, Crout, and Cholesky methods. It also shows how to use LU decomposition to solve linear systems.

Uploaded by

shajiaikram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Numerical Solution of Linear Systems

Direct Method
1. Gauss Elimination Method
2. LU Decomposition
Linear Systems
a11x1  a12 x2  a13 x3    b1
a21x1  a22 x2  a23 x3    b2
a31x1  a32 x2  a33 x3    b3

 a11 a12 a13   x1   b1 


    
a21 a22 a23   x2  b2 
a     
a32 a33  x3 b3
 31    
          
Ax=b
Linear Systems

• Solve Ax=b, where A is an nn matrix and


b is an n1 column vector
• Can also talk about non-square systems where
A is mn, b is m1, and x is n1
– Overdetermined, dependent, no solution if m>n:
“more equations than unknowns”
– Underdetermined, infinitely many solutions if n>m:
“more unknowns than equations”
– Independent, single unique solution if n=m:
“equal unknowns and equations”
Gauss Elimination Method
Do by yourself. . .
Solve the following system of equations using
Gaussian elimination processes
4𝑥1 − 4𝑥2 − 3𝑥3 + 7𝑥4 = 1.3
8𝑥1 − 3𝑥2 − 8𝑥3 + 17𝑥4 = 6.6
12𝑥1 − 12𝑥2 − 16𝑥3 + 29𝑥4 =-2.1
−8𝑥1 + 33𝑥2 − 25𝑥3 + 36𝑥4 = 10.4

Do by yourself. . .
Direct Method

• The motivation for an LU decomposition is based


on the observation that systems of equations
involving triangular coefficient matrices are easier
to deal with.
• Indeed, the whole point of Gaussian Elimination is
to replace the coefficient matrix with one that is
triangular.
• The LU decomposition is another approach
designed to exploit triangular systems.
Introduction
• Matrices can be decomposed or factored into the
product of two other matrices in many number of ways
• One way to decompose A is:
A = LU
where L is a lower triangular and U an upper triangular
matrices.
• Specifying the diagonal elements of either L or U makes
factoring unique.
• There are three methods: Doolittle, Crout, Cholesky
LU-Decomposition

• A non-singular ( 𝐴 ≠ 0) square matrix A can be


replaced by the product of lower and upper triangular
matrices.
• That’s why this processes is known as LU-
Decomposition.
– Find a way of writing A as LU, where L and U are both
triangular, Ax=b, put A=LU
 LUx=b put y=Ux
Ly=b  Ux=y
Do-little Method

• Perform decomposition

 a11 a12 a13   1 0 0  u11 u12 u13 


a a a   l 1 0   0 u u 
 12 22 23   21  22 23 

a13 a23 a33  l31 l32 1   0 0 u33 

• Ax=b  LUx=b  Ly=b  Ux=y


Do-little Method

• Compute L and U for the following coefficient


matrix A
Do-little Method
Do-little Method
Do-little Method
Crout Method

• For symmetric matrices, choose U=LT


• Perform decomposition

 a11 a12 a13  l11 0 0  1 u12 u13 


a a22 a23   l21 l22 0  0 1 u 23 
 12
 a13 a23 a33  l31 l32 l33  0 0 1 

• Ax=b  LUx=b  Ly=b  Ux=y


Crout Method

• Find L and U for the following augmented


matrix A
Crout Method
Crout Method
Crout Method
Using LU decomposition to solve systems of
equations
• Once a matrix A has been decomposed into lower and upper
triangular parts it is possible to obtain the solution to AX = B in a
direct way.
• The procedure can be summarized as follows:
1. Given A, find L and U so that
2. A = LU.
3. AX=B, hence LUX = B.
4. Let D = UX so that LD = B.
5. Solve this triangular system for D .
6. Finally solve the triangular system UX = D for X.

• The benefit of this approach is that we only ever need to solve


triangular systems. The cost is that we have to solve two of them.
Solve the following linear system using LU
Decomposition.
Solve the following linear system using Crout
method
Solve the following linear system using Crout
method
Solve the following linear system using Crout
method
Solve the following linear system using Crout
method
Solve the following linear system using Crout
method
Solve the following linear system using Crout
method
Cholesky Decomposition

• For symmetric matrices, choose U=LT


• Perform decomposition
 a11 a12 a13  l11 0 0  l11 l21 l31 
    
a12 a22 a23   l21 l22 0  0 l22 l32 
a a33  l31 l33   0 l33 
 13 a23 l32 0

• Ax=b  LLTx=b  Ly=b  LTx=y


Cholesky Decomposition

 a11 a12 a13  l11 0 0  l11 l21 l31 


    
a12 a22 a23   l21 l22 0  0 l22 l32 
a a33  l31 l33   0 l33 
 13 a23 l32 0
l11  a11  l11  a11
2

a12
l11l21  a12  l21 
l11
a13
l11l31  a13  l31 
l11
l21  l22  a22  l22  a22  l21
2 2 2

a23  l21l31
l21l31  l22l32  a23  l32 
l22
Cholesky Decomposition

• This fails if it requires taking square root of a


negative number
• Need another condition on A: positive definite

For any v, vT A v > 0

(Equivalently, all positive eigenvalues)

You might also like