MAT 2401 Discovery Lab 3.1 Names______Objectives  To determine when a matrix is invertible.  To explore the concept of determinants.  Look at the method of calculating determinants by minors.  Use SageMath to facilitate the computation of determinants.

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.

Existence of Inverse Matrices One of the important questions concerning the applications of matrices is whether a square matrix is invertible or not. To help us understand the situation, let us recall what we know about a 2 2 square matrix.

轾a b In §2.3, we know for a 2 2 matrix A = 犏 , the inverse can be computed by the 臌c d formula

-1 1 轾d- b A = 犏 . ad- bc 臌-c a So, if ad- bc = 0 , the formula is undefined and therefore the inverse does not exist. The expression ad- bc is called the determinant of the matrix A .

Notation

轾a11 a 12 For the matrix A = 犏 , the determinant of A is denoted by either det ( A) or A . 臌a21 a 22 From the discussions above, we have,

a11 a 12 det(A ) = = a11 a 22 - a 21 a 12 . a21 a 22 It is common to memorize the formula as “the subtraction of the products of the diagonal elements” a a 11 12 . a21 a 22

1 轾1 2 1. (a) Is A = 犏 invertible? 臌-1 2

1 2 A = = = -1 2

Conclusion: Since A 0 ,

轾1 1 (b) Is A = 犏 invertible? 臌2 2

1 1 A = = = 2 2

Conclusion:

轾x 2 (c) Find x such that A = 犏 is not invertible. 臌-1 1 - x

2 For n n matrices with n 3 , we do not have a formula for the inverses. To understand the principles behind the formulation of determinants are somewhat more difficult. We will demonstrate the ideas below with 3 3 matrices. The same ideas generalized to all n n matrices.

The Determinant of a 3×3 Matrix

轾a11 a 12 a 13 A= 犏 a a a Let 犏21 22 23 . Then 臌犏a31 a 32 a 33

a11 a 12 a 13 a 11 a 22 a 33- a 11 a 32 a 23

det ( A) = a21 a 22 a 23 = - a 21 a 12 a 33 + a 21 a 32 a 13 .

a31 a 32 a 33+ a 31 a 12 a 23 - a 31 a 22 a 13 It looks awful in the first sight. But we are going to discover the patterns hidden within it.

Observations

2. a11 a 22 a 33- a 11 a 32 a 23 are the first two terms of formula .

a22 a 23 (a) Factor out a11 from the expressions. What is its relation with ? a32 a 33

a11 a 22 a 33- a 11 a 32 a 23 = a 11( a 22 a 33 - a 32 a 23 ) =

a22 a 23 (b) Put boxes over a11 and on the determinant notation. a32 a 33

a11 a 12 a 13

a21 a 22 a 23

a31 a 32 a 33

a22 a 23 (c) is called a minor of a11 . It is obtained by deleting the row and column a32 a 33 containing a11 .

So, a11 a 22 a 33- a 11 a 32 a 23 is the product of a11 with its minor.

Do the second and third group of expressions in have the same pattern? Let us find out on the next page.

3 a12 a 13 3. (a) Factor out -a21 from the -a21 a 12 a 33 + a 21 a 32 a 13 . What is its relation with ? a32 a 33

-a21 a 12 a 33 + a 21 a 32 a 13 = - a 21

a12 a 13 (b) Put boxes over a21 and on the determinant notation. a32 a 33

a11 a 12 a 13

a21 a 22 a 23

a31 a 32 a 33

a12 a 13 (c) Again, is obtained by deleting the row and column containing a21 . So it is a32 a 33 the minor of a21 .

We see that the second group of expressions almost fit into the same pattern as the first group except a sign different.

So, -a21 a 12 a 33 + a 21 a 32 a 13 is the product of -a21 with its minor.

Most books also consider this as the product of a21 with the negative of its minor.

4 a12 a 13 4. (a) Factor out a31 from the a31 a 12 a 23- a 31 a 22 a 13 . What is its relation with ? a22 a 23

a31 a 12 a 23- a 31 a 22 a 13 = a 31

a12 a 13 (b) Put boxes over a31 and on the determinant notation. a22 a 23

a11 a 12 a 13

a21 a 22 a 23

a31 a 32 a 33

a12 a 13 (c) Again, is obtained by deleting the row and column containing a31 . So it is a22 a 23 the minor of a31 .

We see that the third group of expressions fit into the exact same pattern as the first group.

So, a31 a 12 a 23- a 31 a 22 a 13 is the product of a31 with its minor.

Summary In light of the observations above, formula can be expressed as

a11 a12 a 13 a22 a 23 a 12 a 13 a 12 a 13 a21a22 a 23 = a 11- a 21 + a 31 . a32a 33 a 32 a 33 a 22 a 23 a31 a32 a 33

This is the common way how the formula is being understood and memorized. This is sometimes referred as “expanding by minors”. We will look at the obvious way to generalize this to bigger determinants after some practices with calculations.

5 1 2 3 5. (a) Compute 0- 1 1 . 2 2 0

1 2 3 0- 1 1 = 1 - 0 + 2 2 2 0

=

(b) To check your answer with SageMath, use the det() or determinant() commands.

A=Matrix([[1,2,3],[0,-1,1],[2,2,0]]); show(A);show(A.det());show(A.determinant());

1 2 3 6. Compute 2 3 4 . Check your answer with SageMath. 3 4 5

1 2 3 2 3 4= 1 - 2 + 3 3 4 5

=

6 Generalizations Larger determinant can be computed in the same fashion. The key to remember is to alternate the signs of the minors as demonstrated in the next example.

-1 2 3 4 1 0 7. (a) Compute 0 1 0 and 0 1 0 0 0 5 0 0 5

-1 2 3 0 1 0 = 0 0 5

4 1 0 0 1 0 = 0 0 5

1 4 1 0 1- 1 2 3 (b) Use the results of (a) to compute . Check your answer with SageMath. 0 0 1 0 0 0 0 5

1 4 1 0 1- 1 2 3 =1 - 1 + 0 - 0 0 0 1 0 0 0 0 5

=

7 Special Matrices 8. You can do this problem by hand or SageMath. No need to show details, just answers.

(a) Compute the following determinants.

0 0 0 0 0 0 0 0 0 = 0 0 0 0 0 = 0 0 0 0 = 0 0 0 0 0 0 0 0 0 0 0

(b) If 0 is the n n zero matrix, then det( 0) = .

(c) (a) Compute the following determinants.

1 0 1 0 0 1 0 0 0 = 0 1 0 1 0 = 0 1 0 0 = 0 0 1 0 0 1 0 0 0 0 1

(d) If I is the n n identity matrix, then det (I ) = .

(e) Compute the following determinants.

1 0 1 0 0 1 0 0 0 = 0 2 0 2 0 = 0 2 0 0 = 0 0 3 0 0 3 0 0 0 0 4

轾d1 0⋯ 0 犏 0 d2 ⋱ ⋮ (d) If D is the n n diagonal matrix 犏 , thendet (D) = . 犏⋮ ⋱ ⋱ 0 犏 臌0⋯ 0 dn

8