LU Decomposition 1. Introduction Another way of solving a system of equations is by using a factorization technique for matrices called LU decomposition.

Slides:



Advertisements
Similar presentations
Method If an nxn matrix A has an LU-factorization, then the solution of AX = b can be determined by a Forward substitution followed by a Back substitution.
Advertisements

E. T. S. I. Caminos, Canales y Puertos1 Engineering Computation Lecture 6.
4/22/ LU Decomposition Electrical Engineering Majors Authors: Autar Kaw Transforming.
4/26/ LU Decomposition Civil Engineering Majors Authors: Autar Kaw Transforming.
Linear Systems LU Factorization CSE 541 Roger Crawfis.
MATH 685/ CSI 700/ OR 682 Lecture Notes
Lecture 7 Intersection of Hyperplanes and Matrix Inverse Shang-Hua Teng.
LU Factorization LU-factorization Matrix factorization Forward substitution Back substitution.
Major: All Engineering Majors Authors: Autar Kaw
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
Chapter 9.1 = LU Decomposition MATH 264 Linear Algebra.
Solution of linear system of equations
Chapter 9 Gauss Elimination The Islamic University of Gaza
Linear Algebraic Equations
Part 3 Chapter 10 LU Factorization PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill Companies,
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 14 Elimination Methods.
ECIV 520 Structural Analysis II Review of Matrix Algebra.
Ordinary least squares regression (OLS)
1 Systems of Linear Equations (Optional) Special Matrices.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
Copyright © Cengage Learning. All rights reserved. 7.6 The Inverse of a Square Matrix.
Chapter 8 Objectives Understanding matrix notation.
Chapter 10 Review: Matrix Algebra
Engineering Analysis ENG 3420 Fall 2009
Scientific Computing Linear Systems – LU Factorization.
Systems and Matrices (Chapter5)
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Copyright © 2011 Pearson, Inc. 7.3 Multivariate Linear Systems and Row Operations.
Chap. 2 Matrices 2.1 Operations with Matrices
G AUSSIAN E LIMINATION Presented by: Max Le Max Le Justin Lavorgna Data Structures II: Algorithm Design & Analysis Algorithm Design & Analysis.
F UNDAMENTALS OF E NGINEERING A NALYSIS Eng. Hassan S. Migdadi Inverse of Matrix. Gauss-Jordan Elimination Part 1.
ΑΡΙΘΜΗΤΙΚΕΣ ΜΕΘΟΔΟΙ ΜΟΝΤΕΛΟΠΟΙΗΣΗΣ 4. Αριθμητική Επίλυση Συστημάτων Γραμμικών Εξισώσεων Gaussian elimination Gauss - Jordan 1.
Chapter 3 Solution of Algebraic Equations 1 ChE 401: Computational Techniques for Chemical Engineers Fall 2009/2010 DRAFT SLIDES.
Lecture 8 Matrix Inverse and LU Decomposition
MECN 3500 Inter - Bayamon Lecture 8 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Chapter 9 Gauss Elimination The Islamic University of Gaza
ECE 530 – Analysis Techniques for Large-Scale Electrical Systems Prof. Hao Zhu Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
1/18/ LU Decomposition Industrial Engineering Majors Authors: Autar Kaw Transforming.
STROUD Worked examples and exercises are in the text Programme 5: Matrices MATRICES PROGRAMME 5.
2.5 – Determinants and Multiplicative Inverses of Matrices.
3/1/ LU Decomposition Computer Engineering Majors Authors: Autar Kaw Transforming.
LEARNING OUTCOMES At the end of this topic, student should be able to :  D efination of matrix  Identify the different types of matrices such as rectangular,
Unit #1 Linear Systems Fall Dr. Jehad Al Dallal.
STROUD Worked examples and exercises are in the text PROGRAMME 5 MATRICES.
Autar Kaw Benjamin Rigsby Transforming Numerical Methods Education for STEM Undergraduates.
2 - 1 Chapter 2A Matrices 2A.1 Definition, and Operations of Matrices: 1 Sums and Scalar Products; 2 Matrix Multiplication 2A.2 Properties of Matrix Operations;
Numerical Methods.  LU Decomposition is another method to solve a set of simultaneous linear equations  For most non-singular matrix [A] that one could.
Numerical Computation Lecture 6: Linear Systems – part II United International College.
Copyright © Cengage Learning. All rights reserved. 8 Matrices and Determinants.
LU Decomposition ● In Gauss elimination; Forward elimination Backward substitution Major computational effort Low computational effort can be used for.
Lecture 2 Matrices Lat Time - Course Overview
ECE 3301 General Electrical Engineering
Spring Dr. Jehad Al Dallal
Linear Equations.
Linear Algebra Lecture 15.
Major: All Engineering Majors Authors: Autar Kaw
Chapter 10.
Chemical Engineering Majors Authors: Autar Kaw
Multiplicative Inverses of Matrices and Matrix Equations
Numerical Computation and Optimization
Part 3 Chapter 10 LU Factorization
Numerical Analysis Lecture10.
Simultaneous Linear Equations
Major: All Engineering Majors Authors: Autar Kaw
LU Decomposition.
Lecture 8 Matrix Inverse and LU Decomposition
Linear Systems of Equations: solution and applications
Major: All Engineering Majors Authors: Autar Kaw
Presentation transcript:

LU Decomposition 1

Introduction Another way of solving a system of equations is by using a factorization technique for matrices called LU decomposition. This factorization is involves two matrices, one lower triangular matrix and one upper triangular matrix. LU factorization methods separate the time-consuming elimination of the matrix [A] from the manipulations of the right-hand-side [b]. Once [A] has been factored (or decomposed), multiple right- hand-side vectors can be evaluated in an efficient manner. 2

