SECTION 0.2 Systems of Linear Equations: Matrices 7 0.2 Systems of Linear Equations: Matrices OBJECTIVES Write the Augmente Matrix of a System of Linear Equations 2 Write the System from the Augmente Matrix Perform Row Operations on a Matrix Solve a System of Linear Equations Using Matrices The systematic approach of the metho of elimination for solving a system of linear equations provies another metho of solution that involves a simplifie notation.
72 CHAPTER 0 Systems of Equations an Inequalities Consier the following system of linear equations: x + y = b x - 2y = 0 If we choose not to write the symbols use for the variables, we can represent this system as B -2 ` 0 R where it is unerstoo that the first column represents the coefficients of the variable x, the secon column the coefficients of y, an the thir column the constants on the right sie of the equal signs.the vertical line serves as a reminer of the equal signs. The large square brackets are use to enote a matrix in algebra. A matrix is efine as a rectangular array of numbers, Column Column 2 Column j Column n Row Row 2 o Row i o Row m a a 2 p a j p a n a 2 a 22 p a 2j p a 2n o o o o F a i a i2 p a ij p a in V o o o o a m a m2 p a mj p a mn () a ij Each number of the matrix has two inexes: the row inex i an the column inex j. The matrix shown in isplay () has m rows an n columns. The numbers a ij are usually referre to as the entries of the matrix. For example, a 2 refers to the entry in the secon row, thir column. Write the Augmente Matrix of a System of Linear Equations Now we will use matrix notation to represent a system of linear equations. The matrices use to represent systems of linear equations are calle augmente matrices. In writing the augmente matrix of a system, the variables of each equation must be on the left sie of the equal sign an the constants on the right sie. A variable that oes not appear in an equation has a coefficient of 0. EXAMPLE Writing the Augmente Matrix of a System of Linear Equations Write the augmente matrix of each system of equations. (a) x - y = -6 b 2x - y = -5 () (a) The augmente matrix is (b) B - 2-2x - y + z = 0 c x + z - = 0 x + 2y - = 0 ` -6-5 R () ()
SECTION 0.2 Systems of Linear Equations: Matrices 7 (b) Care must be taken that the system be written so that the coefficients of all variables are present (if any variable is missing, its coefficient is 0). Also, all constants must be to the right of the equal sign. We nee to rearrange the given system as follows: 2x - y + z = 0 () c x + z - = 0 x + 2y - = 0 () The augmente matrix is 2x - y + z = 0 c x + 0 # y + z = x + 2y + 0 # z = 2 - C 0 2 0 If we o not inclue the constants to the right of the equal sign, that is, to the right of the vertical bar in the augmente matrix of a system of equations, the resulting matrix is calle the coefficient matrix of the system. For the systems iscusse in Example, the coefficient matrices are B - 2-2 - R an C 0 S 2 0 NOW WORK PROBLEM 7. 0 S () () 2 Write the System from the Augmente Matrix EXAMPLE 2 Writing the System of Linear Equations from the Augmente Matrix Write the system of linear equations corresponing to each augmente matrix. - - 7 (a) B 5 2 ` (b) C 2 0 2 S - -0 R 0 0 (a) The matrix has two rows an so represents a system of two equations. The two columns to the left of the vertical bar inicate that the system has two variables. If x an y are use to enote these variables, the system of equations is 5x + 2y = () b -x + y = -0 (b) Since the augmente matrix has three rows, it represents a system of three equations. Since there are three columns to the left of the vertical bar, the system contains three variables. If x, y, an z are the three variables, the system of equations is x - y - z = 7 () c 2x + 2z = y + z = 0 ()
7 CHAPTER 0 Systems of Equations an Inequalities Perform Row Operations on a Matrix Row operations on a matrix are use to solve systems of equations when the system is written as an augmente matrix. There are three basic row operations. Row Operations. Interchange any two rows. 2. Replace a row by a nonzero multiple of that row.. Replace a row by the sum of that row an a constant nonzero multiple of some other row. These three row operations correspon to the three rules given earlier for obtaining an equivalent system of equations. When a row operation is performe on a matrix, the resulting matrix represents a system of equations equivalent to the system represente by the original matrix. For example, consier the augmente matrix B 2 - ` 2 R Suppose that we want to apply a row operation to this matrix that results in a matrix whose entry in row 2, column is a 0. The row operation to use is Multiply each entry in row by - an a the result to the corresponing entries in row 2. If we use to represent the new entries in row 2 an we use an to represent the original entries in rows an 2, respectively, then we can represent the row operation in statement by Then R 2 R 2 = -r + r 2 r r 2 B 2 - ` 2 R : B 2-2 + -22 + -2 ` -2 + 2 R = B 2 0-9 ` -0 R R 2 = -r + r 2 As esire, we now have the entry 0 in row 2, column. EXAMPLE Applying a Row Operation to an Augmente Matrix Apply the row operation R 2 = -r + r 2 to the augmente matrix B -2-5 ` 2 9 R The row operation R 2 = -r + r 2 tells us that the entries in row 2 are to be replace by the entries obtaine after multiplying each entry in row by - an aing the result to the corresponing entries in row 2.
SECTION 0.2 Systems of Linear Equations: Matrices 75 B -2-5 ` 2 9 R : B -2-2 + -2-22 + -52 R 2 = -r + r 2 ` 2-2 R = B -22 + 9 0 ` 2 R NOW WORK PROBLEM 7. EXAMPLE Fining a Particular Row Operation Fin a row operation that will result in the augmente matrix having a 0 in row, column 2. B -2 0 ` 2 R We want a 0 in row, column 2. This result can be accomplishe by multiplying row 2 by 2 an aing the result to row. That is, we apply the row operation R = 2r 2 + r. B -2 0 ` 2 + 22 + -22 R : B202 0 ` 22 + 2 R = B 0 0 ` R R = 2r 2 + r A wor about the notation that we have introuce. A row operation such as R = 2r 2 + r changes the entries in row. Note also that for this type of row operation we change the entries in a given row by multiplying the entries in some other row by an appropriate nonzero number an aing the results to the original entries of the row to be change. Solve a System of Linear Equations Using Matrices To solve a system of linear equations using matrices, we use row operations on the augmente matrix of the system to obtain a matrix that is in row echelon form. A matrix is in row echelon form when. The entry in row, column is a, an 0 s appear below it. 2. The first nonzero entry in each row after the first row is a, 0 s appear below it, an it appears to the right of the first nonzero entry in any row above.. Any rows that contain all 0 s to the left of the vertical bar appear at the bottom. For example, for a system of three equations containing three variables with a unique solution, the augmente matrix is in row echelon form if it is of the form a b C 0 c 0 0 e S f
76 CHAPTER 0 Systems of Equations an Inequalities where a, b, c,, e, an f are real numbers. The last row of this augmente matrix states that z = f. We can then etermine the value of y using back-substitution with z = f, since row 2 represents the equation y + cz = e. Finally, x is etermine using back-substitution again. Two avantages of solving a system of equations by writing the augmente matrix in row echelon form are the following:. The process is algorithmic; that is, it consists of repetitive steps that can be programme on a computer. 2. The process works on any system of linear equations, no matter how many equations or variables are present. The next example shows how to write a matrix in row echelon form. EXAMPLE 5 Solving a System of Linear Equations Using Matrices (Row Echelon Form) Solve: 2x + 2y = 6 c x + y + z = x + y - z = () () First, we write the augmente matrix that represents this system. 2 2 0 C - 6 S The first step requires getting the entry in row, column.an interchange of rows an 2 is the easiest way to o this. [Note that this is equivalent to interchanging equations () an of the system.] C 2 2 0-6 S Next, we want a 0 in row 2, column an a 0 in row, column. We use the row operations R 2 = -2r + r 2 an R = -r + r to accomplish this. Notice that row is unchange using these row operations. Also, o you see that performing these row operations simultaneously is the same as oing one followe by the other? C 2 2 0-6 S : C 0 0-2 0 - S 0 R 2 = -2r + r 2 R = -r + r Now we want the entry in row 2, column 2. Interchanging rows 2 an will accomplish this. C 0 0-2 0 - S : C 0-0 0 0-2 0 S
SECTION 0.2 Systems of Linear Equations: Matrices 77 Finally, we want a in row, column. To obtain it, we use the row operation R = - The result is 2 r. C 0-0 0-2 0 S : C 0-0 0 R = - 2 r This matrix is the row echelon form of the augmente matrix. The thir row of this matrix represents the equation z = -2. Using z = -2, we back-substitute into the equation y - z = 0 (from the secon row) an obtain 0 S -2 y - z = 0 y - -22 = 0 y = 2 z = -2 Solve for y. Finally, we back-substitute y = 2 an z = -2 into the equation (from the first row) an obtain x + y + z = x + y + z = x + 2 + -22 = x = y = 2, z = -2 Solve for x. The solution of the system is x =, y = 2, z = -2. The steps that we use to solve the system of linear equations in Example 5 can be summarize as follows: Matrix Metho for Solving a System of Linear Equations (Row Echelon Form) STEP : Write the augmente matrix that represents the system. STEP 2: Perform row operations that place the entry in row, column. STEP : Perform row operations that leave the entry in row, column unchange, while causing 0 s to appear below it in column. STEP : Perform row operations that place the entry in row 2, column 2, but leave the entries in columns to the left unchange. If it is impossible to place a in row 2, column 2, then procee to place a in row 2, column. Once a is in place, perform row operations to place 0 s below it. [Place any rows that contain only 0 s on the left sie of the vertical bar, at the bottom of the matrix.] STEP 5: Now repeat Step, placing a in the next row, but one column to the right. Continue until the bottom row or the vertical bar is reache. STEP 6: The matrix that results is the row echelon form of the augmente matrix. Analyze the system of equations corresponing to it to solve the original system.
7 CHAPTER 0 Systems of Equations an Inequalities In the next example, we solve a system of linear equations using these steps. In aition, we solve the system using a graphing utility. EXAMPLE 6 Solving a System of Linear Equations Using Matrices (Row Echelon Form) Algebraic Solve: STEP : The augmente matrix of the system is x - y + z = c 2x + y - z = -2 x - 2y - 9z = 9 STEP 2: Because the entry is alreay present in row, column, we can go to step. STEP : Perform the row operations R 2 = -2r + r 2 an R = -r + r. Each of these leaves the entry in row, column unchange, while causing 0 s to appear uner it. - C 2 - -2-9 - C 2 - -2-9 -2 9 R 2 = -2r + r 2 R = -r + r STEP : The easiest way to obtain the entry in row 2, column 2 without altering column is to interchange rows 2 an (another way woul be to multiply row 2 by but this introuces fractions). 5, - C 0-2 -5 S 0 5 - - -2 S 9 - S : C 0 5-0 -2 - S -5 () () Graphing The augmente matrix of the system is - C 2 - -2-9 We enter this matrix into our graphing utility an name it A. See Figure 7(a). Using the REF (Row Echelon Form) comman on matrix A, we obtain the results shown in Figure 7(b). Since the entire matrix oes not fit on the screen, we nee to scroll right to see the rest of it. See Figure 7(c). Figure 7 (a) -2 S 9 To get a 0 uner the in row 2, column 2, perform the row operation R = -5r 2 + r. - C 0-2 0 5 - - -5 S : C 0-2 - 0 0 57 R = -5r 2 + r -5 S 57 (b) STEP 5: Continuing, we obtain a in row, column by using R = 57 r. - C 0-2 0 0 57-5 57 - S : C 0-2 R = 57 r 0 0-5 S (c) The system of equations represente by the matrix in row echelon form is
SECTION 0.2 Systems of Linear Equations: Matrices 79 STEP 6: The matrix on the right is the row echelon form of the augmente matrix. The system of equations represente by the matrix in row echelon form is x - y + z = c y - 2z = -5 z = Using z =, we back-substitute to get b x - y + = y - 22 = -5 () () () Simplify. b x - y = 7 y = - () We get y = -, an back-substituting into x - y = 7, we fin that x =. The solution of the system is x =, y = -, z =. e x - 2 y - z = y + 5 z = - 2 z = Using z =, we back-substitute to get x - 2 y - 2 = y + 5 2 = - 2 x - 2 y = 6 9 y = - = - () () () () From the secon equation we fin that y = -. Back-substituting y = - into x - 2 we fin that x =. The solu- y = 6, tion of the system is x =, y = -, z =. Notice that the row echelon form of the augmente matrix in the graphing solution iffers from the row echelon form in the algebraic solution, yet both matrices provie the same solution! This is because the two solutions use ifferent row operations to obtain the row echelon form. In all likelihoo, the two solutions parte ways in Step of the algebraic solution, where we avoie introucing fractions by interchanging rows 2 an. Sometimes it is avantageous to write a matrix in reuce row echelon form.in this form, row operations are use to obtain entries that are 0 above (as well as below) the leaing in a row. For example, the row echelon form obtaine in the algebraic solution to Example 6 is - C 0-2 0 0-5 S To write this matrix in reuce row echelon form, we procee as follows: - C 0-2 0 0 0 - -5 S : C 0-2 0 0-7 0 0-5 S : C 0 0 0 0 - S R = r 2 + r R = r + r R 2 = 2r + r 2 The matrix is now written in reuce row echelon form. The avantage of writing the matrix in this form is that the solution to the system, x =, y = -, z =, is
750 CHAPTER 0 Systems of Equations an Inequalities Figure reaily foun, without the nee to back-substitute. Another avantage will be seen in Section 0., where the inverse of a matrix is iscusse. Most graphing utilities also have the ability to put a matrix in reuce row echelon form. Figure shows the reuce row echelon form of the augmente matrix from Example 6 using the RREF comman on a TI- Plus graphing calculator. For the remaining examples in this section, we will only provie algebraic solutions to the systems.the reaer is encourage to verify the results using a graphing utility. NOW WORK PROBLEMS 7 AND 7. The matrix metho for solving a system of linear equations also ientifies systems that have infinitely many solutions an systems that are inconsistent. Let s see how. EXAMPLE 7 Solving a Depenent System of Linear Equations Using Matrices Solve: c 6x - y - z = -2x + 2y + 2z = - 5x + y - z = () () We start with the augmente matrix of the system an procee to obtain a in row, column with zeros below. 6 - - C -2 2 2 5 - - S : C -2 0-2 2 2 5 - -2 0 - S : C 0-22 2 0 - S -2 R = -r + r R 2 = 2r + r 2 R = -5r + r Obtaining a in row 2, column 2 without altering column can be accomplishe by R or by R an interchanging rows 2 an or by R 2 = 2 = 2 = - r + r 2. r 22 r 2 We shall use the first of these. -2 0 C 0-22 2 0 - -2 0 S : D0 - -2 0 - R 2 = - 22 r 2-2 0 2 - T : D0 - -2 0 0 0 R = -r 2 + r 2 - T 0 This matrix is in row echelon form. Because the bottom row consists entirely of 0 s, the system actually consists of only two equations. x - 2y = c y - z = - 2 () To make it easier to write own some of the solutions, we express both x an y in terms of z.
SECTION 0.2 Systems of Linear Equations: Matrices 75 From the secon equation, y = Now back-substitute this solution z - 2. for y into the first equation to get x = 2y + = 2a z - 2 b + = 2 z + 7 The original system is equivalent to the system x = 2 z + 7 y = z - 2 () where z can be any real number. Let s look at the situation. The original system of three equations is equivalent to a system containing two equations. This means that any values of x, y, z that satisfy both x = 2 z + 7 an y = z - 2 will be solutions. For example, z = 0, x = 7 an z = -, x = 5 are some of the solutions of the original system., y = -, y = - 2 ; z =, x = 9, y = - ; There are, in fact, infinitely many values of x, y, an z for which the two equations are satisfie. That is, the original system has infinitely many solutions. We will write the solution of the original system as x = 2 z + 7 y = z - 2 where z can be any real number. We can also fin the solution by writing the augmente matrix in reuce row echelon form. Starting with the row echelon form, we have 2 7-2 0 0 - D0-0 0 0 2 - T : E 0-0 0 0 0 R = 2r 2 + r The matrix on the right is in reuce row echelon form. The corresponing system of equations is 5 2 U - 0 x - 2 z = 7 y - z = - 2 ()
752 CHAPTER 0 Systems of Equations an Inequalities or, equivalently, x = 2 z + 7 y = z - 2 () where z can be any real number. NOW WORK PROBLEM 5. EXAMPLE Solving an Inconsistent System of Linear Equations Using Matrices Solve: x + y + z = 6 c 2x - y - z = x + 2y + 2z = 0 C 2 - - 2 2 We procee as follows, beginning with the augmente matrix. 6 0 S : C 0 - - 6 S : C 0-9 -6 0-6 0 - - -9 0 0 0 R 2 = -2r + r 2 Interchange rows 2 an. R = r 2 + r R = -r + r This matrix is in row echelon form. The bottom row is equivalent to the equation 0x + 0y + 0z = -27 6 S : C 0 6-6 S -27 which has no solution. Hence, the original system is inconsistent. NOW WORK PROBLEM 27. The matrix metho is especially effective for systems of equations for which the number of equations an the number of variables are unequal. Here, too, such a system is either inconsistent or consistent. If it is consistent, it will have either exactly one solution or infinitely many solutions. Let s look at a system of four equations containing three variables. EXAMPLE 9 Solving a System of Linear Equations Using Matrices Solve: x - 2y + z = 0 2x + 2y - z = - y - z = - -x + y + 2z = () () () We procee as follows, beginning with the augmente matrix.
SECTION 0.2 Systems of Linear Equations: Matrices 75 D -2 2 2-0 - - 2 0-2 - 0 6-5 T : D - 0-0 2 R 2 = -2r + r 2 Interchange rows 2 an. R = r + r -2 0-2 0 0 - : D - 0 - T : D - T 0 0 0 0 0 0 5 5 0 0 0 0 R = -6r 2 + r R = -5r + r R = -2r 2 + r We coul stop here, since the matrix is in row echelon form, an back-substitute z = to fin x an y. Or we can continue to obtain the reuce row echelon form. 0 - -2 0 0 0 - : D - 0 0 T : D 2 T 0 0 0 0 0 0 0 0 0 0 0 0 R = 2r 2 + r R = r + r R 2 = r + r 2 The matrix is now in reuce row echelon form, an we can see that the solution is x =, y = 2, z =. 0-2 - 0 - T : D - 0 6-5 0 2 0 - T - NOW WORK PROBLEM 69. EXAMPLE 0 Nutrition A ietitian at Cook County Hospital wants a patient to have a meal that has 65 grams of protein, 95 grams of carbohyrates, an 905 milligrams of calcium. The hospital foo service tells the ietitian that the inner for toay is chicken a la king, bake potatoes, an 2% milk. Each serving of chicken a la king has 0 grams of protein, 5 grams of carbohyrates, an 200 milligrams of calcium. Each serving of bake potatoes contains grams of protein, grams of carbohyrates, an 0 milligrams of calcium. Each glass of 2% milk contains 9 grams of protein, grams of carbohyrates, an 00 milligrams of calcium. How many servings of each foo shoul the ietitian provie for the patient? Let c, p, an m represent the number of servings of chicken a la king, bake potatoes, an milk, respectively. The ietitian wants the patient to have 65 grams of protein. Each serving of chicken a la king has 0 grams of protein, so c servings will have 0c grams of protein. Each serving of bake potatoes contains grams of protein, so p potatoes will have p grams of protein. Finally, each glass of milk has 9 grams of protein, so m glasses of milk will have 9m grams of protein. The same logic will result in equations for carbohyrates an calcium, an we have the following system of equations: 0c + p + 9m = 65 c 5c + p + m = 95 200c + 0p + 00m = 905 Protein equation Carbohyrate equation Calcium equation
75 CHAPTER 0 Systems of Equations an Inequalities Figure 9 The augmente matrix of this system is: 0 9 A = C 5 200 0 00 65 95 S 905 Then, using the RREF comman on a TI- Plus graphing calculator, we obtain the matrix in Figure 9. To meet the ietary requirements, the patient shoul receive.5 servings of chicken a la king, of a bake potato, an 2 glasses of milk. 2