1 / 18

Matrix Solutions to Linear Systems

Matrix Solutions to Linear Systems. 3 x. +. y. +. 2 z. =. 31. 3. 1. 2. 31. x. +. y. +. 2 z. =. 19. 1. 1. 2. 19. x. +. 3 y. +. 2 z. =. 25. 1. 3. 2. 25. x. +. 2 y. –. 5 z. =. 31. 1. 2. -5. -19. y. +. 3 z. =. 19. 0. 1. 3. 9. z. =. 25. 0. 0. 1.

Download Presentation

Matrix Solutions to Linear Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Matrix Solutions to Linear Systems

  2. 3x + y + 2z = 31 3 1 2 31 x + y + 2z = 19 1 1 2 19 x + 3y + 2z = 25 1 3 2 25 x + 2y – 5z = 31 1 2 -5 -19 y + 3z = 19 0 1 3 9 z = 25 0 0 1 4 Solving Linear Systems by Using Matrices A matrix gives us a shortened way of writing a system of equations. The first step in solving a system of linear equations using matrices is to write the augmented matrix. An augmented matrix has a vertical bar separating the columns of the matrix into two groups. The coefficients of each variable are placed to the left of the vertical line, and the constants are placed to the right. If any variable is missing, its coefficient is 0. Here are two examples.

  3. Write the augmented matrix for the following system: 2x-3y+z = -23x-5z = 64x-3y+z = 2 Solution: Example

  4. 1 2 -5 -19 0 1 3 9 0 0 1 4 1 2 -5 -19 0 1 3 9 0 0 1 4 Text Example Write the solution set for a system of equations represented by the matrix Solution The system represented by the matrix is 1x + 2y – 5z = -19 0x + 1y + 3z = 9 0x + 0y + 1z = 4 This system can be simplified as follows. x + 2y – 5z = -19 y + 3z = 9 z = 4 Equation 1 Equation 2 Equation 3

  5. Text Example cont. Solution The value of z is known. We can find y by back-substitution. y + 3z = 9 Equation 2 y + 3(4) = 9 Substitute 4 for z. y + 12 = 9 Multiply. y = -3 Subtract 12 from both sides. With values for y and z, we can now use back-substitution to find x. x + 2y – 5z = -19 Equation 1 x + 2(-3) – 5(4) = -19 Substitute -3 for y and 4 for z. x – 6 – 20 = -19 Multiply. x – 26 = -19 Add. x = 7 Add 26 to both sides. We see that x = 7, y = -3, and z = 4. The solution set for the system is {(7, -3, 4)}.

  6. Matrix Row Operations • These row operations produce matrices that lead to systems with the same solution set as the original system. • Two rows of a matrix may be interchanged. This is the same as interchanging two equations in the linear system. • The elements in any row may be multiplied by a nonzero number. This is the same as multiplying both sides of an equation by a nonzero number. • The elements in any row may be multiplied by a nonzero number, and these products may be added to the corresponding elements in any other row. This is the same as multiplying both sides of an equation by a nonzero number and then adding equations to eliminate a variable. • Two matrices are row equivalent if one can be obtained from the other by a sequence of row operations.

  7. 3 18 -12 21 1 2 -3 5 -2 -3 4 -6 1 2 -3 5 This was row 2; now it’s row 1. 3 18 -12 21 This was row 1; now it’s row 2. -2 -3 4 -6 Text Example Use the matrix And perform each indicated row operation: a. R1R2 b. 3R1 c. 2R2 + R3 Solution a. The notation R1R2 means to interchange the elements in row 1 and row 2. This results in the row-equivalent matrix.

  8. 3•1 3•2 3•(-3) 3•5 1 2 -3 5 3 18 -12 21 3 18 -12 21 -2 -3 4 -6 -2 -3 4 -6 1 2 -3 5 3 18 -12 21 3 18 -12 21 1 2 -3 5 -2+2 -3+4 4-6 -6+10 0 1 -2 4 Solution Text Example cont. b. The notation 3R1 means to multiply each element in row 1 by 3. This results in the row-equivalent matrix. . = c. The notation 2R2 + R3 means to add 2 times the elements in row 2 to the corresponding elements in row 3. Replace the elements in row 3 by these sums. First, we find 2 times the elements in row 2: 2(1) or 2, 2(2) or 4, 2(-3) or –6, 2(5) or 10. Now we add these products to the corresponding elements in row 3. Although we use row 2 to find the products, row 2 does not change. It is the elements in row 3 that change, resulting in the row-equivalent matrix =

  9. Solving Linear Systems Using Gaussian Elimination • Write the augmented matrix for the system • Use matrix row operations to simplify the matrix to one with 1s down the diagonal from upper left to lower right, and 0s below the 1s • Write the system of linear equations corresponding to the matrix in step 2, and use back-substitution to find the system’s solutions

  10. 3x + y + 2z = 31 x + y + 2z = 19 x + 3y + 2z = 25 3x + y + 2z = 31 3 1 2 31 x + y + 2z = 19 1 1 2 19 x + 3y + 2z = 25 1 3 2 25 Text Example Use matrices to solve the system Solution Step 1Write the augmented matrix for the system. Linear System Augmented Matrix

  11. 1 a b c 0 1 d e 0 0 1 f 3 1 2 31 We want 1 in this position. 1 1 2 19 1 3 2 25 1 1 2 19 This was row 2; now it’s row 1. 3 1 2 31 This was row 1; now it’s row 2. 1 3 2 25 Text Example cont. Solution Step 2Use matrix row operations to simplify the matrix to one with 1s down the diagonal from upper left to lower right, and 0s below the 1s. Our goal is to obtain a matrix of the form . Our first step in achieving this goal is to get 1 in the top position of the first column. To get 1 in this position, we interchange rows 1 and 2. (We could also interchange rows 1 and 3 to attain our goal.)

  12. 1 1 2 19 3 1 2 31 We want 0 in these positions. 1 3 2 25 1 1 2 19 1 1 2 19 3 + (-3) 1 + (-3) 2 + (-3) 31 + (-3) 0 -2 -4 -26 1 3 2 25 1 3 2 25 We want 0 in this position. Text Example cont. Solution Now we want to get 0s below the 1 in the first column. Let’s first get a 0 where there is now a 3. If we multiply the top row of numbers by –3 and add these products to the second row of numbers, we will get 0 in this position. The top row of numbers multiplied by –3 gives -3(1) or –3, -3(1) or –3, -3(2) or –6, -3(19) or –57. Now add these products to the corresponding numbers in row 2. Notice that although we use row 1 to find the products, row 1 does not change. =

  13. 1 1 2 19 1 1 2 19 0 -2 -4 -26 0 -2 -4 -26 1 + (-1) 3 + (-1) 2 + (-2) 25+(-19) 0 2 0 6 1 1 2 19 We want 1 in this position. 0 -2 -4 -26 0 2 0 6 Text Example cont. Solution We are not yet done with the first column. If we multiply the top row of numbers by –1 and add these products to the third row of numbers, we will get 0 in this position. The top row of numbers multiplied by –1 gives -1(1) or –1, -1(1) or –1, -1(2) or –2, -1(19) or –19. Now add these products to the corresponding numbers in row 3. = We move on to the second column. We want 1 in the second row, second column.

  14. 1 1 2 19 1 1 2 19 › (0) › (-2) › (-4) › (-26) 0 1 2 13 0 2 0 6 0 2 0 6 We want 0 in this position. 1 1 2 19 1 1 2 19 0 1 2 13 0 1 2 13 0 + 0 2 + (-2) 0 + (-4) 6+(-26) 0 0 -4 -20 Text Example cont. Solution To get 1 in the desired position, we multiply –2 by its reciprocal, -1/2. Therefore, we multiply all the numbers in the second row by –1/2 to get = We are not yet done with the second column. If we multiply the top row of numbers by –2 and add these products to the third row of numbers, we will get 0 in this position. The second row of numbers multiplied by –2 gives -2(0) or 0, -2(1) or –2, -2(2) or –4, -2(13) or –26. Now add these products to the corresponding numbers in row 3. =

  15. 1 1 2 19 We want 1 in this position. 0 1 2 13 0 0 -4 -20 1 1 2 19 1 1 2 19 0 1 2 13 0 1 2 13 -1/4(0) -1/4(0) -1/4(-4) -1/4(-20) 0 0 1 5 Text Example cont. Solution We move on to the third column. We want 1 in the third row, third column. To get 1 in the desired position, we multiply –4 by its reciprocal, -1/4. Therefore, we multiply all the numbers in the third row by –1/4 to get = We now have the desired matrix with 1s down the diagonal and 0s below the 1s. Step 3Write the system of linear equations corresponding to the matrix in step 2, and use back-substitution to find the system’s solution. The system represented by the matrix in step 2 is

  16. 3 1 2 31 x + y + 2z = 19 1 1 2 19 y + 2z = 13 1 3 2 25 z = 5 Text Example cont. Solution We immediately see that the value for z is 5. To find y, we back-substitute 5 for z in the second equation. y + 2z = 13 Equation 2 y + 2(5) = 13 Substitute 5 for x. y = 3 Solve for y. Finally, back-substitute 3 for y and 5 for z in the first equation: x + y + 2z = 19 Equation 1 x + 3 + 2(5) = 19 Substitute 3 for y and 5 for x. x + 13 = 19 Multiply and add. x = 6 Subtract 13 from both sides. The solution set for the original system is {(6, 3, 5)}.

  17. Solving Linear Systems Using Gauss-Jordan Elimination • Write the augmented matrix for the system. • Use matrix row operations to simplify the matrix to one with 1s down the diagonal from upper left to lower right, and 0s above and below the 1s. • Use the reduced row-echelon form of the matrix in step 2 to write the system’s solutions set. (Back-substitution is not necessary.)

  18. Matrix Solutions to Linear Systems

More Related