ENGR-1100 Introduction to Engineering Analysis Lecture 21 Lecture outline Procedure (algorithm) for finding the inverse of invertible matrix. Investigate the system of linear equation and invertibility of matrices. Determinants: Finding determinants by cofactor expansion along any row or column. S 1
Definition: row equivalent Matrices that can be obtained from one another by a finite sequence of elementary row operations are said to be row equivalent. A Finite sequence of row operation B A Inverse of the row operation in reverse order B A is row equivalent to B Theorem 1 If A is an nxn matrix, then the following statements are equivalent, that is, if one is true then all are: (a) A is invertible (b) AX=0 has only the trivial solution (the only solution is x 1 =0, x 2 =0 x n =0) (c) A is row equivalent to I n. If A -1 exists then A Finite sequence of row operation I n S 2
(b) AX=0 has only the trivial solution (the only solution is x 1 =0, x 2 =0 x n =0) a 11 a 12. a 1n 0 1 0 0. 0 0 a 21 a 22. a 2n 0 Finite sequence 0 1 0. 0 0 : : : : : : : : of row operation 0 0 1. 0 0 : : : a n1 a n2. a nn 0 0 0 0. 1 0 x 1 =0, x 2 =0 x n =0 Theorem 2 If A is an nxn invertible matrix, then the sequence of row operations that reduces A to I n reduces I n to A -1. A The same sequence I n I n of row operation A -1 S 3
The procedure The same sequence A I n I n A -1 of row operation Example 1: Find the inverse of 1 2 3 2 5 3 1 0 8 1 2 3 2 5 3 1 0 8 1 0 0 0 1 0 0 0 1 * 2 * 1 1 2 3 0 1-3 0-2 5 1 0 0-2 1 0-1 0 1 * 2 S 4
1 2 3 0 1-3 0 0-1 1 0 0-2 1 0-5 2 1 * -1 1 2 3 0 1-3 0 0 1 1 2 3 0 1 0 0 0 1 1 0 0-2 1 0 5-2 -1 * 3 1 0 0 13-5 -3 5-2 -1 * -3 1 2 0 0 1 0 0 0 1-14 6 3 13-5 -3 5-2 -1 * -2 1 0 0 0 1 0 0 0 1-40 16 9 13-5 -3 5-2 -1 Thus: A -1 = -40 16 9 13-5 -3 5-2 -1 S 5
Statement: If the procedure used in this example is attempted on a matrix that is not invertible, then, it will be impossible to reduce the left side to I by row operation. At some point in the computation a row of zeros will occur on the left side, and it can be concluded that the given matrix is not invertible. 1 0 0. 0 0 1 0. 0 0 0 1. 0 : : : 0 0 0. 0 1 2 3 2 5 3 1 0 8 In last example we found that A is invertible. What can we say about the following system of linear equations? (hint: use theorem 1) x 1 +2x 2 +3x 3 =0 2x 1 +5x 2 +3x 3 =0 x 1 +8x 3 =0 Answer: The system has only the trivial solution using the second statement in theorem 1 : x 1 =x 2 =x 3 =0 S 6
Class assignment 1: Find the inverse of the following matrices (if the matrices are invertible), and verify (for the invertible matrices) by multiplying the original matrix 3 1 5 1 0 1 2 4 1 B= 0 1 1-4 2-9 1 1 0 S 7
System of linear equations and invertibility S 8
Theorem 1 If A is invertible nxn matrix, then for each nx1 matrix B, the system of equation AX=B has exactly one solution, namely X= A -1 B. a 11 a 12. a 1n x 1 B 1 a 21 a 22. a 2n x 2 = B 2 : : : : : a n1 a n2. a nn x 1 x n a 11 a 12. a 1n -1 B n B 1 x 2 = a 21 a 22. a 2n B 2 : : : : : x n a n1 a n2. a nn B n Example: consider the system of linear equations: x 1 +2x 2 +3x 3 =5 2x 1 +5x 2 +3x 3 =3 x 1 +8x 3 =17 We can write the this system as AX=B 1 2 3 x 1 5 2 5 3 X= x 2 B= 3 1 0 8 x 3 17 S 9
In example 1 we found that the inverse of A -1 is : -40 16 9 A -1 = 13-5 -3 5-2 -1 By theorem 1 the solution of the system is: -40 16 9 5 1 X=A -1 B= 13-5 -3 3 = -1 5-2 -1 17 2 or: x 1 =1, x 2 =-1, x 3 =2 Why it is useful to find the inverse of a matrix Many problems in engineering and science involve systems of n linear equation with n unknown (that is square matrix). The method is particularly useful when it is necessary to solve a series of systems: AX=B 1, AX=B 2.. AX=B k, In this case each has the same square matrix A and the solutions are: X=A -1 B 1, X=A -1 B 2. X=A -1 B k S 10
Electronic circuitry AC=V current voltage a 11 a 12. a 1n c 1 v 1 a 21 a 22. a 2n c 2 = v 2 : : : : : a n1 a n2. a nn c n v n -1 c 1 a 11 a 12. a 1n v 1 c 2 = a 21 a 22. a 2n v 2 : : : : : c n a n1 a n2. a nn v n Theorem 3 If A is an nxn matrix, then the following statements are equivalent: (a) A is invertible (b) AX=0 has only the trivial solution (the only solution is x 1 =0, x 2 =0 x n =0) (c) A is row equivalent to I n. (d) AX=B is consistent for every nx1 matrix B. S 11
Class assignment 2: Solve the following system using the method you learned today in class x 1 +2x 2 +2x 3 =-1 x 1 +3x 2 + x 3 =4 x 1 +3x 2 + 2x 3 =3 S 12
S 13
Why study determinants? They have important applications to system of linear equations and can be used to produce formula for the inverse of an invertible matrix. The determinant of a square matrix A is denoted by det(a) or A. If A is 1x1 matrix [a 11 ] Then: det(a)= a 11 For example [-7] det (A)=det(-7)=-7 Determinant of a 2x2 matrix If A is a 2x2 matrix a 11 a 12 a 21 a 22 Then we define a 11 a 12 det(a)= a 21 a 22 = det(a)= a 11 a 22 -a 12 a 21 a 11 a 12 a 21 a 22 S 14
Example 1 Then we define det(a)= 5 4 3 2 5 4 3 2 = det(a)= 5X2-4X3=-2 5 4 3 2 Determinant of a 3x3 matrix If A is a 3x3 matrix a 11 a 12 a 13 a 21 a 22 a 23 Then we define a 11 a 12 a 13 det(a)= a 21 a 22 a 23 a 31 a 32 a 33 Example 2 1 5-3 det(a)= 1 0 2 3-1 2 = a 11 = 1 a 31 a 32 a 33 a 22 a 23 -a 12 a 21 a 23 +a 13 a 21 a 22 a 32 a 33 a 31 a 33 a 31 a 32 0 2-5 1 2-3 1 0-1 2 3 2 3-1 =1[0*2 -(-1*2)] 5 [1*2-2*3] - 3[-1*1-0*3]=25 S 15
Minor and cofactor of a matrix entry Definition: If A is a square matrix, then the minor of entry a ij is denoted by M ij and is defined to be the determinant of submatrix that remains after the i th row and j th column are deleted from A. The number (-1) i+j M ij is denoted by C ij and is called the cofactor of entry a ij. For 3x3 matrix a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 M 11 = a 22 a 23 a 32 a 33 C 11 =(-1) 1+1 M 11 = M 11 Example 4 1 2 3 2 5 3 1 0 8 The minor of a 11 is: The cofactor of a 11 is: 5 3 M 11 = 0 8 = 5X8-3X0=40 C 11 =(-1) i+j M ij =(-1) 2 M 11 =M 11 =40 The minor of a 23 is: M 23 = 1 2 1 0 = 1X0-2X1=-2 The cofactor of a 23 is: C 23 =(-1) i+j M ij =(-1) 5 M 23 =-M 23 =2 S 16
Finding determinant using the cofactor a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 C = a 22 a 23 11 C a a 21 23 a 32 a 12 = - 33 a 31 a 33 C 13 = a 21 a 22 a 31 a 32 a 11 a 12 a 13 a 21 a 22 a 23 = a 11 C 11 +a 12 C 12 +a 13 C 13 a 31 a 32 a 33 And for nxn matrix: = a 11 C 11 +a 12 C 12 +..+a 1n C 1n Example: evaluate det(a) for: 1 0 2-3 3-1 4 5 0 2 1-2 det(a) = a 11 C 11 +a 12 C 12 + a 13 C 13 +a 14 C 14 0 1 1 3 det(a)=(1) - (-3) 4 0 1 5 2-2 1 1 3 3 4 0-1 5 2 0 1 1 3 0 1 3 4 1 -(0) -1 2-2 + 2-1 5-2 0 1 3 0 1 3 = (1)(35)-0+(2)(62)-(-3)(13)=198 S 17
Theorem 1 The determinant of nxn matrix A can be computed by multiplying the entries in any row (or column) by their cofactors and adding the resulting products; that is, for each 1 i n and 1 j n, det(a)=a 1j C 1j +a 2j C 2j +..+a nj C nj Cofactor expansion along the j th column det(a)=a i1 C i1 +a i2 C i2 +..+a in C in Cofactor expansion along the i th row Example 5: evaluate 1 5-3 det(a)= 1 0 2 3-1 2 By a cofactor along the third column det(a)=a 13 C 13 +a 23 C 23 +a 33 C 33 det(a)= -3* (-1) 4 1 0 +2*(-1) 5 1 5 +2*(-1) 6 1 5 3-1 3-1 1 0 = det(a)= -3(-1-0)+2(-1) 5 (-1-15)+2(0-5)=25 S 18
Class assignment 3: Let -1 2 3 4 1-6 -3 5 2 Find det(a) using (a) cofactor expansion along any row or column. S 19