Presentation is loading. Please wait.

Presentation is loading. Please wait.

ES 240: Scientific and Engineering Computation. Matrix Inverse Chapter 11: Matrix Inverse Uchechukwu Ofoegbu Temple University.

Similar presentations


Presentation on theme: "ES 240: Scientific and Engineering Computation. Matrix Inverse Chapter 11: Matrix Inverse Uchechukwu Ofoegbu Temple University."— Presentation transcript:

1 ES 240: Scientific and Engineering Computation. Matrix Inverse Chapter 11: Matrix Inverse Uchechukwu Ofoegbu Temple University

2 ES 240: Scientific and Engineering Computation. Matrix Inverse Gaussian Jordan Method  Involves complete pivoting so that the coefficient matrix becomes diagonal  Eliminates the need for substitution  Also used in finding inverses

3 ES 240: Scientific and Engineering Computation. Matrix Inverse Gaussian Jordan Method  Steps 1.Write down the matrix corresponding to the linear system. 2.Make sure that the first entry in the first column is nonzero. Do this by interchanging the first row with one of the rows below it, if necessary. 3.Pivot the matrix about the first entry in the first column. Pivoting in this case also involves normalizing the diagonal entry 4.Make sure that the second entry in the second column is nonzero. Do this by interchanging the second row with one of the rows below it, if necessary. 5.Pivot the matrix about the second entry in the second column. 6.Continue in this manner until you have the identity matrix on the left hand side

4 ES 240: Scientific and Engineering Computation. Matrix Inverse Example – System of Equations Example – System of Equations  Using the Gauss-Jordan method, solve the following system of equations –Using Matlab colon operations –Check with Matlab’s back slash operation

5 ES 240: Scientific and Engineering Computation. Matrix Inverse Infinitely Many Solutions  When a linear system cannot be completely diagonalized, –Apply the Gaussian elimination method to as many columns as possible. Proceed from left to right, but do not disturb columns that have already been put into proper form. –Variables corresponding to columns not in proper form can assume any value. –The other variables can be expressed in terms of the variables of step 2. –4. This will give the general form of the solution.

6 ES 240: Scientific and Engineering Computation. Matrix Inverse Example Infinitely Many Solutions Example Infinitely Many Solutions Find all solutions of General Solution z = any real number x = 3 - 2z y = 1

7 ES 240: Scientific and Engineering Computation. Matrix Inverse Inconsistent System When using the Gaussian elimination method: if a row of zeros occurs to the left of the vertical line and a nonzero number is to the right of the vertical line in the same row, then the system has no solution and is said to be inconsistent.

8 ES 240: Scientific and Engineering Computation. Matrix Inverse Example Inconsistent System Example Inconsistent System Find all solutions of Because of the last row, the system is inconsistent.

9 ES 240: Scientific and Engineering Computation. Matrix Inverse Gauss-Jordan Method for Inverses  Step 1: Write down the matrix A, and on its right write an identity matrix of the same size.  Step 2: Perform elementary row operations on the left-hand matrix so as to transform it into an identity matrix. These same operations are performed on the right-hand matrix.  Step 3: When the matrix on the left becomes an identity matrix, the matrix on the right is the desired inverse.

10 ES 240: Scientific and Engineering Computation. Matrix Inverse Example Inverses Example Inverses Find the inverse of Step 1: Step 2:

11 ES 240: Scientific and Engineering Computation. Matrix Inverse Example Inverses (2) Example Inverses (2) Step 3:

12 ES 240: Scientific and Engineering Computation. Matrix Inverse Vector and Matrix Norms  A norm is a real-valued function that provides a measure of the size or “length” of multi- component mathematical entities such as vectors and matrices.  Vector norms and matrix norms may be computed differently.

13 ES 240: Scientific and Engineering Computation. Matrix Inverse Vector Norms  For a vector {X} of size n, the p-norm is:  Important examples of vector p-norms include:

14 ES 240: Scientific and Engineering Computation. Matrix Inverse Matrix Norms  Common matrix norms for a matrix [A] include:

15 ES 240: Scientific and Engineering Computation. Matrix InverseExample  Find the norms of the following:

16 ES 240: Scientific and Engineering Computation. Matrix Inverse Ill-Conditioned Problems  Linear equations that are solvable but solutions become inaccurate because of rounding errors  Small changes in coefficient matrix that will make big changes in solutions  Ill-conditioned problem is the nature of the problem itself  Use format long ( quad precision) for mild ill-condition problems

17 ES 240: Scientific and Engineering Computation. Matrix Inverse Ill-Conditioned Problems  ill-conditioned problem will have –det(A) very small –cond(A) large  Check ill-conditioned –det(A)*det(inv(A) deviates from 1 – inv(inv(A)) deviates from A  A*inv(A) deviates from I  cond(A*inv(A)) deviates from 1

18 ES 240: Scientific and Engineering Computation. Matrix Inverse MATLAB Commands  MATLAB has built-in functions to compute both norms and condition numbers: –norm(X,p) Compute the p norm of vector X, where p can be any number, inf, or ‘fro’ (for the Euclidean norm) –norm(A,p) Compute a norm of matrix A, where p can be 1, 2, inf, or ‘fro’ (for the Frobenius norm) –cond(X,p) or cond(A,p) Calculate the condition number of vector X or matrix A using the norm specified by p.

19 ES 240: Scientific and Engineering Computation. Matrix InverseLab  Ex 11.2 a)Determine the inverse of the coefficient matrix using the Gauss-Jordan method step-by-step in Matlab b)Solve the system of equations using the Gauss-Jordan method step-by-step in Matlab c)Compare your answers to a and b with Matlab’s built-in functions (inv, back slash) d)Determine the Frobenius norm of the coefficient matrix a)By hand b)Using Matlab’s built-in ‘norm’ function c)Compare your answers


Download ppt "ES 240: Scientific and Engineering Computation. Matrix Inverse Chapter 11: Matrix Inverse Uchechukwu Ofoegbu Temple University."

Similar presentations


Ads by Google