Presentation is loading. Please wait.

Presentation is loading. Please wait.

Numerical Computation Lecture 7: Finding Inverses: Gauss-Jordan United International College.

Similar presentations


Presentation on theme: "Numerical Computation Lecture 7: Finding Inverses: Gauss-Jordan United International College."— Presentation transcript:

1 Numerical Computation Lecture 7: Finding Inverses: Gauss-Jordan United International College

2 Review During our Last Two Classes we covered: – Linear Systems: LU Factorization (or Decomposition)

3 Today We will cover: – Gauss-Jordan Method for finding Inverses

4 Review

5 Row Operations as Matrices Definition: An n×n matrix is called an elementary matrix if it can be obtained from the n×n identity matrix I by performing a single elementary row operation.

6 Row Operations as Matrices Row Operations: – Interchange two rows – Add r * times one row to another row – Multiply one row by a scalar

7 Row Operations as Matrices If the elementary row operation matrix E results from performing a certain row operation on the identity I, and if A is an m×n matrix,then the product EA is the matrix that results when this same row operation is performed on A. That is, when a matrix A is multiplied on the left by an elementary matrix E,the effect is to perform an elementary row operation on A.

8 Row Operations as Matrices Example: For the matrix Consider the elementary matrix This matrix is obtained from I by adding 3*row 1 to row 3. Note that EA is the matrix that results from adding 3*row 1 to row 3.

9 Gauss-Jordan Method To find the inverse to an nxn matrix A: – Adjoin the identity matrix I to the right side of A, thereby producing a matrix of the form – Apply row operations to this matrix until the left side is reduced to I. If successful, these operations will convert the right side to A -1,so that the final matrix will have the form

10 Gauss-Jordan Method Example:

11 Gauss-Jordan Method Example: Do row operations to get upper triangular form: (Like Gaussian Elimination)

12 Gauss-Jordan Method Example: Continue doing row operations to get 0’s in columns above the pivots:

13 Gauss-Jordan Method Example: At this point the last matrix on the left is the Identity. Thus, the right matrix must be the inverse to A:

14 Gauss-Jordan Method Example:

15 Matlab Implementation Task: Implement Gaussian Jordan method in a Matlab M-file. Notes Input = Coefficient matrix A Output = Inverse Matrix A -1 Discussion: How can we modify our Gaussian Elimination code to do this?

16 Why does Gauss-Jordan Work? Recall: – Adjoin the identity matrix I to the right side of A, thereby producing a matrix of the form – Apply row operations to this matrix until the left side is reduced to I.

17 Why does Gauss-Jordan Work? Recall: – Every row operation applied to [A | I] can be represented by an elementary matrix E. That is, the row operation is equivalent to E* [A | I]. – Thus, Gauss-Jordan can be viewed as a series of matrix operations E p E p-1 … E 1 [A | I] = [I | B] – But, this means that E p E p-1 … E 1 A = I. – Then, E p E p-1 … E 1 = A -1. – Thus, the right side of [A | I] is transformed to B = E p E p-1 … E 1 I = A -1


Download ppt "Numerical Computation Lecture 7: Finding Inverses: Gauss-Jordan United International College."

Similar presentations


Ads by Google