Lecture 3 3 Solving liner equtions In this lecture we will discuss lgorithms for solving systems of liner equtions Multiplictive identity Let us restrict ourselves to considering squre mtrices since one cn form the product of two squre mtrices in either order nd e le to compre the results In this sitution there is specil mtrix 1 0 0 0 I n := ; 0 0 1 we will sometimes lso write dig(1 1 for the resulting digonl mtrix Computing directly using the definition of mtrix multipliction one just checks tht for ny n n squre mtrix A we hve AI n = I n A = A Definition 31 An n n mtrix B is multiplictive identity (for rel squre mtrices if for ny squre mtrix A the identity AB = BA = A is stisfied Question 32 Are there other multiplictive identity mtrices? Multiplictive inverses All of wht we sid ove ws well nd good ut very forml Mtrices were invented with the gol of solving systems of liner equtions so let s get ck to tht The simplest liner eqution is of the form x = How do we solve this eqution? Assuming 0 we just divide y nd get x = If we hd system of liner equtions of the form Ax = B where A is n m n-mtrix x is n n 1 column vector nd B is n m 1-column vector then it might e nice to find mtrix tht plys the role of 1 Assume m = n so oth sides of the eqution cn e esily compred We would like to find mtrix C such tht CA = I n If we could do tht then we d hve C(Ax = CB 1
2 3 Solving liner equtions nd thus x = CB Writing our equtions like this ws just n ritrry choice: we could just s well hve written our eqution s the product of row vector with mtrix (on the right In this reversed order we would wnt to multiply mtrices on the right We cn now turn this drem into property Definition 33 An multiplictive inverse for n n n-mtrix A is mtrix B such tht AB = BA = I n If A hs n inverse we sy it is invertile We write A 1 for multiplictive inverse of squre mtrix A when it exists However so fr this is just drem We don t know if given mtrix A ctully hs multiplictive inverse In fct mny mtrices do not (consider the mtrix 0 n n Even if we know strctly tht n inverse exists we do know how to compute the inverse! Nevertheless given mtrix A we cn recognize the inverse if it is presented to us y explicit mtrix multipliction Question 34 If CA = I n wht cn we sy out AC? Question 35 If A is invertile cn it hve more thn one inverse? Question 36 Under wht conditions re ech of the following mtrices invertile nd wht re their inverses when they exist? ( 0 0 ( 0 1 0 1 1 0 In clss we worked this out in detil since it will e of some importnce lter Row opertions Given system of liner equtions sy x 1 + x 2 = 21 x 1 + 22 x 2 = 2 we would like to if possile solve the system for x 1 nd x 2 The generl procedure is s follows: first we solve the first eqution for one vrile in terms of the others To e s systemtic s possile: if is not zero we cn divide the first eqution y without chnging its solutions In other words we cn write x 1 + x 2 = nd our old system of equtions ecomes the new system of equtions: x 1 + x 2 = 21 x 1 + 22 x 2 = 2 Let us now keep trck of this mnipultion in terms of coefficient mtrices
3 3 Solving liner equtions We chnge the originl coefficient mtrix ( 11 21 The solution vector chnges similrly: ( 1 2 21 ( 1 2 There is third description of this trnsition: it corresponds to multiplying the originl coefficient mtrix nd the solution mtrix on the left y the digonl mtrix 1 Let us lso oserve tht since 0 this mtrix is invertile nd this encodes the fct tht we could return to the originl system of equtions from our new one y multiplying y the inverse Next we cn solve the new first eqution for x 1 in terms of x 2 ie we cn write x 1 = x 2 Hving performed this opertion we cn sustitute the given expression for x 1 into the other expression In this cse: 21 ( x 2 + 22 x 2 = 2 After some reorgnizing we cn write this s: ( 22 21 x 2 = 2 21 In other words we hve otined the system of equtions x 1 + x 2 = ( 22 21 x 2 = 2 21 Agin let us keep trck of the chnge in coefficient mtrices The new coefficient mtrix for the originl eqution nd the new eqution involving only x 2 is encoded in trnsition of the form 21 0 22 21 while the trnsition for the solution vector now tkes the form: ( 1 ( 2 2 1 21
4 3 Solving liner equtions String t this we hve dded multiple ( 21 to the second row This trnsition lso cn e gin encoded in terms of mtrix products: oserve tht ( ( 1 = 21 1 21 0 22 21 nd similrly ( 0 1 ( = 21 1 2 2 1 21 ( 1 0 To sy it differently multipliction y the mtrix hs the the following effect 21 1 on equtions: we dd multiple of the first eqution to the second (in this cse the multiple is 21 Agin the invertiility of this mtrix encodes the fct tht the new system of equtions is completely equivlent to the originl system of equtions At the end of this step we lmost hve the vlue of x 2 Indeed we hve the eqution ( 22 21 x 2 = 2 21 If the expression ( 22 21 is non-zero we cn divide y it nd get x 2 = 2 21 ( 22 21 As sidenote let us oserve tht so fr we hve ssumed 0 nd ( 22 21 0 Since the product of two non-zero numers is gin non-zero we lso see tht ( 22 21 0 As in the first step this cn e encoded in the following trnsition of the coefficient mtrix: 0 22 21 nd the corresponding trnsition for the solution vector: ( 2 1 21 2 21 ( 22 21 While this looks cumersome gin this trnsition cn e effected y multiplying y digonl mtrix of the form dig(1 ( 22 21 1 on the left Under the hypothesis tht ( 22 21 0 this mtrix is lso invertile To finish we hve to solve for x 1 Since now we know the vlue of x 2 we could plug this ck into the eqution for x 1 In other words we tke the eqution x 1 = ( 2 21 ( 22 21
5 3 Solving liner equtions The coefficient mtrix hs undergone the trnsition: ( 1 0 while the solution vector hs undergone the trnsition 11 2 21 ( 22 21 ( 2 1 21 ( 22 21 2 21 ( 22 21 While this looks very complicted it is esier to how to effect this chnge: we multiply oth the coefficient nd solution vectors on the left y the mtrix ( Once more this mtrix is invertile Along the wy we mde vrious ssumptions out certin things eing non-zero Under these hypotheses we cn keep trck of ll the mtrix multiplictions we hve performed on coefficient mtrices: ( ( ( ( 1 0 1 ( 0 ( 22 21 1 1 = 21 1 21 ( 1 0 Grouping the four mtrices on the left together oserve tht this shows tht our originl coefficient mtrix ws invertile under the two hypotheses: 0 nd 22 21 0 Ws the condition 0 relly necessry? Suppose = 0 In tht cse we cn simply chnge the order of the equtions which of course does not lter the solutions! After tht we get coefficient mtrix tht hs 0 in the lower-left hnd coefficient nd this looks similr to the plce we were prtwy through our nlysis Agin this trnsition in coefficient mtrices cn e effected y left multipliction y mtrix nmely left multipliction y the mtrix ( 1 0 hs the effect of swpping the two rows The fct tht this mtrix is its own inverse corresponds to the fct tht if we swp two rows nd then swp them ck we hve done nothing to the originl system of equtions Next time we will finish the nlysis in this cse