7 4 Matrices and Systems of Equations Copyright

  • Slides: 31
Download presentation
7. 4 Matrices and Systems of Equations Copyright © Cengage Learning. All rights reserved.

7. 4 Matrices and Systems of Equations Copyright © Cengage Learning. All rights reserved.

What You Should Learn • Write matrices and identify their dimensions. • Perform elementary

What You Should Learn • Write matrices and identify their dimensions. • Perform elementary row operations on matrices. • Use matrices and Gaussian elimination to solve systems of linear equations. • Use matrices and Gauss-Jordan elimination to solve systems of linear equations. 2

Matrices 3

Matrices 3

Matrices In this section, you will study a streamlined technique for solving systems of

Matrices In this section, you will study a streamlined technique for solving systems of linear equations. This technique involves the use of a rectangular array of real numbers called a matrix. The plural of matrix is matrices. 4

Matrices 5

Matrices 5

Matrices The entry in the i th row and j th column is denoted

Matrices The entry in the i th row and j th column is denoted by the double subscript notation aij. For instance, the entry a 23 is the entry in the second row and third column. A matrix having m rows and n columns is said to be of dimension m n. If m = n the matrix is square of dimension m n (or n n). For a square matrix, the entries a 11, a 22, a 33, … are the main diagonal entries. 6

Example 1 – Dimension of a Matrix Determine the dimension of each matrix. a.

Example 1 – Dimension of a Matrix Determine the dimension of each matrix. a. [2] b. d. e. c. 7

Example 1 – Solution a. This matrix has one row and one column. The

Example 1 – Solution a. This matrix has one row and one column. The dimension of the matrix is 1 1. b. This matrix has one row and four columns. The dimension of the matrix is 1 4. c. This matrix has two rows and two columns. The dimension of the matrix is 2 2. d. This matrix has three rows and two columns. The dimension of the matrix is 3 2. e. This matrix has three rows and one column. The dimension of the matrix is 3 1. 8