LU Decomposition and Where, 3 LU decomposition was originally derived as a decomposition of quadratic and bilinear forms. Lagrange, in the very first paper in his collected works( 1759) derives the algorithm we call Gaussian elimination. Later Turing introduced the LU decomposition of a matrix in 1948 that is used to solve the system of linear equation. Let A be a m × m with nonsingular square matrix. Then there exists two matrices L and U such that, where L is a lower triangular matrix and U is an upper triangular matrix. J-L Lagrange (1736 –1813) A. M. Turing ( )

LU Factorization LU factorization involves two steps: – Factorization to decompose the [A] matrix into a product of a lower triangular matrix [L] and an upper triangular matrix [U]. [L] has 1 for each entry on the diagonal. – Substitution to solve for {x} Gauss elimination can be implemented using LU factorization

LU Decomposition 5 LU Decomposition is another method to solve a set of simultaneous linear equations Which is better, Gauss Elimination or LU Decomposition? To answer this, a closer look at LU decomposition is needed.

Method For most non-singular matrix [A] that one could conduct Naïve Gauss Elimination forward elimination steps, one can always write it as [A] = [L][U] where [L] = lower triangular matrix [U] = upper triangular matrix LU Decomposition 6

How does LU Decomposition work? 7 If solving a set of linear equations If [A] = [L][U] then Multiply by Which gives Remember [L] -1 [L] = [I] which leads to Now, if [I][U] = [U] then Now, let Which ends with and [A][X] = [C] [L][U][X] = [C] [L] -1 [L] -1 [L][U][X] = [L] -1 [C] [I][U][X] = [L] -1 [C] [U][X] = [L] -1 [C] [L] -1 [C]=[Z] [L][Z] = [C] (1) [U][X] = [Z] (2)

LU Decomposition 8 How can this be used? Given [A][X] = [C] 1.Decompose [A] into [L] and [U] 2.Solve [L][Z] = [C] for [Z] 3.Solve [U][X] = [Z] for [X]

When is LU Decomposition better than Gaussian Elimination? To solve [A][X] = [B] Table. Time taken by methods where T = clock cycle time and n = size of the matrix So both methods are equally efficient. 9 Gaussian EliminationLU Decomposition

To find inverse of [A] 10 Time taken by Gaussian Elimination Time taken by LU Decomposition n CT| inverse GE / CT| inverse LU Table 1 Comparing computational times of finding inverse of a matrix using LU decomposition and Gaussian elimination.

Method: [A] Decompose to [L] and [U] 11 [U] is the same as the coefficient matrix at the end of the forward elimination step. [L] is obtained using the multipliers that were used in the forward elimination process

Finding the [U] matrix 12 Using the Forward Elimination Procedure of Gauss Elimination Step 1:

Finding the [U] Matrix 13 Step 2: Matrix after Step 1:

Finding the [L] matrix 14 Using the multipliers used during the Forward Elimination Procedure From the first step of forward elimination

Finding the [L] Matrix 15 From the second step of forward elimination

Does [L][U] = [A]? 16 ?

Using LU Decomposition to solve SLEs 17 Solve the following set of linear equations using LU Decomposition Using the procedure for finding the [L] and [U] matrices

Example 18 Set [L][Z] = [C] Solve for [Z]

Example 19 Complete the forward substitution to solve for [Z]

Example 20 Set [U][X] = [Z] Solve for [X] The 3 equations become

Example 21 From the 3 rd equation Substituting in a 3 and using the second equation

Example 22 Substituting in a 3 and a 2 using the first equation Hence the Solution Vector is:

Finding the inverse of a square matrix 23 The inverse [B] of a square matrix [A] is defined as [A][B] = [I] = [B][A]

Finding the inverse of a square matrix 24 How can LU Decomposition be used to find the inverse? Assume the first column of [B] to be [b 11 b 12 … b n1 ] T Using this and the definition of matrix multiplication First column of [B] Second column of [B] The remaining columns in [B] can be found in the same manner

Example: Inverse of a Matrix 25 Find the inverse of a square matrix [A] Using the decomposition procedure, the [L] and [U] matrices are found to be

Example: Inverse of a Matrix 26 Solving for the each column of [B] requires two steps 1)Solve [L] [Z] = [C] for [Z] 2)Solve [U] [X] = [Z] for [X] Step 1: This generates the equations:

Example: Inverse of a Matrix 27 Solving for [Z]

Example: Inverse of a Matrix 28 Solving [U][X] = [Z] for [X]

Example: Inverse of a Matrix 29 Using Backward Substitution So the first column of the inverse of [A] is:

Example: Inverse of a Matrix 30 Repeating for the second and third columns of the inverse Second ColumnThird Column

Example: Inverse of a Matrix 31 The inverse of [A] is To check your work do the following operation [ A ][ A ] -1 = [ I ] = [ A ] -1 [ A ]

32 Cholesky Decomposition Cholesky died from wounds received on the battle field on 31 August 1918 at 5 o'clock in the morning in the North of France. After his death one of his fellow officers, Commandant Benoit, published Cholesky's method of computing solutions to the normal equations for some least squares data fitting problems published in the Bulletin géodesique in Which is known as Cholesky Decomposition Cholesky Decomposition: If A is a real, symmetric and positive definite matrix then there exists a unique lower triangular matrix L with positive diagonal element such that. Andre-Louis Cholesky

Cholesky Factorization Symmetric systems occur commonly in both mathematical and engineering/science problem contexts, and there are special solution techniques available for such systems. The Cholesky factorization is one of the most popular of these techniques, and is based on the fact that a symmetric matrix can be decomposed as [A]= [U] T [U], where T stands for transpose. The rest of the process is similar to LU decomposition and Gauss elimination, except only one matrix, [U], needs to be stored. 33