Chapter 12 Gaussian Elimination (II) Speaker: Lung-Sheng Chien Reference book: David Kincaid, Numerical Analysis Reference lecture note: Wen-wei Lin, chapter.

Slides:



Advertisements
Similar presentations
Chapter 28 – Part II Matrix Operations. Gaussian elimination Gaussian elimination LU factorization LU factorization Gaussian elimination with partial.
Advertisements

Chapter 2 Solutions of Systems of Linear Equations / Matrix Inversion
Chapter 11 Gaussian Elimination (I)
Linear Systems LU Factorization CSE 541 Roger Crawfis.
Chapter 13 Gaussian Elimination (III) Bunch-Parlett diagonal pivoting
MATH 685/ CSI 700/ OR 682 Lecture Notes
Scientific Computing Linear Systems – Gaussian Elimination.
Lecture 7 Intersection of Hyperplanes and Matrix Inverse Shang-Hua Teng.
LU Factorization LU-factorization Matrix factorization Forward substitution Back substitution.
Systems of Linear Equations
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
CISE301_Topic3KFUPM1 SE301: Numerical Methods Topic 3: Solution of Systems of Linear Equations Lectures 12-17: KFUPM Read Chapter 9 of the textbook.
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.
Linear Systems Pivoting in Gaussian Elim. CSE 541 Roger Crawfis.
Speaker: Lung-Sheng Chien
Solution of linear system of equations
Chapter 9 Gauss Elimination The Islamic University of Gaza
Major: All Engineering Majors Author(s): Autar Kaw
Lecture 11 - LU Decomposition
Chapter 2, Linear Systems, Mainly LU Decomposition.
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,
Chapter 15 C-implementation PA = LU Speaker: Lung-Sheng Chien.
Lecture 15 Recursive and Iterative Formula for Determinants Shang-Hua Teng.
1cs542g-term Notes  Note that r 2 log(r) is NaN at r=0: instead smoothly extend to be 0 at r=0  Schedule a make-up lecture?
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 17 Solution of Systems of Equations.
ECIV 520 Structural Analysis II Review of Matrix Algebra.
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 4 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
Chapter 17 C-implementation PAP’ = LDL’ Speaker: Lung-Sheng Chien Reference: [1] H. M. Deitel, P. J. Deitel, C++ How to Program 5-th edition.
Mujahed AlDhaifallah (Term 342) Read Chapter 9 of the textbook
LU Decomposition 1. Introduction Another way of solving a system of equations is by using a factorization technique for matrices called LU decomposition.
Scientific Computing Linear Systems – LU Factorization.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
MA2213 Lecture 5 Linear Equations (Direct Solvers)
Introduction to Numerical Analysis I MATH/CMPSC 455 PA=LU.
ΑΡΙΘΜΗΤΙΚΕΣ ΜΕΘΟΔΟΙ ΜΟΝΤΕΛΟΠΟΙΗΣΗΣ 4. Αριθμητική Επίλυση Συστημάτων Γραμμικών Εξισώσεων Gaussian elimination Gauss - Jordan 1.
MA/CS 375 Fall MA/CS 375 Fall 2003 Lecture 19.
Chapter 3 Solution of Algebraic Equations 1 ChE 401: Computational Techniques for Chemical Engineers Fall 2009/2010 DRAFT SLIDES.
EE616 Dr. Janusz Starzyk Computer Aided Analysis of Electronic Circuits Innovations in numerical techniques had profound import on CAD: –Sparse matrix.
 6.2 Pivoting Strategies 1/17 Chapter 6 Direct Methods for Solving Linear Systems -- Pivoting Strategies Example: Solve the linear system using 4-digit.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 21.