Matrices A matrix that has only one row [such as the matrix in Example

Matrices A matrix that has only one row [such as the matrix in Example 1(b)] is called a row matrix, and a matrix that has only one column [such as the matrix in Example 1(e)] is called a column matrix. A matrix derived from a system of linear equations (each written in standard form with the constant term on the right) is the augmented matrix of the system. Moreover, the matrix derived from the coefficients of the system (but not including the constant terms) is the coefficient matrix of the system. 9

Matrices The matrix derived from the constant terms of the system is the constant

Matrices The matrix derived from the constant terms of the system is the constant matrix of the system. System: x – 4 y + 3 z = 5 – x – 3 y – z = – 3 2 x – 4 z = 6 Augmented Matrix: 10

Matrices Coefficient Matrix: Constant Matrix: 11

Matrices Coefficient Matrix: Constant Matrix: 11

Matrices Note the use of 0 for the missing coefficient of the y-variable in

Matrices Note the use of 0 for the missing coefficient of the y-variable in the third equation, and also note the fourth column (of constant terms) in the augmented matrix. The optional dotted line in the augmented matrix helps to separate the coefficients of the linear system from the constant terms. 12

Example 2 – Writing an Augmented Matrix Write the augmented matrix for the system

Example 2 – Writing an Augmented Matrix Write the augmented matrix for the system of linear equations. x + 3 y = 9 –y + 4 z = – 2 x – 5 z = 0 What is the dimension of the augmented matrix? 13

Example 2 – Solution Begin by writing the linear system and aligning the variables.

Example 2 – Solution Begin by writing the linear system and aligning the variables. x + 3 y = 9 – y + 4 z = – 2 x – 5 z = 0 Next, use the coefficients and constant terms as the matrix entries. Include zeros for the coefficients of the missing variables. 14

Example 2 – Solution cont’d The augmented matrix has three rows and four columns,

Example 2 – Solution cont’d The augmented matrix has three rows and four columns, so it is a 3 4 matrix. The notation Rn is used to designate each row in the matrix. For instance, Row 1 is represented by R 1. 15

Elementary Row Operations 16

Elementary Row Operations 16

Elementary Row Operations In matrix terminology, these three operations correspond to elementary row operations.

Elementary Row Operations In matrix terminology, these three operations correspond to elementary row operations. An elementary row operation on an augmented matrix of a given system of linear equations produces a new augmented matrix corresponding to a new (but equivalent) system of linear equations. Two matrices are row-equivalent when one can be obtained from the other by a sequence of elementary row operations. 17

Example 3 – Elementary Row Operations a. Interchange the first and second rows of

Example 3 – Elementary Row Operations a. Interchange the first and second rows of the original matrix. Original Matrix New Row-Equivalent Matrix b. Multiply the first row of the original matrix by Original Matrix New Row-Equivalent Matrix 18

Example 3 – Elementary Row Operations cont’d c. Add – 2 times the first

Example 3 – Elementary Row Operations cont’d c. Add – 2 times the first row of the original matrix to the third row. Original Matrix New Row-Equivalent Matrix Note that the elementary row operation is written beside the row that is changed. 19

Gaussian Elimination with Back-Substitution The next example demonstrates the matrix version of Gaussian elimination.

Gaussian Elimination with Back-Substitution The next example demonstrates the matrix version of Gaussian elimination. The basic difference between the two methods is that with matrices we do not need to keep writing the variables. 20

Example 4 – Comparing Linear Systems and Matrix Operations Linear System Associated Augmented Matrix

Example 4 – Comparing Linear Systems and Matrix Operations Linear System Associated Augmented Matrix x – 2 y + 3 z = 9 –x + 3 y + z = – 2 2 x – 5 y + 5 z = 17 Add the first equation to the second equation. Add the first row to the second row: R 1 + R 2. x – 2 y + 3 z = 9 y+ 4 z = 7 2 x – 5 y + 5 z = 17 21

Example 4 – Comparing Linear Systems and Matrix Operations Add – 2 times the

Example 4 – Comparing Linear Systems and Matrix Operations Add – 2 times the first equation to the third equation. x – 2 y + 3 z = 9 y + 4 z = 7 –y– z=– 1 cont’d Add – 2 times the first row to the third row: – 2 R 1+R 3 Add the second equation to the third equation. Add the second row to the third row: R 2 + R 3. x – 2 y + 3 z = 9 –x + 3 y + z = – 2 2 x – 5 y + 5 z = 17 22

Example 4 – Comparing Linear Systems and Matrix Operations Multiply the third equation by

Example 4 – Comparing Linear Systems and Matrix Operations Multiply the third equation by cont’d Multiply the third row by x – 2 y + 3 z = 9 y + 4 z = 7 z=2 At this point, you can use back-substitution to find that the solution is x = 1, y = – 1, and z = 2. 23

Gaussian Elimination with Back-Substitution The last matrix in Example 4 is in row-echelon form.

Gaussian Elimination with Back-Substitution The last matrix in Example 4 is in row-echelon form. The term echelon refers to the stair-step pattern formed by the nonzero elements of the matrix. 24

Gaussian Elimination with Back-Substitution To be in this form, a matrix must have the

Gaussian Elimination with Back-Substitution To be in this form, a matrix must have the following properties. 25

Gaussian Elimination with Back-Substitution Gaussian elimination with back-substitution works well for solving systems of

Gaussian Elimination with Back-Substitution Gaussian elimination with back-substitution works well for solving systems of linear equations by hand or with a computer. For this algorithm, the order in which the elementary row operations are performed is important. We should operate from left to right by columns, using elementary row operations to obtain zeros in all entries directly below the leading 1’s. 26

Example 6 – Gaussian Elimination with Back-Substitution Solve the system of equations. y +

Example 6 – Gaussian Elimination with Back-Substitution Solve the system of equations. y + z – 2 w = – 3 x + 2 y – z =2 2 x + 4 y + z – 3 w = – 2 x – 4 y – 7 z – w = – 19 Solution: Write augmented matrix. 27

Example 6 – Solution cont’d Interchange R 1 and R 2 so first column

Example 6 – Solution cont’d Interchange R 1 and R 2 so first column has leading 1 in upper left corner. Perform operations on R 3 and R 4 so first column has zeros below its leading 1. 28

Example 6 – Solution cont’d Perform operations on R 4 so second column has

Example 6 – Solution cont’d Perform operations on R 4 so second column has zeros below its leading 1. Perform operations on R 3 and R 4 so third and fourth columns have leading 1’s. 29

Example 6 – Solution cont’d The matrix is now in row-echelon form, and the

Example 6 – Solution cont’d The matrix is now in row-echelon form, and the corresponding system is x + 2 y – z = 2 y + z – 2 w = – 3 z– w=– 2 w= 3 Using back-substitution, you can determine that the solution is x = – 1, y = 2, z = 1, w = 3. Check this in the original system of equations. 30

Gaussian Elimination with Back-Substitution The following steps summarize the procedure used in Example 6.

Gaussian Elimination with Back-Substitution The following steps summarize the procedure used in Example 6. 31