Contents ts 8 matrix solution o equations 1. Cramer s rule or solving simultaneous linear equations 2. Solving simultaneous linear equations using the inverse matrix method 3. Gauss elimination Learning outcomes In this workbook you will learn to apply your knowledge o matrices to solve systems o linear equations. Such systems o equations arise very oten in mathematics, science and engineering. Three basic techniques are outlined, Cramer's method, the inverse matrix approach and the Gauss elimination method. The Gauss elimination method is, by ar, the most widely used (since it can be applied to all systems o linear equations). However, you will learn that, or certain (usually small) systems o linear equations the other two techniques may be used to advantage. Time allocation You are expected to spend approximately our hours o independent study on the material presented in this workbook. However, depending upon your ability to concentrate and on your previous experience with certain mathematical topics this time may vary considerably. 1
Cramer s Rule or Solving Simultaneous Linear Equations 8.1 Introduction The need to solve systems o linear equations arises requently in engineering. The analysis o electric circuits and the control o systems are two examples. Cramer s rule or solving such systems involves the calculation o determinants and their ratio. For systems containing only a ew equations it is a useul method o solution. Prerequisites Beore starting this Section you should... Learning Outcomes Ater completing this Section you should be able to... 1 be able to evaluate 2 2 and 3 3 determinants State and apply Cramer s rule to ind the solution o two simultaneous linear equations State and apply Cramer s rule to ind the solution o three simultaneous linear equations Recognise cases where the solution is not unique or does not exist
1. Solving two equations in two unknowns I we have one linear equation ax = b in which the unknown is x and a and b are constants then there are just three possibilities a 0then x = b a a 1 b. The equation ax = b has a unique solution or x. a =0,b =0then the equation ax = b becomes 0 = 0 and any value o x will do. There are ininitely many solutions to the equation ax = b. a =0and b 0then ax = b becomes 0 = b which is a contradiction. In this case the equation ax = b has no solution or x. What happens i we have more than one equation and more than one unknown? We shall ind that the solutions to such systems can be characterised in a manner similar to that occurring or a single equation; that is, a system may have a unique solution, an ininity o solutions or no solution at all. In this section we examine a method, known as Cramer s rule and employing determinants, or solving systems o linear equations. Consider the equations ax + by = e (i) cx + dy = (ii) where a, b, c, d, e, are given numbers. The variables x and y are unknowns we wish to ind. The values o x and y which simultaneously satisy both equations are called solutions. Simple algebra will eliminate the variable y between these equations. We multiply equation (i) by d, equation (ii) by b and subtract: irst, adx+ bdy = ed and bcx + bdy = b (we multiplied in this way to identiy the coeicients o y as clearly equal.) Now subtract to obtain (ad bc)x = ed b. (iii) Starting with equations (i) and (ii) eliminate x. 3 HELM (VERSION 1: April 2, 2004): Workbook Level 1
Your solution Now subtract to obtain acx + bcy = ec and acx + ady = a. (bc ad)y = ec a I we multiply this last equation by 1 we obtain Multiply equation (i) by c and equation (ii) by a to obtain (ad bc)y = a ec (iv) Dividing equations (iii) and (iv) by ad bc we obtain the solutions x = ed b ad bc, a ec y = ad bc (v) There is o course one proviso. I ad bc =0then neither x nor y has a deined value. I we choose to express these solutions in terms o determinants we have the ormulation or the solution o simultaneous equations known as Cramer s rule. I we deine as the determinant a b c d and provided 0then the unique solution o the equations ax + by = e cx + dy = is by (v) given by x = x, y = y where x = e b d, y = a c e Now is the determinant o coeicients ( ) on the let-hand sides o the equations. In the expression a x the coeicients o x (i.e. which is column 1 o ) are replaced by the terms on the c ( ) e right-hand sides o the equations (i.e. by ). Similarly in y the coeicients o y (column 2o )are replaced by the terms on the right-hand sides o the equations. HELM (VERSION 1: April 2, 2004): Workbook Level 1 4
Key Point The unique solution to the equations: Cramer s Rule is given by: ax + by = e cx + dy = x = x, y = y b d, y = in which = a b c d x = e I = 0 this method o obtaining the solution cannot be used. a c e Use Cramer s rule to solve the simultaneous equations 2x + y = 7 3x 4y = 5 Your solution = 11. Since 0we can proceed with Cramer s solution. i.e. x = ( 28 5), y = (10 21) ( 8 3) ( 8 3) 33 implying: x = 11 11 =3, y = =1. 11 2 1 3 4 Calculating = 2 1 3 4 7 1 2 7 5 4 3 5 x =, y = 2 1 3 4 You can check by direct substitution that these are the exact solutions to the equations. 5 HELM (VERSION 1: April 2, 2004): Workbook Level 1
Repeat the process with the equations (a) 2x 3y = 6 4x 6y = 12 (b) 2x 3y = 6 4x 6y = 10 Your solution In the system (a) the second equation is twice the irst so there are ininitely many solutions. (Here we can give y any value we wish, t say; but then the x value is always (6 + 3t)/2. So or each value o t there are values or x and y which simultaneously satisy both equations. There is an ininite number o possible solutions). In (b) the equations are inconsistent (since the irst is 2x 3y =6and the second is 2x 3y =5which is not possible.) Hence there are no solutions. You should have checked 2 3 4 6 irst, since 2 3 4 6 = 12 ( 12) = 0. Hence there is no unique solution in either case. Notation For ease o generalisation to larger systems we write the two-equation system in a dierent notation: a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2 Here the unknowns are x 1 and x 2, the right-hand sides are b 1 and b 2 and the coeicients are a ij where, or example, a 21 is the coeicient o x 1 in equation two. In general, a ij is the coeicient o x j in equation i. Cramer s rule can then be stated as ollows: I a 11 a 12 a 21 a 22 0,then the equations a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2 have solutions x 1 = b 1 a 12 b 2 a 22 a 11 a 12 a 21 a 22, x 2 = a 11 b 1 a 21 b 2 a 11 a 12. a 21 a 22 HELM (VERSION 1: April 2, 2004): Workbook Level 1 6
2. Solving three equations in three unknowns Cramer s rule can be extended to larger systems o simultaneous equations but the calculational eort increases rapidly as the size o the system increases. We quote Cramer s rule or a system o three equations. The unique solution to the system o equations: is in which and x1 = b 1 a 12 a 13 b 2 a 22 a 23 b 3 a 32 a 33 Key Point a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 x 1 = x 1, x 2 = x 2, x 3 = x 3 = x2 = a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 a 11 b 1 a 13 a 21 b 2 a 23 a 31 b 3 a 33 I = 0 this method o obtaining the solution cannot be used. x3 = a 11 a 12 b 1 a 21 a 22 b 2 a 31 a 32 b 3 Notice that the structure o the ractions is similar to that or the two-equation case. For example, the determinant orming the numerator o x 1 is obtained rom the determinant o coeicients,, by replacing the irst column by the right-hand sides o the equations. Notice too the increase in calculation: in the two-equation case we had to evaluate three 2 2 determinants, whereas in the three-equation case we have to evaluate our 3 3 determinants. Hence Cramer s rule is not really practicable or larger systems. We wish to solve the system First check that 0. x 1 2x 2 + x 3 = 3 2x 1 + x 2 x 3 = 5 3x 1 x 2 +2x 3 = 12. 7 HELM (VERSION 1: April 2, 2004): Workbook Level 1
Your solution +1 2 1 3 1 = 1 (2 1)+2 (4+3)+1 ( 2 3) ( 2) 2 1 3 2 = 1+14 5=10 1 1 1 2 Expanding along the top row, = 1. 1 2 1 2 1 1 3 1 2 Now we ind the value o x 1. First write down the expression or x 1 in terms o determinants. Your solution x 1 = = 3 2 1 5 1 1 12 1 2 Now calculate x 1 explicitly. Your solution = 30. = 3 1+2 22 + 1 ( 17) Hence x 1 = 1 10 30 =3 The numerator is ound by expanding along the top row to be 3 1 1 1 2 ( 2) 5 1 12 2 +1 5 1 12 1 In a similar way ind the values o x 2 and x 3. HELM (VERSION 1: April 2, 2004): Workbook Level 1 8
Your solution x 2 = 1 10 = 1 10 { 1 3 1 2 5 1 3 12 2 1 5 1 12 2 3 2 1 3 2 +1 2 5 +1 3 12 } = 1 10 x 3 = 1 10 {22 3 7+9} =1 { 1 1 5 1 12 ( 2) 2 5 3 12 +3 2 1 3 1 } = 1 10 {17 + 2 9+3 ( 5)} =2 1. Solve the ollowing using Cramer s rule: (a) 2x 3y = 1 4x + 4y = 2 (b) Exercises 2x 5y = 2 4x + 10y = 1 2. Using Cramer s rule obtain the solutions to the ollowing sets o equations: (c) 6x y = 0 2x 4y = 1 (a) 2x 1 + x 2 x 3 = 0 x 1 + x 3 = 4 x 1 + x 2 + x 3 = 0 (b) x 1 x 2 + x 3 = 1 x 1 + x 3 = 1 x 1 + x 2 x 3 = 0 Answers 1. (a) x = 1 2 1,y=0 (b) = 0, no solution (c) x =,y= 3 22 11 2. (a) x 1 = 8 3,x 2 = 4, x 3 = 4 3 (b) x 1 = 1 2,x 2 =1,x 3 = 3 2 9 HELM (VERSION 1: April 2, 2004): Workbook Level 1