MAT 2401 Discovery Lab 2.3 Names___________________________________ Objectives To introduce inverse matrices. To explore the idea of solving matrix equations by inverses. To explore how to find inverse matrices by formula and row operations. Use SageMath to facilitate the calculations for large system. Instructions Do not look up any references including the textbook and internet. Do not use a calculator. You are supposed to learn SageMath. Use correct notations and do not skip steps. Two persons per group. Do not communicate with other groups. Matrix Equations In §2.1, we see that a system of linear equations such as x 2 y 3z 9 4 x 3 y 2 x 5 y 5 z 17 can be encoded into the matrix equation AX b where 1 2 3 x 9 A 1 3 0 , X y , b 4 . 2 5 5 z 17 If we can solve the matrix equation for X , we have the solutions system of linear equations. (1) (2) x, y, z for the Idea To solve the matrix equation (2), we will attempt to find a matrix B such that BA I . We can then solve for X because AX b B AX Bb BA X Bb IX Bb X Bb (3) B belongs to a type of special matrices called inverse matrices which are described below. 1 Inverse Matrix Let A be a square matrix. An inverse for A is a square matrix, denoted by A1 , of the same size as A such that AA1 A1 A I . If such an inverse exists, A is called invertible or non-singular. 2 1 1 1 1. Let A . Verify that B is an inverse of A by computing AB 1 1 1 2 and BA . 2 1 1 1 AB 1 1 1 2 and 1 1 2 1 BA 1 2 1 1 Formula a b For 2 2 matrices A , there is a convenient formula to compute its inverse: c d 1 d b A1 . (4) ad bc c a 2 1 2. Use the inverse formula (4) to compute A1 for A . 1 1 A1 You see that your answer is the same as the matrix B in problem 1. 2 2 x y 5 3. Use an matrix inverse to solve the linear system . x y 3 The system is represented by AX b , where A 5 b . (You know you have computed A1 already, right?) 3 x , X y , and From (3), We know the solution is given by X A1b So, x ,y . 3 Row Operations For bigger matrices, there are no convenient formula to compute the inverses. It turns out that we can use elementary row operations to find the inverse matrices. 2 1 4. Let A . We set up an augmented matrix: 1 1 2 1 1 0 1 1 0 1 Note that the augmented matrix is of the form the augmented matrix becomes I A I . Perform row operations so that 1 0 * * * . 0 1 * * 2 1 1 0 1 1 0 1 The row operations effectively multiplied the left side of the augmented matrix, which is A , by A1 . And the end result is A1 A I . As a result, the right side of the augmented matrix, which is I , is also multiplied by A1 . So the end result is A1I A1 . A row I I operations A1 This solution method can be extended to bigger matrices. Let us try it out with the following example. 4 1 2 3 5. Let A 1 3 0 . Find A1 by using row operations. 2 5 5 (a) Set up the augmented matrix A I . Use row operations to transform it into I A1 . I am expecting you to be able to do this by hand. To save time, let us use SageMath. We introduced the rref() commend in Lab 1.3. Below is a recap of the syntax. A=matrix([[...matrix.entries...],[...matrix.entries...],[...matrix.entries...]]); show(A); show(A.rref()); A I A1 5 x 2 y 3z 9 (b) Use (a) to solve the system x 3 y 4 . 2 x 5 y 5 z 17 The system is represented by AX b , where A 9 and b 4 . From (3), We know the solution is given by 17 x , X y , z X A1b So, x , y , z . Practice Problems (For you to do at home. Do not turn in!) 2 x 4 y z 2 2 y 2 z 12 1. x y z 0 2. 3x y 3z 2 x 4y x 2 y 3z 13 1 Answers 1. x 3, y 1, z 4 2. x 0, y 5, z 1 6 Properties of Inverses A (ii) A 1 1 (i) k 1 (iii) cA (iv) A (v) AB T A A1 , where k is a positive integer. 1 k 1 1 A , where c is a non-zero constant. c 1 A1 1 B 1 A1 T Many of the properties above are easy to conceive. The only possible exception is the last 1 property AB B 1 A1 . 6. Show that B 1 A1 is the inverse of AB by computing B 1 A1 AB . Do not skip details. AB B 1 A1 and AB B 1 A1 A BB 1 A1 A I A1 AA1 I B 1 A1 AB 7