Lecture 8 Matrix Inverse and LU Decomposition
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 9 Linear Systems of Equations: Gauss Elimination.
Direct Methods for Sparse Linear Systems Lecture 4 Alessandra Nardi Thanks to Prof. Jacob White, Suvranu De, Deepak Ramaswamy, Michal Rewienski, and Karen.
Direct Methods for Linear Systems Lecture 3 Alessandra Nardi Thanks to Prof. Jacob White, Suvranu De, Deepak Ramaswamy, Michal Rewienski, and Karen Veroy.
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 Chapter 7 Numerical Methods for the Solution of Systems of Equations.
Linear Systems Dinesh A.
Gaoal of Chapter 2 To develop direct or iterative methods to solve linear systems Useful Words upper/lower triangular; back/forward substitution; coefficient;
Unit #1 Linear Systems Fall Dr. Jehad Al Dallal.
Autar Kaw Benjamin Rigsby Transforming Numerical Methods Education for STEM Undergraduates.
Numerical Computation Lecture 6: Linear Systems – part II United International College.
1 Numerical Methods Solution of Systems of Linear Equations.
Matrices IB Mathematics SL. Matrices Describing Matrices Adding Matrices.
PIVOTING The pivot or pivot element is the element of a matrix, or an array, which is selected first by an algorithm (e.g. Gaussian elimination, simplex.
Chapter 2, Linear Systems, Mainly LU Decomposition
Spring Dr. Jehad Al Dallal
Linear Equations.
Linear Systems, Mainly LU Decomposition
MA/CS 375 Spring 2002 Lecture 19 MA/CS 375 Fall 2002.
RECORD. RECORD Gaussian Elimination: derived system back-substitution.
Numerical Analysis Lecture14.
Part 3 Chapter 10 LU Factorization
Numerical Analysis Lecture10.
Major: All Engineering Majors Authors: Autar Kaw
Lecture 8 Matrix Inverse and LU Decomposition
Linear Systems of Equations: solution and applications
Presentation transcript:

Chapter 12 Gaussian Elimination (II) Speaker: Lung-Sheng Chien Reference book: David Kincaid, Numerical Analysis Reference lecture note: Wen-wei Lin, chapter 2, matrix computation

OutLine Weakness of A=LU - erroneous judgment: A is invertible but A=LU does not exist - unstable, A is far from LU A=LU versus PA=LU Pivoting strategy Implementation of PA=LU MATLAB usage

Fail of LU: singular of leading principal minor Question: How about interchanging row 1 and row 2? and

unstable of LU: near singular of leading principal minor [1] ? Theoretical: Numerical: ifthen Problem: for double-precision, we only have 16 digit-accuracy, we cannot accept, why?

backward substitution step 1: step 2: Question: why not due to rounding error unstable of LU: near singular of leading principal minor [2]

Case 1:Case 2: unstable of LU: near singular of leading principal minor [3] wrong solution

Question: How about interchanging row 1 and row 2? LU-factorization backward substitution step 1: step 2: unstable of LU: near singular of leading principal minor [4] Key observation: without pivoting (rounding normal number) pivoting (rounding error does not occur for normal number)

Case 1:Case 2: unstable of LU: near singular of leading principal minor [5] Why not 1?

without pivotingpivoting (NOT stable) (stable) Objective: control growth rate of control multiplier unstable of LU: cause and controllability definelargest component of matrix

OutLine Weakness of A=LU A=LU versus PA=LU - controllability of lower triangle matrix L Pivoting strategy Implementation of PA=LU MATLAB usage

since is not maximum among since is not maximum among Recall LU example in chapter 11 [1]

Recall LU example in chapter 11 [2] since is not maximum among Question: How can we control, is uniform bound possible?

PA = LU in MATLAB

sinceis maximum among PA = LU: assume P is given [1] /11-10/ /111 since is maximum among

PA = LU: assume P is given [2] / /11-10/ /111 since is maximum among /111/ /11 Observation: though proper permutation, we can control Question: in fact, we cannot know permutation matrix in advance, how can we do?

Sequence of matrices during LU-decomposition

OutLine Weakness of A=LU A=LU versus PA=LU Pivoting strategy - partial pivoting (we adopt this formulation) - complete pivoting Implementation of PA=LU MATLAB usage

(1) find a such that (2) swap rowand row Partial pivoting and complete pivoting thenwith Partial pivoting (1) find a such that (2) swap rowand row thenwith (2) swap columnand column complete pivoting

Define permutation matrix Recall permutation matrix interchange row 2, 3 interchange column 2, 3 Let interchange row 2, interchange column 2, Symmetric permutation:

x1 x2 x Meaning of matrix coefficient relationship between node and node constraint on node node is named x1 x3x3 x2x change node 2 to node 3 and node 3 to node 2 write constraint for now node index x1 x2x2 x3x3 x2x2x3x x2x3 x1 x2 x3

Identity matrix is invariant under symmetric permutation x1 x2 x x1 x2 x3 x2x3 change node 2 to node 3 and node 3 to node 2 x1 x3x3 x2x x2x2 x3x3 x2x2x3x3 1

PA = LU: partial pivoting [1]

PA = LU: partial pivoting [2] where Interchange columns 2, Interchange rows 2, verify

PA = LU: partial pivoting [3] / /11-10/ /11-10/ /11-10/11 where

/ Interchange columns 3, / Interchange rows /111 PA = LU: partial pivoting [4] / /11-10/11 verify

PA = LU: partial pivoting [5] /11-10/ / /11 where /111/ /11 we have

OutLine Weakness of A=LU A=LU versus PA=LU Pivoting strategy Implementation of PA=LU - commutability of GE matrix and permutation - recursive formula MATLAB usage

Interchange rows and columns 2, / Interchange rows and columns 3, /111 Implementation issue: commutability of GE matrix and permutation [1]

Implementation issue: commutability of GE matrix and permutation [2] Observation: If we define, then where interchanges rows or columns and interchange

Implementation issue: commutability of GE matrix and permutation [3] partial rows (k and p) interchange symmetric permutation on an Identity matrix

we have compute update original matrix stores in lower triangle matrix Algorithm ( PA = LU ) [1] Given full matrix, construct initial lower triangle matrix for use permutation vector to record permutation matrix let,and

Algorithm ( PA = LU ) [2] define permutation matrix then after swapping rows, we have compute by swappingand then for ifthen endif swap rowand row find a such that

Algorithm ( PA = LU ) [3] endfor by updating by updating matrix then decomposewhere 5 (recursion is done)

Question: recursion implementation Initialization - check algorithm holds for k=1 Recursion formula - check algorithm holds for k, if k-1 is true Termination condition - check algorithm holds for k=n Breakdown of algorithm - check which condition PA=LU fails Exception: algorithm works only for square matrix? normal abnormal Extension of algorithm

Exception: algorithm works only for square matrix? [1] Case 1: Case 2:

Case 3: Exception: algorithm works only for square matrix? [2] we can simplify it as Question: what is termination condition of case 3 ?

OutLine Weakness of A=LU A=LU versus PA=LU Pivoting strategy Implementation of PA=LU MATLAB usage - abs - max

Command “abs”: take absolute value In PA=LU algorithm, we need to take absolute value of one column vector for pivoting abs also works for matrix

Command “max”: take maximum value