Download presentation
Presentation is loading. Please wait.
Published byAlvin Caldwell Modified over 9 years ago
1
Part 3 Chapter 11 Matrix Inverse and Condition Part A All images copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2
Chapter Objectives Know how to determine the matrix inverse in an efficient manner based on LU factorization. Understand how the matrix inverse can be used to assess stimulus-response characteristics of engineering systems. Understand the meaning of matrix and vector norms and how they are computed. Know how to use norms to compute the matrix condition number. Understand how the magnitude of the condition number can be used to estimate the precision of solutions of linear algebraic equations.
3
Matrix Inverse If a matrix [A] is square, there is another matrix [A] -1, called the inverse of [A], for which [A][A] -1 =[A] -1 [A]=[1] The inverse can be computed in a column by column fashion by generating solutions with unit vectors as the right-hand-side constants: Column vector
4
Matrix Inverse (cont) Recall that LU factorization can be used to efficiently evaluate a system for multiple right-hand-side vectors - thus, it is ideal for evaluating the multiple unit vectors needed to compute the inverse. Do this once Do this three times – once for each column
5
Example 11.1 Employ LU factorization to determine the matrix inverse for the following system
6
In this case x is a column in the inverse Let’s run this code and watch what happens
7
Or… Ainv = inv(A) The corresponding MATLAB code is:
8
Stimulus-Response Computations Many systems can be modeled as a linear combination of equations, and thus written as a matrix equation: The system response can thus be found using the matrix inverse.
9
Each of the elements represents the response of a single part of the system to a unit stimulus of any other part of the system Each of these is a dot product
10
Example 11.2 Let’s return to the connected bungee jumpers from chapter 8
11
11 Suppose there are three jumpers connected by bungee cords, so that each cord is fully extended, but unstretched. After they are released, gravity takes hold and the jumpers will eventually come to equilibrium You are asked to compute the displacement of each of the jumpers. Gravity causes the stimulus The displacement is the response
12
Free body diagrams 12 Assume that each cord behaves like a linear spring, and follows Hooke’s Law
13
Force Balance 13 Since the jumpers are at equilibrium the acceleration is equal to 0
14
Substituting in the constants we can pose the problem as a system of linear equations Force in Newtons (m*g) Effective Spring Constants Change in Position
16
Each element represents the vertical change in position of jumper i, due to a unit change in force applied to jumper j The position of all three jumpers would change by 0.02 m if the force on jumper 1 was increased by 1 Newton The position of the first jumper would change by 0.02 m if the force on jumper 2 was increased by 1 Newton – but jumper 2 and 3 would change by 0.03 m The position of the first jumper would change by 0.02 m if the force on jumper 3 was increased by 1 Newton – jumper 2 would change by 0.03 m and jumper 3 would change by 0.05 m
21
So why is this useful? By looking at the matrix inverse I can see where applying a stimulus will have the most (or least) affect.
22
Next time… Matrix norm and condition calculations
23
Error Analysis and System Conditioning The inverse also provides a means to see whether systems are ill-conditioned. There are 3 direct methods 1. Scale the matrix of coefficients so that the largest element in each row is 1. Invert the scaled matrix and if there are elements of A -1 that are several orders of magnitude greater than 1 – it is likely that the matrix is ill-conditioned
24
Error Analysis and System Conditioning The inverse also provides a means to see whether systems are ill-conditioned. There are 3 direct methods 2. Multiply the inverse by the original matrix, and see if the result is the identity matrix. If not it is ill-conditioned
25
Error Analysis and System Conditioning The inverse also provides a means to see whether systems are ill-conditioned. There are 3 direct methods 3. Invert the inverted matrix and check to see if the result is equivalent to the original matrix. If not, the system is ill-conditioned These techniques work, but it would be nice to quantify the problem with a single number In addition, recall that if the determinant is close to 0, the matrix is ill-conditioned
26
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.
27
Vector Norms For a vector {X} of size n, the p-norm is: Important examples of vector p-norms include:
28
Matrix Norms Common matrix norms for a matrix [A] include: Note - max is the largest eigenvalue of [A] T [A].
29
Matrix Condition Number The matrix condition number Cond[A] is obtained by calculating Cond[A]=||A||·||A -1 || In can be shown that: The relative error of the norm of the computed solution can be as large as the relative error of the norm of the coefficients of [A] multiplied by the condition number. If the coefficients of [A] are known to t digit precision, the solution [X] may be valid to only t-log 10 (Cond[A]) digits.
30
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.
31
Example 11.3 The Hilbert matrix is ‘notoriously’ ill- conditioned. Use condition number to help you understand the effect of ill-conditioning on results.
33
Hilbert Matrix Determinant A*A -1 Inv(A)*A
35
Now try the condition number
36
The long way Using the cond function Condition of the unscaled matrix Sig fig reduction
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.