Download presentation
Presentation is loading. Please wait.
Published byAleesha Hoover Modified over 9 years ago
1
Chapter 8 Numerical Technique 大葉大學 資訊工程系 黃鈴玲 Linear Algebra
2
Ch8_2 8.1 Gaussian Elimination Definition A matrix is in echelon form if 1.Any rows consisting entirely of zeros are grouped at the bottom of the matrix. 2.The first nonzero element of each row is 1. This element is called a leading 1. 3.The leading 1 of each row after the first is positioned to the right of the leading 1 of the previous row. (This implies that all the elements below a leading 1 are zero.) Reduced echelon form 與 echelon from 的差異: echelon form 的 leading 1 上面的數字不必為零
3
Ch8_3 Example 1 Solving the following system of linear equations using the method of Gaussian elimination. Solution Starting with the augmented matrix, create zeros below the pivot in the first column. At this stage, we create a zero only below the pivot. Echelon form We have arrived at the echelon form.
4
Ch8_4 The corresponding system of equation is We get Substituting x 4 = 2 and x 3 = 5 into the first equation, Let x 2 = r. The system has many solutions. The solutions are
5
Ch8_5 Example 2 Solving the following system of linear equations using the method of Gaussian elimination, performing back substitution using matrices. Solution We arrive at the echelon form as in the previous example. Echelon form This marks the end of the forward elimination of variables from equations. We now commence the back substitution using matrices.
6
Ch8_6 2 3 This matrix is the reduced echelon form of the original augmented matrix. The corresponding system of equations is Let x 2 = r. We get same solution as previously,
7
Ch8_7 Comparison of Gauss-Jordan and Gaussian Elimination Count of Operations for n n system with Unique Solution Number of Multiplications Number of Additions Gauss-Jordan Gaussian elimination
8
Ch8_8 8.2 The Method of LU Decomposition lower triangular matrixupper triangular matrix Ax=y A=LU …
9
Ch8_9 Example 1 Solving the following system of equations, which has a triangular matrix of coefficients. Solution 1st equations gives 2nd equation gives 3rd equation gives The solution is By forward substitution:
10
Ch8_10 Example 2 Solving the following system of equations, which has an upper triangular matrix of coefficients. Solution 3rd equation gives 2nd equation gives 1st equations gives The solution is By back substitution:
11
Ch8_11 Definition Let A be a square matrix that can be factored into the form A = LU, where L is a lower triangular matrix and U is an upper triangular matrix, This factoring is called an LU decomposition of A. (Not every matrix has an LU decomposition, and when it exists, it is not unique.)
12
Ch8_12 Solution of AX = B 1.Find the LU decomposition of A. (If A has no LU decomposition, the method is not applicable.) 2.Solve LY = B by forward substitution. 3.Solve UX = Y by back substitution. Let AX = B be a system of n equations in n variables, where A has LU decomposition A = LU. LUX = B two subsystems: UX = Y (upper triangular) and LY = B (lower triangular) Method of LU Decomposition How to decompose A=LU? 利用 elementary matrices
13
Ch8_13 Elementary Matrices (複習第二章 ) Definition An elementary matrix is one that can be obtained from the identity matrix I n through a single elementary row operation. Example R2 R3 5R2 R2+ 2R1
14
Ch8_14 Elementary Matrices (複習第二章 ) R2 R3 5R2 R2+ 2R1 一個矩陣做 elementary row operation , 相當於在左邊乘一個對應的 elementary matrix 。
15
Ch8_15 Elementary matrices (複習第二章 ) Each elementary matrix is invertible. Example Note that (E 1 ) 12 = (E 2 ) 12.
16
Ch8_16 ( 利用 elementary matrix) A … U (upper triangular) U = E k E 1 A A = (E 1 ) 1 (E k ) 1 U If each such elementary matrix E i is a lower triangular matrices, it can be proved that (E 1 ) 1, , (E k ) 1 are lower triangular, and (E 1 ) 1 (E k ) 1 is a lower triangular matrix. Let L=(E 1 ) 1 (E k ) 1 then A=LU. How to decompose A=LU?
17
Ch8_17 Example 3 Solving the following system of equations using LU decomposition. Solution Let us transform the matrix of coefficients A into upper triangular form U by creating zeros below the main diagonal as follows. A U
18
Ch8_18 The elementary matrices that correspond to these row operations are The inverse of these matrices are We get Thus
19
Ch8_19 We now solve the given system LUX = B by solving the two subsystems LY = B and UX = Y. We get This lower triangular system has solution The upper triangular system has solution The solution to the given system is
20
Ch8_20 Construction of a LU decomposition of a Matrix A 1.Use row operations to arrive at U. (The operations must involve adding multiples of rows to rows. In general, if row interchanges are required to arrive at U, an LU form does not exists.) 2.The diagonal element of L are ls. The nonzero elements of L corresponding to row operations. The row operation R i + cR j implies that l ij = c.
21
Ch8_21 Example 4 Solve the following system if equations using LU decomposition. Solution These row operations lead to the following LU decomposition of A. L 21 = 1 L 31 = L 32 =
22
Ch8_22 We again solve the given system LUX = B by solving the two subsystems LY = B and UX = Y. This lower triangular system has solution y 1 = 12, y 2 = 0, y 3 = 10. This upper triangular system has solution x 1 = 1, x 2 = 1, x 3 = 2. The solution to the given system is x 1 = 1, x 2 = 1, x 3 = 2.
23
Ch8_23 Homework Exercise 8.2 7(a), 9, 20
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.