0% found this document useful (0 votes)
51 views13 pages

LU Factorization and Guess Elimination: by Zeinab Mahdi

1) Gaussian elimination is an efficient method to solve systems of linear equations. It involves rewriting the system in matrix form and then performing row operations to convert the matrix into upper triangular form. 2) LU factorization involves decomposing a matrix A into the product of a lower triangular matrix L and an upper triangular matrix U. This allows systems of equations Ax=b to be solved using back substitution in two steps: first solving Lc=b, then solving Ux=c. 3) Not all matrices can be decomposed into LU form. For example, the 2x2 matrix with entries [0,1;1,1] does not have an LU factorization because its structure violates the triangular constraints

Uploaded by

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

LU Factorization and Guess Elimination: by Zeinab Mahdi

1) Gaussian elimination is an efficient method to solve systems of linear equations. It involves rewriting the system in matrix form and then performing row operations to convert the matrix into upper triangular form. 2) LU factorization involves decomposing a matrix A into the product of a lower triangular matrix L and an upper triangular matrix U. This allows systems of equations Ax=b to be solved using back substitution in two steps: first solving Lc=b, then solving Ux=c. 3) Not all matrices can be decomposed into LU form. For example, the 2x2 matrix with entries [0,1;1,1] does not have an LU factorization because its structure violates the triangular constraints

Uploaded by

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

LU factorization and Guess

elimination

By zeinab mahdi
2.1- Gaussian elimination.

 A system of two equations in two unknowns can be considered in terms either of algebra or
of geometry.
 Benefits :
a- The geometric view: is very helpful for visualizing solutions of systems,
b- but for computing the solution with a great deal of accuracy we return to algebra.

The method known as Gaussian elimination is an efficient


So
way to solve n equations in n unknowns.
ex : Use Gaussian elimination to solve the systems:
x +y − z =−2
2x - y + z = 5
−x +2 y +2z =1
In order to solve
1- write them in a metrix : 1 1 -1 ¦ -2 this matrix we
2 -1 1¦ 5 should convert the
circled numbers
-1 2 2¦ 1 into zero
2- add R1+ R3 into row 3
1 1 -1 ¦ -2
2 -1 1 ¦5
0 3 1¦ -1
3- for row 2 I use this equation : R2-2R1

1 1 -1 ¦ -2
0 -3 3 ¦ 9
0 3 1 ¦ -1
4- R3= R2+R3 ( in order to eliminate 3 )
1 1 -1 ¦ -2
0 -3 3 ¦ 9
0 0 4 ¦ 8
5- for row 2 : multiply -1/3
for row 3 : multiply -1/4

1 1 -1 ¦ -2 Then the system is :


X=1
0 1 -1 ¦-3 X+y-z=-2
Y=-1
Y-z=-3
0 0 1 ¦2 Z=2
Z=2
 “naive’’ method will be introduced to solve problem.
 Three useful operations can be applied to a linear system of equations that yield an
equivalent system
 (1) Swap one equation for another.
 (2) Add or subtract a multiple of one equation from another.
 (3) Multiply an equation by a nonzero constant.

 Ex: x+y=3
-7y=-7 therefore y =1 and x=2
The same method can be done inside matrix :
1 1 ¦ 3
1 1 ¦ 3
3 -4 ¦ 2 Subtracte3*R 0 -7 ¦ -7
1 from R2
LU Factorization

 An n × n matrix is said to be upper triangular if aij = 0 for i > j and lower triangular if aij =
0 for i < j. Also A is said to be triangular if it is either upper triangular or lower triangular.
To clear idea lets take an example :
 Find a matrix into L and U
A= 2 2 3 0 0
5 9 10 = 0 + 0
4 1 2 0 0

We are not allowed to


swipe rows / multiply/
simplify we are just L U
allowed to replace Ri by
Ri-KRj
2 2 3 2 2 3
R2-(5/2)R1 0 4 2.5 R3+3/4R2 0 4 2.5
R3-2R1 0 -3 -4 0 0 -17/8

L 1 0 0
2.5 1 0
2 -3/4 1

1 0 0 2 2 3
2.5 1 0 0 4 2.5
A=LU = 2 -3/4 1 0 0 -17/8
Back substitution and LU factorization
 Once L and U are known, the problem Ax = b can be written as LUx = b. Define a
new “auxiliary’’ vector c = Ux. Then back substitution is a two-step procedure:
(a) Solve Lc = b for c.
(b) Solve Ux = c for x.
Example to understand:

1 1 -1 x1 4 AS we said Ax=b substitute


Lux=b
1 -2 3 x2 = -6 Let Ux=c
2 3 1 x3 7 Lc=B and Ux=c

Ax=B
We need to find L and U such that A=LU
-1R1+R2= 1 -1 1 -2R1+R3 1 -1 1 1/3R2+R3 1 -1 1
0 -3 4 0 -3 4 0 -3 4 U
2 3 1 0 1 3 0 0 13/3

And L= 1 0 0 4/3+
The red 9/3=
numbers are 1 1 0 Now solve Lc=B then Ux=c 13/3
the opposite
of the
coefficient 2 -1/3 1

4 Where C1 =4 then 4+c2=-6 thus C2=-10


1 0 0 C1 C1+ C2=-6
1 1 0 C2 = -6
7 2C1-1/3C2+c3=7 2*4-1/3(-10)+c3=7
2 -1/3 1 C3 thus C3=-13/3

L C B
Now solve Ux=c

1 1 -1 x1 4
0 -3 4 x2 = -10 x3= -13/3
0 0 -13/3 x3 -13/3 -3x2+4(-13/3)=-10 then x2=2
thus x1=1
2.2.3 Complexity of LU factorization
A square matrix is said to have an LU decomposition (or LU factorization) if it can
be written as the product of a lower triangular (L) and an upper triangular (U) matrix
Example : Prove that A = 0 1
1 1 does not have an LU factorization

1- the matrix is not lower triangular


If we write it as LU ( L lower triangular and U is upper triangular )
L= L1 0 and U= u1 u4
L2 L3 0 u3 by matrix composition we conclude that
A1=L1*U1=0 so it must be L1=0 or U1=0
Suppose that L1=0 then A4= L1*U3 this will imply that A4=0#1
And if we suppose that L2=0 then A3=L3*U1 this will imply that A2=0#1
As we conclude that A doesn’t have LU factorization

You might also like