Lecture 0: Determinants and Cramer s Rule The determinant and its applications. Definition The determinant of a square matrix A, denoted by det(a) or A, is a real number, which is defined as follows. -by- case. Let A = [a] for a R (that is, if A is an -by- matrix), then det(a ) = a. ( ) a a 2-by-2 case. Let A 2 2 = 2, then the determinant of A a 2 a 2 2 is defined by 22 det(a 2 2 ) = a a 2 a 2 a 22 := a a 22 a 2 a 2. a a 2 a -by- case. Let A = a 2 a 22 a 2, then the determinant of A is defined by a a 2 a a a 2 a det(a ) = a 2 a 22 a 2 a a 2 a := a a 22 a +a 2 a 2 a +a a 2 a 2 n-by-n case. See the cofactor expansion in Section.4. a a 2 a 2 a 2 a 2 a a a 22 a. Remark.. The determinant can be viewed as a mapping from the square matrix space to the real number space R. The matrix A n n has n 2 numbers while its determinant det(a) is a single number which contains the most important information of A. If det(a) 0 then A is invertible; otherwise, A is not invertible. Copy right reserved by Yingwei Wang
Figure : det(a) = (a+b+c) (d+e+f).2 Cramer s rule for solving the linear system Ax = b Consider the following linear system Ax = b, (.) where a a 2... a n a 2 a 22... a 2n A =...... a n a n2... a nn n n x x 2, x =. x n n b b 2, b =. b n n. (.2). If det(a) = 0, then the linear system (.) has either no solution or infinitely many solutions. 2. If det(a) 0, then the solution x can be determinated by the Cramer s rule. The j-th entry of the solution x is given by x j = det(b j) det(a), (.) where the matrix B j replaces the j-th column of A by the right hand side b. See Examples 2, 0 in Chapter.6 of your textbook. 2 Copy right reserved by Yingwei Wang
. Adjoint method for finding the inverse A. The minor of a matrix A is defined as follows Minor(A, i, j): the(n )-by-(n ) determinant obtained from det(a) by striking out i-th row and j-th column is called the (i,j)-minor of A. 2. The cofactor of a matrix A is defined as follows: Cofactor(A,i,j) := ( ) i+j Minor(A,i,j).. The adjoint matrix is the transpose of the matrix of cofactors: Cofactor(A,,) Cofactor(A,,2)... Cofactor(A,,n) Cofactor(A,2,) Cofactor(A,2,2)... Cofactor(A,2,n) adj(a) =...... Cofactor(A,n,) Cofactor(A,n,2)... Cofactor(A,n,n) 4. Inverse matrix: A = In other word, each entry of A is A i,j = T n n adj(a). (.4) det(a) Cofactor(A,j,i), (.5) det(a) where the i-th row and j-th column of A is denoted by A i,j. Remark.2. Do not forget the transpose in the definition of adj(a). In other word, the indices in left hand side of (.5) is (i,j) while in right hand side of (.5) is (j,i). Remark.. The above (.4) clearly shows that if det(a) = 0, then A is not invertible. See Example in Chapter.6 of your textbook..4 Compute the determinants by cofactor expansions The det(a) can be computed recursively by cofactor expansions.. Copy right reserved by Yingwei Wang
.4. General formula For any n-by-n matrix, its determinant det(a) can be computed by expanding along either any row or any column.. Expand along the i-th row: det(a) = n a i,j Cofactor(A,i,j). j= Note that i is fixed here and run j from to n. 2. Expand along the j-th column: det(a) = n a i,j Cofactor(A,i,j). i= Note that j is fixed here and run i from to n..4.2 Special case For -by- case, to expand along the first row, we have a a 2 a det(a ) = a 2 a 22 a 2 a a 2 a = a a 22 a 2 a 2 a a 2 a 2 a 2 a a +a a 2 a 22 a a 2. + + Actually, we can pick any row or column, using + pattern. + + See Examples, 4, 5, 6, 7, 8 in Chapter.6 of your textbook..5 Examples 0 2 Example. Compute the determinant of the matrix A = 4. 0 4 Copy right reserved by Yingwei Wang
Solution: We can compute det(a) by expanding along either any row or any column. Eventually, we will end up with the same result. Here, I show the procedures along the first row and first column. In practice, you just just need to do once.. Expand along the first row: 0 2 4 0 = 0 4 0 +2 4 0 =. 2. Expand along the first column: 0 2 4 0 = 0 4 2 +0 2 4 =. Example 2. Solve the linear system Ax = b by Cramer s rule, where 0 2 A = 4, b = 8. 0 0 Solution: 2 x = det(a) 8 4 0 = = ; 0 2 x 2 = det(a) 8 0 0 = = ; 0 x = det(a) 4 8 0 0 = =. 0 2 Example. Find the inverse of the matrix A = 4 by adjoint method. 0 By adjoint method, we have 5 Copy right reserved by Yingwei Wang
, = Cofactor(A,,) = det(a) 4 = 7;,2 = Cofactor(A,2,) = ( ) 2 det(a) = ;, = Cofactor(A,,) = det(a) 2 4 = 5; 2, = Cofactor(A,,2) = ( ) det(a) 0 = ; 2,2 = Cofactor(A,2,2) = det(a) 0 2 0 = 0; 2, = Cofactor(A,,2) = ( ) 0 2 det(a) = 2;, = Cofactor(A,,) = det(a) 4 0 = ;,2 = Cofactor(A,2,) = ( ) 0 det(a) 0 = 0;, = Cofactor(A,,) = det(a) 0 4 =. Finally, the inverse of A is A = 7 5 7 5 0 = 2 0 0 0 2 Usefull properties Definition 2.. An upper triangular matrix is a square matrix having only zeros below its main diagonal. A lower triangluar matrix is a square matrix having only zeros above its main diagonal. 6 Copy right reserved by Yingwei Wang
For instant, in the -by- case, we have 0 it is upper triangular; (2.) 0 0 0 0 0 it is lower triangular. (2.2) Some useful properties about determinants.. Swap. The determinant reverses sign when two rows/columns are exchanged. 2. Multiply. If one row/column of A is multiplied by a constant c to create a new matrix B, then det(b) = cdet(a).. Combination. The determinant is unchanged by adding (or substracting) a multiple of a row/column to another row/column. 4. Triangular. If A is upper/lower triangular matrix, then det(a) is the product of the diagonal entries. 5. Transpose. det(a) = det(a T ). 6. Zero row or column. If one row/column of A is zero, then det(a) = 0. 7. Duplicate rows or columns. If two rows/columns are identical, then det(a) = 0. 8. Multiplication. det(ab) = det(a)det(b) and det(a p ) = (det(a)) p. 9. Inverse. det(a ) = det(a). 0. Scalar multiplication. det(ka) = k n det(a), where A is an n-by-n square matrix, and k is any scalar. ( ) 0. In general, det(a + B) det(a) + det(b). For instant, A =,B = ( ) 0 0 0 0, then det(a) = det(b) = 0 but det(a+b) =. 0 7 Copy right reserved by Yingwei Wang
Summary. About singular and nonsingular matrices The following statements are equivalent to each other:. A is singular; 2. det(a) = 0;. there is at least one zero row in the echelon form after Gaussian Elimination; 4. Ax = b has either no solution or infinitely many solutions (or Ax = 0 has nontrivial solutions). 5. A is not invertible (A does not exists). Similarly, the following statements are also equivalent to each other:. A is nonsingular; 2. det(a) 0;. there are no zero rows in the echelon after any Gaussian Elimination; 4. Ax = b has unique solution (or Ax = 0 has only trivial solution). 5. A is invertible (A exists)..2 About the inverse of a matrix and linear system Until now, we have already learned two methods to compute the inverse of a matrix A:. the one is to perform Gauss-Jordan elimination on [A I] to obtain the reduced echelon form [I A ]; 2. the other one is so called adjoint method shown in (.4) in this note. Remark.. No matter what method you use, please make sure the correctness of your results by checking AA = A A = I. Similarly, we have already learned two methods to solve the linear system Ax = b: 8 Copy right reserved by Yingwei Wang
. theoneistoperformgaussianeliminationontheaugmentedmatrixa # = [A b] to obtain echelon form; 2. the other one is so called Cramer s rule shown in (.). Remark.2. No matter what method you use, please make sure the correctness of your results by checking Ax = b. 4 Advanced strategy to compute the determinants The general idea is as follows:. First, use the properties - shown in Section 2 to transform original matrix A into a new matrix with many zeros. 2. Second, use a simplified cofactor expansion or properties 4-7 shown in Section 2 to get the determinant. Example 4. Find the determinant of the Vandermonde matrix: V(r,r 2,r ) = r r 2 r r 2 r2 2 r 2. (4.) Solution: V(r,r 2,r ) = r r 2 r (Multiplying to the first column and then adding it to the second column) r 2 r2 2 r 2 0 = r r 2 r r (Multiplying to the first column and then adding it to the third column) r 2 r2 2 r2 r 2 0 0 = r r 2 r r r r 2 r2 2 r2 r 2 r2 = r 2 r r r r2 2 r 2 r 2 r 2 +0+0 ( Doing the cofactor expansion along the first row) = r 2 r r r (r 2 r )(r 2 +r ) (r r )(r +r ) = (r 2 r )(r r ) r 2 +r r +r 9 Copy right reserved by Yingwei Wang
= (r 2 r )(r r )(r r 2 ). Example 5. Recall the matrix in Example 4, Lecture note 8: A = 2 4 5. Find k 2 the determinant of A. Solution: We have two ways to compute the determinant.. Expand it along the first row: 2 4 5 k 2 = 4 5 k 2 2 5 k 2 + 2 4 (4.2) = (4k 2 +5) (2k 2 5)+( 6) (4.) = 2(k 2 4). (4.4) 2. Use elementary row operations to simplify A: 2 4 5 (4.5) k 2 ( 2) R +R 2 R 2 ( ) R +R R 0 2 (4.6) 0 2 k 2 R 2 +R R 0 2 0 0 k 2 4. (4.7) Example 6. Find the determinant of the following matrix. 2 4 5 6 7 8 9 0 A 5 5 = 2 4 5 6 7 8 9 20 2 22 2 24 25 = 2(k 2 4). (4.8) 0 Copy right reserved by Yingwei Wang
Solution: 2 4 5 6 7 8 9 0 det(a 5 5 ) = 2 4 5 (Multiplying to the i-th row and then adding it to (i+)-th row,i = 4,, 6 7 8 9 20 2 22 2 24 25 2 4 5 5 5 5 5 5 = 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 = 0. 5 Use determinant to figure out the number of solutions Consider the linear system Ax = b. If A is a square matrix, then we can use the information det(a) to figure out the number of solutions.. If det(a) 0, then Ax = b has unique solution. 2. If det(a) = 0, then Ax = b either have no solution or infinitely many solutions. (It depends on b.) Example 7. Consider the following -by- matrix A and -by- column vector b: A = 2 4 5, b =. k 2 k Find the values of k such that the linear system Ax = b has unique solution. Solution: We have already known that det(a) = 2(k 2 4). In order to get unique solution, we need det(a) 0 k ±2. Copy right reserved by Yingwei Wang