FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING Lectures MODULE 7 MATRICES II Inverse of a matri Sstems of linear equations Solution of sets of linear equations elimination methods 4 Inverse of a matri using elimination method Inverse of a matri It is ver important to be able to obtain the inverse of a matri Def Given a square matri A, if we can find a matri B such that AB BA I, where I is the unit matri, then B is called the inverse of A and written A [It can be proved that if the inverse eists then it is unique, ie the inverse has onl one form] Def The matri A is singular if A 0 ie deta 0) Def The matri A is non-singular if A 0 With this notation we can state: if A is singular then A does not eist; if A is non-singular then A does eist and A adj A A The above formula states the direct method or cofactor method) of calculating the inverse Propert of inverse Provided the inverses eist, AB) B A [Proof If the epression on the RHS is the inverse then it must satisf the rules stated earlier for an inverse For verification, note that B A )AB) B A A)BB IB B B I, AB)B A )ABB )A AIA AA I ] The result can be etended to a string of matrices: ABCD) D C B A E Find A and B when a) A, b) B 5 4 4 a) As discussed in module 6 the minor associated with each element is found b deleting the row and column which passes through that element, and taking the determinant of what remains The corresponding cofactor is then calculated using A ij ) i+j M ij Hence, M ij ) ), A ij ) A ) ) 6, adj A A ij ) T, ) + ) + ) + ) + ),
and therefore A ) / / [The above result can easil be checked: AA 0 0 In a similar wa ou can check A A I ] b) Here the minors are more difficult to calculate since knocking out the row and column which passes through an element means that we must evaluate the determinant of a matri Evaluating these determinants leads to the results 8 9 ) 5 M ij ) 6 6 5 4 0 9 8, 4 4) 0 5 6 8 5 B ij ) ) i+j M ij ) 9 8, 8 5 8 adj B B ij ) T 9, 8 B 5 5) + ) + 4) 5 + + 5 49, b first row Thus finall B adj B B 49 5 8 9 8 Again ou can verif that BB BB I) Although the direct method is useful for inverting small matrices it is surprisingl inefficient using it for large matrices, since the method takes a large amount of time A different method is required, therefore, for finding the inverse of a large matri see section 4 Sstems of linear equations Matrices are ver important themselves, but their greatest use lies in solving sets of linear equations Note first that the sstem of simultaneous linear equations n equations in n unknowns) can be written AX b,where a + a + + a n n b a + a + + a n n b a n + a n + + a nn n b n a a a n a A a a n, X a n a n a nn n, b b b b n
In this module onl sstems which lead to a square matri for A are considered There are four cases which arise depending on whether, or not, A 0 and b 0 Case i) b 0, A 0 In this case the matri A is non-singular so A eists and hence pre-multipling both sides of the equation AX b b A gives Thus we have a unique solution Case ii) b 0, A 0 A AX A b, IX A b, X A b Again A eists so the sstem AX 0 has the unique solution X A 0 0 ie onl the trivial or zero) solution X 0 ) Case iii) b 0, A 0 Since A 0 the inverse matri does not eist This is the most complicated of the four cases and there are two possibilities: either we have no solution, or there are infinitel man solutions To illustrate these two possibilities consider the two sstems below this case will be considered in more detail in module 8) The first sstem is + +6 or ) 6 For this sstem b 0 and A ) ) 6 6 0 It is clear from inspection of the pair of equations that the are inconsistent ie not compatible) so no solution eists The second sstem is + 6+44 or 6 4 ) 4 For this sstem also b 0 and A ) ) 6 6 0 Looking at the given pair of equations the second one is twice the first, and can be ignored since it provides nothing new For solutions of the remaining equation + choose C, an constant, and then Cwhich implies C Thus the solution is C C, for an constant C Case iv) b 0, A 0 Here there are infinitel man solutions, as in the second possibilit in case iii) above For eample the sstem + 0, α + α 0, in which b 0 and A α) α) 0, has the solution C, C, ie C, for an C constant C Case iv) is ver important for it follows from cases ii) and iv) that the equation AX 0 has a non-trivial non-zero) solution if and onl if A 0
E Find the value of α for which the equations α + z 0 +z0 z0 have non-trivial solutions The sstem AX 0 has non-trivial solutions onl when A 0 Epanding b the first column α A 0 0 α 4)+0+0 5α, and hence non-trivial solutions eist onl when α 0 In this case the sstem of equations becomes z 0 +z0 z0 with solution z 0 and no restriction on Hence the solution is C 0, for an constant C z 0 Solution of sets of linear equations elimination methods The idea behind elimination methods for solving sstems of equations can be seen from the well-known method for simultaneous equations in unknowns +4 + 5 + 4 eqn eqn ) The second reduced equation implies and hence substitution into the first reduced equation gives 4 ) The solution, therefore, is ) The basic elimination method for n linear equations in the n unknowns,,, n, which etends the method outlined above, is i) retain the first equation for in terms of,, n and use this equation to eliminate from the remaining equations; ii) retain the second equation for in terms of,, n and use this equation to eliminate from the remaining lower equations in the reduced set; iii) repeat the process, until ou arrive at the final equation in n onl, which ou solve; iv) substitute back into the equations in the reduced set, using them in reverse order to find in turn n, n,, Let us illustrate the method with the following eample for equations in unknowns 4
E Use the elimination method to solve the equations +, + + 7, + + 4 In the matri form, AX b,wehave 0 7 4 The elimination method described above is equivalent to reducing A to upper triangular form, ie a b c 0 d e with non-zero elements on the principal diagonal and all elements below it being zero The 0 0 f elimination procedures rel on manipulation of the ROWS of the matri, equivalent to manipulation of the original equations The allowed row operations arise because of the operations which can be performed on equations and sstems of equations These row operations are: i) an row can be multiplied b a constant; ii) a row can be added to or subtracted from) an other row; iii) an two rows can be interchanged The solution will now be found using these operations 0 7 4 0 0, 0 wherewehaveusedrow row and row row, in order to make the elements in the first column apart from the leading element) zero Note that it is the rows in the matri of coefficients and the same rows in the column vector on the RHS that are changed, but the matri of unknowns is unaltered This follows immediatel from consideration of the equivalent set of equations Completing the reduction we obtain 0 0, row + row 0 0 4 The reduced set of equations, therefore, is +, +, 4 Solving the final equation then implies, and substituting into the second equation gives Finall from the first equation we deduce Thus the solution is [You should check that this solution satisfies the original set of three equations] 5
The above elimination method can be modified to appl to special matrices, and the resulting algorithms can be found in various tets The basic idea is unchanged, however, and the various specialised algorithms are not discussed further in this unit 4 Inverse of a matri using the elimination method As mentioned earlier the cofactor method is not efficient when calculating the inverses of large matrices Fortunatel there are better methods available and one of these involves the elimination method Suppose ou require the inverse of an n n square matri A Then ou form a new matri A : I), in which the n n unit matri I is added to A as etra columns with the new matri now n n The basic method is to use row operations similar to those used in section ) to reduce A to the unit matri I B simultaneousl carring out the same row operations on I the latter changes to A Hence the matri A : I) becomes I : A ) The elimination method discussed in section reduces a matri to upper triangular form During this process the elements below the leading diagonal in a column were made zero To reduce A to the unit matri it is also necessar to make the elements along the principal diagonal all unit and make the elements above the leading diagonal zero The modified procedure is as follows: i) start with the first row and make the first element in the first row and first column) zero; ii) use this row to make the remaining elements in the first column zero; iii) move to the second row and make the second element zero ie the element in the second row and second column); iv) use this amended second row to make the second element in ALL other rows zero; v) consider each row in turn and continue with the same procedure Let us illustrate the method with the eample below E 4 If A Start with the matri A : I) : use the elimination method to determine A 0 0 0 0 0 0 0 0 0 0 0 4 0, row + row 0 0 0 Now move to the second row, where we need as the second element and zeros both above and below this element Thus, 0 0 0 4/ / / 0, row 0 0 0 0 / / / 0 0 4/ / / 0, row row 0 0 0 0 / / / 0 0 4/ / / 0, row row 0 0 7/ / / 0 / / / 0 0 4/ / / 0, 7 row 0 0 /7 /7 /7 6
The first and second columns are now correct, so we must move on to the third row and third column The third element in this row is alread, so we onl need to use the third row to produce zeros above this element in the third column 0 0 /7 5/7 /7 0 4/ / / 0, row row 0 0 /7 /7 /7 0 0 /7 5/7 /7 0 0 /7 /7 4/7, row 4 row 0 0 /7 /7 /7 The matri A has been changed to I, and the theor sas that the right-hand side I will now be A Hence /7 5/7 /7 A /7 /7 4/7 /7 /7 /7 The evaluation of A b the above method appears length but for large matrices it can be shown that it is more efficient than determining the inverse using the cofactor method, and algorithms can be written for computer implementation Before finishing this module another issue is briefl considered through the following eample E 5 a) Solve b elimination the equations 0, b) 0500 06 04999 ) 0 06 a) Dividing the first row b 0 0500 06 05 0 0000 05 0500 ) 05, row row 045 05 060 The second reduced equation then states 0000 045, which implies 4500 Substituting into the first equation then ields 05 05 4985 Thus the solution is 4985 4500 b) The solution here follows an analogous pattern 0 05 04999 06 04999 05 0 0000 ) 05, row row 045 05 060 The second reduced equation now states 0000 045, which implies 4500, and the first equation ields 05 05 505 Hence the solution in this case is 505 4500 As ou see the answers to a) and b) are hugel different despite the fact that the coefficients in the original sstems were almost identical Results of this tpe arise when the determinant of the coefficients on the LHS is 7
approimatel zero, and great care has to be taken in these situations to get accurate answers Geometricall, in each case above we are looking for the intersection of two straight lines When the determinant is almost zero the lines are almost parallel and an small change in the slope of one line can lead to major changes in the point of intersection rec/00lm 8