Matrices & Systems of Linear Equations Special Matrices Zero Matrix SquareMatrix An n by n Matrix Exam ples: Exam ples: 0 0 O22 , O14 0 0 0 0 0 0 5, 0 0 0 0 O21 , O33 0 0 0 0 0 0 0 1 0 2 0 3 1 4 1 1 0 5 2, 1 8 1 8 5 4 2 0 1 0 6 2 1 9 3 5 4 Special Matrices Diagonal Matrix Identity Matrix A square m atrixif all entries that are not on the m ain A is diagonal m atrixif all entries that are on the m ain diogonalare zeroes diogonal are ones Exam ples: Exam ples: 5, 1 0 0 0 1 0 0 2 , 0 0 0 7 0 0 0 5 0 0 0 8 1 0 0 0 1 0 0 0 4 I11 1, 1 0 I 44 0 0 1 0 I 22 , 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 I 33 0 1 0 0 0 1 Equality of Matrices Two matrices are said to be equal if they have the same size and their corresponding entries are equal Are the following m atricesequal? 1 1 2 3 4 2 5 6 7 8 , 3 9 0 5 5 4 5 9 6 0 7 5 8 5 Are the following m atricesequal? 1 2 1 2 3 4 , 5 4 Equality of Matrices Use the given equality to find x, y and z 1. 1 1 2 3 4 5 6 7 8 5 9 9 0 5 5 2. y 1 2 x 3 4 3 2 z 5 2 x 2 4 y3 7 8 5 0 5 2 z Matrix Addition and Subtraction Example (1) 1 2 3 0 5 1 4 5 6 2 4 6 7 8 9 8 1 3 1 0 2 5 3 1 4 2 5 4 6 6 7 8 8 1 9 3 1 7 4 6 9 12 15 9 12 Matrix Addition and Subtraction Example (2) 1 2 3 0 5 1 4 5 6 2 4 6 7 8 9 8 1 3 1 0 2 5 3 1 4 2 5 4 6 6 7 8 8 1 9 3 1 3 2 2 1 0 1 7 6 Multiplication of a Matrix by a Scalar Exam ple(1) 1 2 3 5(1) 5(2) 5(3) 5 4 0 6 5(4) 5(0) 5(6) 7 1 9 5(7) 5(1) 5(9) 5 10 15 20 0 30 35 5 45 Exam ple(2) 1 1 2 3 0 5 2 4 5 6 (1) 2 4 6 7 8 9 8 1 3 2 4 6 0 5 1 8 10 12 2 4 6 14 16 18 8 1 3 2 1 5 6 6 6 6 17 21 Matrix Multiplication (n by m) Matrix X (m by k) Matrix The number of columns of the matrix on the left = number of rows of the matrix on the right The result is a (n by k) Matrix Matrix Multiplication 3x3 X 3x3 a1 a 2 a 3 x1 y1 z1 b b b x y z 2 3 2 2 2 1 c1 c 2 c 3 x3 y3 z 3 a1 x1 a 2 x2 a 3 x3 a1 y1 a 2 y2 a 3 y3 b1 x1 b 2 x2 b 3 x3 b1 y1 b 2 y2 b 3 y3 c1 x1 c 2 x2 c 3 x3 c1 y1 c 2 y2 c 3 y3 a1 z1 a 2 z 2 a 3 z3 b1 z1 b 2 z 2 b 3 z3 c1 z1 c 2 z 2 c 3 z3 Matrix Multiplication 1x3 X 3x3→ 1x3 x1 y1 z1 a1 a 2 a 3 x2 y 2 z 2 x3 y 3 z 3 a 1 x1 a 2 x 2 a 3 x3 a 1 y1 a 2 y 2 a 3 y 3 a 1 z1 a 2 z 2 a 3 Example (1) 1 4 1 2 1 0 0 2 0 1 2 1 1 1 1 1(2) 4(0) (1)(1) (0)(2) (0)(0) (2)(1) (2)(2) (1)(0) (1)(1) 1 4 2 2 2 4 3 2 3 0 1 2 1(1) 4(1) (1)(1) 1(0) 4(1) (1)(2) (0)(1) (0)(1) (2)(1) (0)(0) (0)(1) (2)(2) (2)(1) (1)(1) (1)(1) (2)(0) (1)(1) (1)(2) Example (2) (1X3) X (3X3) → 1X3 0 1 3 2 3 4 1 2 10 2 3 4 2(0) 3(1) 4(2) 2(1) 3(2) 4(3) 2(3) 3(10) 4(4) 11 4 52 Example (3) (3X1) X (1X2) → 3X2 5 1 6 7 0 5(6) 1(6) 0(6) 30 6 0 5(7) 1(7) 0(7) 35 7 0 Example (4) 1 2 1 1 1 3 0 4 5 2 1 2 1 1 2 1 1 1 3 1 1 3 0 4 5 0 4 5 3 4 0 0 1 11 4 16 37 Transpose of Matrix a1 A b1 c1 a2 b2 c2 a3 b3 c3 a1 AT a2 a3 b1 b2 b3 c1 c2 c3 Exam ple(1) T 1 2 3 1 4 0 4 5 6 2 5 7 0 7 8 3 6 8 Exam ple(2) 1 2 3 1 2 3 4 5 6 34 5 6 2 I 3 0 7 8 0 7 8 T 6 9 1 4 0 3 1 0 0 2 5 7 12 15 18 2 0 1 0 3 6 8 0 21 24 0 0 1 4 10 9 2 0 0 14 10 25 0 2 0 3 27 32 0 0 2 2 10 9 14 12 25 3 27 30 Exam ple(3) T 1 2 3 T 1 2 3 4 5 6 4 5 6 0 7 8 0 7 8 Properties of the Transpose 1. ( A ) A T T 2. ( AB) B A T T T Matrix Reduction Definitions (1) 1. Zero Row: A row consisting entirely of zeros 2. Nonzero Row: A row having at least one nonzero entry 3. Leading Entry of a row: The first nonzero entry of a row. Matrix Reduction Definitions (2) Reduced Matrix: A matrix satisfying the following: 1. All zero rows, if any, are at the bottom of the matrix 2. The leading entry of a row is 1 3. All other entries in the column in which the leading entry is located are zeros. 4. A leading entry in a row is to the right of a leading entry in any row above it. Examples of Reduced Matrices 1. 1 0 0 0 1 0 0 0 1 2. 1 0 0 0 1 0 0 0 0 3. 1 0 5 0 1 7 0 0 0 Examples matrices that are not reduced 1 0 0 0 6 0 1. 0 0 1 The leading entry in row 2 is not 1 0 1 0 1 0 0 2. 0 0 0 The leading entry in row 2 is not to the right of the leading entry in the row aboveit. 1 0 0 0 0 0 3. 0 1 0 Row 2 is a zero row but not at the bottomof the m atrix. 1 3 0 0 1 2 4. 0 0 0 The leading entry in row 2 is 1, but not all other entries in the colum n in which it is located are zeros ( Notice the 3 in the colum n) Elementary Row Operations 1. Interchanging two rows 2. Replacing a row by a nonzero multiple of itself 3. Replacing a row by the sum of that row and a nonzero multiple of another row. Interchanging Rows 3 0 2 3 6 12 5 2 2 R1 R2 3 6 12 0 2 3 5 2 2 Replacing a row by a nonzero multiple of itself 3 6 12 1 R1 3 0 2 3 5 2 2 1 2 4 0 2 3 5 2 2 Replacing a row by the sum of that row and a nonzero multiple of another row 1 2 4 0 2 3 5 2 2 R3 ( 5 R1 ) 2 4 1 0 2 3 0 12 22 Augmented Matrix Representing a System of linear Equations The system of linear equations: 2 y 3z 7 3 x 6 y 12z 3 5 x 2 y 2 z 7 Is represented by the augm entedm atrix: 0 2 3 7 3 6 12 3 5 2 2 7 Exam ple(1) Re ducethe two by two m atrix on the right of the following augm entedm atrixby applyingbasic row operations: 1 2 5 3 4 6 Solution: 1 2 5 3 4 6 R2 3 R1 1 2 5 0 2 9 R1 R2 1 0 4 0 2 9 ( 12 R2 ) 1 0 4 9 0 1 2 Solving a System of Linear Equations by Reducing its Augmented Matrix Using Row Operations Exam ple(1) Solvethe following system of linear equations: x 2 y 5 3x 4 y 6 Solution: We constructthe augm entedm atrix: operations: 1 2 5 3 4 6 We reducethis m atrix arriving at the m atrix: 1 0 4 9 0 1 2 We concludethat : x 4 & y 9 2 Exam ple(2) Solvethe following system of linear equations: 2 y 3z 7 3 x 6 y 12z 3 5 x 2 y 2 z 7 by reducingits augm entedm atrix: 0 2 3 7 3 6 12 3 5 2 2 7 Solution 0 2 3 7 3 6 12 3 5 2 2 7 1 R1 3 1 R2 2 3 6 12 3 0 2 3 7 5 2 2 7 R1 R 2 1 2 4 1 3 7 0 2 5 2 2 7 1 2 4 1 3 7 0 1 2 2 0 12 22 2 R3 ( 5 R1 ) R1 ( 2 R 2 ) 1 2 4 1 2 3 7 0 0 12 22 2 1 0 7 8 3 7 0 1 2 2 0 12 22 2 1 0 7 8 3 7 0 1 2 2 0 12 22 2 1 R3 40 1 0 7 8 3 7 0 1 2 2 0 0 1 1 R2 ( 32 R3 ) R3 12 R2 R1 7 R3 1 0 0 1 0 1 0 2 0 0 1 1 1 0 7 8 3 7 0 1 2 2 0 0 40 40 1 0 0 1 3 7 0 1 2 2 0 0 1 1 Solution of the System 1 0 0 1 0 1 0 2 0 0 1 1 Thus, x 1 y2 z 1 The Idea behind the Reduction Method The system of linear equations: 2 y 3z 7 3x 6 y 12z 3 5 x 2 y 2 z 7 The augm entedm atrix: 0 2 3 7 3 6 12 3 5 2 2 7 Interchanging the First & the Second Row Intercangingt the places Betweem Eq(1) and Eq(2) : 2 y 3z 7 3x 6 y 12z 3 5 x 2 y 2 z 7 3x 6 y 12z 3 2 y 3z 7 5 x 2 y 2 z 7 0 2 3 7 3 6 12 3 5 2 2 7 R1 R2 3 6 12 3 0 2 3 7 5 2 2 7 Multiplying the first Equation by 1/3 3x 6 y 12z 3 2 y 3z 7 3 6 12 3 0 2 3 7 5 2 2 7 5 x 2 y 2 z 7 x 2 y 4 z 1 2 y 3z 7 5 x 2 y 2 z 7 1 R1 3 1 2 4 1 0 2 3 7 5 2 2 7 Subtracting from the Third Equation 5 times the First Equation x 2 y 4 z 1 2 y 3z 7 5 x 2 y 2 z 7 1 2 4 1 3 7 0 2 5 2 2 7 x 2 y 4 z 1 2 y 3z 7 12 y 22z 2 R3 ( 5 R1 ) 1 2 4 1 2 3 7 0 0 12 22 2 Subtracting from the First Equation 2 times the Second Equation x 2 y 4 z 1 3 7 y z 2 2 12 y 22z 2 x 7 z 8 3 7 y z 2 2 12 y 22z 2 1 2 4 1 3 7 0 1 2 2 0 12 22 2 R1 ( 2 R2 ) 1 0 7 8 3 7 0 1 2 2 0 12 22 2 Adding to the Third Equation 12 times the Second Equation x 7 z 8 3 7 y z 2 2 12 y 22z 2 1 0 7 8 3 7 1 2 2 0 0 12 22 2 x 7 z 8 3 7 y z 2 2 40z 40 R3 12 R2 1 0 7 8 3 7 0 1 2 2 0 0 40 40 Dividing the Third Equation by 40 x 7 z 8 3 7 y z 2 2 40z 40 1 0 7 8 3 7 0 1 2 2 0 0 40 40 x 7 z 8 3 7 y z 2 2 z 1 1 R3 40 1 0 7 8 3 7 0 1 2 2 0 0 1 1 Adding to the First Equation 7 times the third Equation x 7 z 8 3 7 y z 2 2 z 1 x 1 3 7 y z 2 2 z 1 1 0 7 8 3 7 0 1 2 2 0 0 1 1 1 0 0 1 R1 7 R3 3 7 0 1 2 2 0 0 1 1 Subtracting from the Second Equation 3/2 times the third Equation x 1 3 7 y z 2 2 z 1 x 1 y2 z 1 1 0 0 1 3 7 0 1 2 2 0 0 1 1 1 0 0 1 R2 ( 32 R3 ) 0 1 0 2 0 0 1 1 Systems with infinitely many Solutions Exam ple(1) : Solvethe following system : x 2 y 3 2 x 4 y 6 Notice that the sec ond equationis the sam e as the first (Why ?) Thus, we have only one equation: x 3 2y By letting y be any real num berr , we get : x 3 2r As shown in the oppositetable: y=r x=3-2r 0 3 -1 5 1 1 10 -17 Let' s considerthe augm entedm atrix: 1 2 3 2 4 6 We reducethis m atrix arriving at the m atrix: 1 2 3 0 0 0 Thus : x 2y 3 00 x 3 2y R2 ( 2 R )1 Systems with infinitely many Solutions Exam ple(2) : Solvethe following system : x 2 y z 0 2 x y 5 z 0 x y 4z 0 Notice that when subtracting Eq(1) from Eq(2), we get Eq(3) Thus, we have only two independent equations Subtracting Eq(1) from Eq(3), we get : 3 y 3z 0 y z Substituting that in Eq(1), we get : x 2 z z 0 x 3 z Thus letting z be any real num berr , we get : x 3r and y r As shown in the oppositetable: z=r x=-3r y=-r 0 0 0 1 -3 -1 -10 30 10 1/3 -1 -1/3 Let ' s consider the augm entedm atrix: 1 2 1 0 2 1 5 0 1 1 4 0 Let ' s reduce this m atrix arriving at the m atrix: 1 0 3 0 0 1 1 0 0 0 0 0 The last row does not contributeany inf orm ation: 0 0 The other rows gives us : x 3z 0 and y z 0 x 3 z and y z By letting z be any real num berr , we get : x 3r and y r Details of reduction 1 2 1 0 1 2 1 0 R2 ( R1 ) 2 1 5 0 1 1 4 0 1 1 4 0 1 1 4 0 1 2 1 0 3 0 9 0 3 ( R2 ) 1 ( 2 R2 ) R 1 1 4 0 R 1 1 4 0 0 0 0 0 0 0 0 0 1 0 3 0 1 1 4 0 0 0 0 0 1 R1 3 1 0 3 0 2 ( R1 ) R 0 1 1 0 0 0 0 0 Systems with no Solution Exam ple(1) : Solvethe following system : x 2 y 3 2 x 4 y 8 Notice that the sec ond equationcontradicts the first (Why ?) 1 Dividing the secon Eq by the num ber2 ( Multiplying by ) : 2 x 2 y 4 (3) But the first Eq claim sthat : x 2 y 3 By subtracting Eq(1) from Eq(3), we get the im possiblestatem ent: 0 1 Thus there are no num bersx and y satisfying both equations Thus the system has no solution Let' s considerthe augm entedm atrix: 1 2 3 2 4 8 We reducethis m atrix arriving at the m atrix: 1 2 3 0 0 2 Thus : x 2y 3 02 Which is im possible R2 ( 2 R )1 Exam ple(2) : Solve the following system : x 2 y 4z 6 y 2z 3 x y 2z 1 Notice that when subtracting Eq(3) from Eq(1), we get y 2 z 5 (4) This equationcontradicts Eq(2), which states that : y 2 z 3 Subtracting Eq(2) from Eq(4), we get the im possiblestatem ent: 02 Thus, there are no real num bersx, y and z saisfying all the three equations of the system. the system has no slution Let ' s consider the augm entedm atrix: 1 2 4 6 0 1 2 3 1 1 2 1 Let ' s reduce this m atrix arriving at the m atrix: 1 0 0 0 0 1 2 0 0 0 0 1 This corresponds to the system( which has no solution) x 0 y 2z 0 0 1 Details of the reduction 1 2 4 6 1 2 4 6 R3 ( R1 ) 0 1 2 3 0 1 2 3 1 1 2 1 0 1 2 5 1 0 1 0 0 0 0 0 1 ( 2 R2 ) 3 ( R2 ) R 0 1 2 3 R 0 1 2 3 0 1 2 5 0 0 0 2 1 0 0 0 0 1 2 3 0 0 0 1 1 ( ) R3 2 1 0 0 0 2 ( 3 R3 ) R 0 1 2 0 0 0 0 1 A better approach: 1 2 4 6 0 1 2 5 R1 ( R3 ) 0 1 2 3 0 1 2 3 1 1 2 1 1 1 2 1 0 0 0 2 1 ( R2 ) R 0 1 2 3 1 1 2 1 Which corrresponds to the system : 0 2 y 2z 3 x y 2z 1 which has no solution Finding the Inverse of an nXn square Matrix A 1. Adjoin the In identity matrix to obtain the Augmented matrix [A| In ] 2. Reduce [A| In ] to [In | B ] if possible Then B = A-1 Example (1) 2 1 0 Let A 4 2 1 1 2 10 Solution: Find A1 1 0 2 1 0 0 4 2 1 0 1 0 1 2 10 0 0 1 ( 4 R1 ) R2 ( R1 ) R3 ( R2 ) R3 1 0 2 1 0 0 0 2 9 4 1 0 1 2 10 0 0 1 1 0 2 1 0 0 0 2 9 4 1 0 0 2 8 1 0 1 1 0 2 1 0 0 0 2 9 4 1 0 1 0 0 1 5 1 1 ( 2 R3 ) R1 ( 9 R3 ) R2 12 R2 1 0 0 9 2 2 0 2 9 4 1 0 0 0 1 5 1 1 1 0 0 9 2 2 0 2 0 41 8 9 0 0 1 5 1 1 1 0 0 9 2 2 9 41 0 1 0 4 2 2 0 0 1 5 1 1 Thus, 9 2 2 A1 412 4 92 5 1 1 1 2 3 Let A 2 1 2 3 3 5 Solution: Example (2) Find A1 1 2 3 1 0 0 2 1 2 0 1 0 3 3 5 0 0 1 ( 2 R1 ) R 2 ( 3 R1 ) R3 1 2 3 1 0 0 0 3 4 2 1 0 3 3 5 0 0 1 1 2 3 1 0 0 0 3 4 2 1 0 0 3 4 3 0 1 1 2 3 1 0 0 0 3 4 2 1 0 0 0 0 1 1 1 Thus A has no inverse ( R 2 ) R3 AnotherWay : 1 2 3 1 2 1 2 0 3 3 5 0 1 ( R1 ) R2 3 3 0 0 1 0 0 1 2 3 1 0 0 3 5 1 1 0 3 5 0 0 1 1 2 3 1 0 0 3 3 5 1 1 0 0 0 0 1 1 1 Thus A has no inverse ( R2 ) R3 Inverse Matrix The formula for the inverse of a 2X2 Matrix Exam ple: Let a b A c d & det A ad bc If det A 0, Then : 1 d b A det A c a 1 2 5 LeT : A 3 9 2 5 det A 18 15 3 0 3 9 1 9 5 1 9 5 A det A 3 2 3 3 2 5 3 3 2 1 3 1 Check that : Checking AA1 I 2 A 1 A 5 5 3 3 2 5 3 1 0 3 2 5 3 9 1 2 0 1 1 2 3 9 3 3 Using the Inverse Matrix to Solve System of Linear Equations Solvethe following system of linear equations: 2 x 5 y 9 3x 9 y 15 Re writing in m atrix form : 2 x 5 y 9 3x 9 y 15 2 5 x 9 3 9 y 15 5 5 3 3 2 5 x 3 3 9 2 3 9 y 2 15 1 1 3 3 5 3 ( 9 ) ( )( 15 ) x 3 I2 y (1)(9) ( 2 )(15) 3 x 2 y 1 Thus, The Solutionis : x 2 and y 1 Problem Solvethe following system of linear equations: 2 x y z 1 3x 2 y z 2 2 x y 2 z 1 If given that : 1 2 1 1 3 1 1 3 2 1 4 2 1 2 1 2 1 0 1 2 x y z 1 3 x 2 y z 2 2 x y 2 z 1 Re writing in m atrix form : 2 x y z 1 1 3x 2 y z 2 2 x y 2 z 1 2 1 1 x 1 3 2 1 y 2 2 1 2 z 1 3 1 1 2 1 1 x 3 1 1 1 4 2 1 3 2 1 y 4 2 1 2 1 0 1 2 1 2 z 1 0 1 1 x 2 I 3 y 1 z 2 x 2 y 1 z 2 Thus, The Solutionis : x2 , y 1 and z 2 Homework 6.1 6.2 6.3 6.5 6.6 1. Examples: 3 Exercises: 17 - 20 Examples: 1, 2, 4, 5 and 6 Exercises: odd numbered:1—17 and 25,29,35,37,39,41 Examples: 1, 2, 3, 4, 5, 7, 10, 11, 12 and 13. Exercises:19, 21, 23, 25, 27, 31, 33, 37, 51, 53, 57, 59, 61 Examples: 2, 3.a and 4. See given exercises. Examples: 1 - 6 Exercises: odd numbered:1—15, 21, 27, 29, 35 and 37.