Section DM  Determinant of a Matrix

From A First Course in Linear Algebra
Version 1.08
© 2004.
Licensed under the GNU Free Documentation License.
http://linear.ups.edu/

First, a slight detour, as we introduce elementary matrices, which will bring us back to the beginning of the course and our old friend, row operations.

Subsection EM: Elementary Matrices

Elementary matrices are very simple, as you might have suspected from their name. Their purpose is to effect row operations (Definition RO) on a matrix through matrix multiplication (Definition MM). Their definitions look more complicated than they really are, so be sure to read ahead after you read the definition for some explanations and an example.

Definition ELEM
Elementary Matrices

  1. Ei,j is the square matrix of size n with
    Ei,j k = 0ki,kj,k 1ki,kj, = k 0k = i,j 1k = i, = j 0k = j,i 1k = j, = i
  2. Ei α, for α0, is the square matrix of size n with
    Ei αk = 0ki,k 1ki, = k αk = i, = i
  3. Ei,j α is the square matrix of size n with
    Ei,j αk = 0kj,k 1kj, = k 0k = j,i,j 1k = j, = j αk = j, = i

    (This definition contains Notation ELEM.)

Again, these matrices are not as complicated as they appear, since they are mostly pertubations of the n × n identity matrix (Definition IM). Ei,j is the identity matrix with rows (or columns) i and j trading places, Ei α is the identity matrix where the diagonal entry in row i and column i has been replaced by α, and Ei,j α is the identity matrix where the entry in row j and column i has been replaced by α. (Yes, those subscripts look backwards in the description of Ei,j α). Notice that our notation makes no reference to the size of the elementary matrix, since this will always be apparent from the context, or unimportant.

The raison d’être for elementary matrices is to “do” row operations on matrices with matrix multiplication. So here is an example where we will both see some elementary matrices and see how they can accomplish row operations.

Example EMRO
Elementary matrices and row operations
We will perform a sequence of row operations (Definition RO) on the 3 × 4 matrix A, while also multiplying the matrix on the left by the appropriate 3 × 3 elementary matrix.

A = 2131 1324 5031

R1 R3 : 5031 1324 2131 E1,3 : 001 010 100 2131 1324 5031 = 5031 1324 2131 2R2 : 5031 2648 2131 E2 2 : 100 020 001 5031 1324 2131 = 5031 2648 2131 2R3 + R1 : 9293 2648 2131 E3,1 2 : 102 010 001 5031 2648 2131 = 9293 2648 2131

The next three theorems establish that each elementary matrix effects a row operation via matrix multiplication.

Theorem EMDRO
Elementary Matrices Do Row Operations
Suppose that A is a matrix, and B is a matrix of the same size that is obtained from A by a single row operation (Definition RO).

  1. If the row operation swaps rows i and j, then B = Ei,jA.
  2. If the row operation multiplies row i by α, then B = Ei αA.
  3. If the row operation multiplies row i by α and adds the result to row j, then B = Ei,j αA.

Proof   In each of the three conclusions, performing the row operation on A will create the matrix B where only one or two rows will have changed. So we will establish the equality of the matrix entries row by row, first for the unchanged rows, then for the changed rows, showing in each case that the result of the matrix product is the same as the result of the row operation. Here we go.

Row k of the product Ei,jA, where ki, kj, is unchanged from A,

Ei,jAk = p=1n E i,j kp Ap  Theorem EMP = Ei,j kk Ak + p=1,pkn E i,j kp Ap = 1 Ak + p=1,pkn0 A p  Definition ELEM = Ak

Row i of the product Ei,jA is row j of A,

Ei,jAi = p=1n E i,j ip Ap  Theorem EMP = Ei,j ij Aj + p=1,pjn E i,j ip Ap = 1 Aj + p=1,pjn0 A p  Definition ELEM = Aj

Row j of the product Ei,jA is row i of A,

Ei,jAj = p=1n E i,j jp Ap  Theorem EMP = Ei,j ji Ai + p=1,pin E i,j jp Ap = 1 Ai + p=1,pin0 A p  Definition ELEM = Ai

So the matrix product Ei,jA is the same as the row operation that swaps rows i and j.

Row k of the product Ei αA, where ki, is unchanged from A,

Ei αAk = p=1n E i αkp Ap  Theorem EMP = Ei αkk Ak + p=1,pkn E i αkp Ap = 1 Ak + p=1,pkn0 A p  Definition ELEM = Ak

Row i of the product Ei αA is α times row i of A,

Ei αAi = p=1n E i αip Ap  Theorem EMP = Ei αii Ai + p=1,pin E i αip Ap = α Ai + p=1,pin0 A p  Definition ELEM = α Ai

So the matrix product Ei αA is the same as the row operation that swaps multiplies row i by α.

Row k of the product Ei,j αA, where kj, is unchanged from A,

Ei,j αAk = p=1n E i,j αkp Ap  Theorem EMP = Ei,j αkk Ak + p=1,pkn E i,j αkp Ap = 1 Ak + p=1,pkn0 A p  Definition ELEM = Ak

Row j of the product Ei,j αA, is α times row i of A and then added to row j of A,

Ei,j αAj = p=1n E i,j αjp Ap  Theorem EMP = Ei,j αjj Aj+ Ei,j αji Ai + p=1,pj,in E i,j αjp Ap = 1 Aj + α Ai + p=1,pj,in0 A p  Definition ELEM = Aj + α Ai

So the matrix product Ei,j αA is the same as the row operation that multiplies row i by α and adds the result to row j.

Later in this section we will need two facts about elementary matrices.

Theorem EMN
Elementary Matrices are Nonsingular
If E is an elementary matrix, then E is nonsingular.

Proof   We can row-reduce each elementary matrix to the identity matrix. Given an elementary matrix of the form Ei,j, perform the row operation that swaps row j with row i. Given an elementary matrix of the form Ei α, with α0, perform the row operation that multiplies row i by 1α. Given an elementary matrix of the form Ei,j α, with α0, perform the row operation that multiplies row i by α and adds it to row j. In each case, the result of the single row operation is the identity matrix. So each elementary matrix is row-equivalent to the identity matrix, and by Theorem NMRRI is nonsingular.

Notice that we have now made use of the nonzero restriction on α in the definition of Ei α. One more key property of elementary matrices.

Theorem NMPEM
Nonsingular Matrices are Products of Elementary Matrices
Suppose that A is a nonsingular matrix. Then there exists elementary matrices E1,E2,E3,,Et so that A = E1E2E3Et.

Proof   Since A is nonsingular, it is row-equivalent to the identity matrix by Theorem NMRRI, so there is a sequence of t row operations that converts I to A. For each of these row operations, form the associated elementary matrix from Theorem EMDRO and denote these matrices by E1,E2,E3,,Et. Applying the first row operation to I yields the matrix E1I. The second row operation yields E2(E1I), and the third row operation creates E3E2E1I. The result of the full sequence of t row operations will yield A, so

A = EtE3E2E1I = EtE3E2E1

Other than the cosmetic matter of re-indexing these elementary matrices in the opposite order, this is the desired result.

Subsection DD: Definition of the Determinant

We’ll now turn to the definition of a determinant and do some sample computations. The definition of the determinant function is recursive, that is, the determinant of a large matrix is defined in terms of the determinant of smaller matrices. To this end, we will make a few definitions.

Definition SM
SubMatrix
Suppose that A is an m × n matrix. Then the submatrix A i|j is the (m 1) × (n 1) matrix obtained from A by removing row i and column j.

(This definition contains Notation SM.)

Example SS
Some submatrices
For the matrix

A = 1239 4201 3 5 21

we have the submatrices

A 2|3 = 129 3 5 1 A 3|1 = 239 201

Definition DM
Determinant of a Matrix
Suppose A is a square matrix. Then its determinant, det A = A, is an element of defined recursively by:
If A is a 1 × 1 matrix, then det A = A11.
If A is a matrix of size n with n 2, then

det A = A11 det A 1|1 A12 det A 1|2 + A13 det A 1|3 A14 det A 1|4 + + (1)n+1 A 1n det A 1|n

(This definition contains Notation DM.)

So to compute the determinant of a 5 × 5 matrix we must build 5 submatrices, each of size 4. To compute the determinants of each the 4 × 4 matrices we need to create 4 submatrices each, these now of size 3 and so on. To compute the determinant of a 10 × 10 matrix would require computing the determinant of 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 = 3, 628, 800 1 × 1 matrices. Fortunately there are better ways. However this does suggest an excellent computer programming exercise to write a recursive procedure to compute a determinant.

Let’s compute the determinant of a reasonable sized matrix by hand.

Example D33M
Determinant of a 3 × 3 matrix
Suppose that we have the 3 × 3 matrix

A = 3 2 1 4 1 6 31 2

Then

det A = A = 3 2 1 4 1 6 31 2 = 3 1 6 12 2 4 6 32 + (1) 4 1 31 = 3 1 2 6 1 2 4 2 6 3 4 1 1 3 = 3 1(2) 6(1) 2 4(2) 6(3) 4(1) 1(3) = 24 52 + 1 = 27

In practice it is a bit silly to decompose a 2 × 2 matrix down into a couple of 1 × 1 matrices and then compute the exceedingly easy determinant of these puny matrices. So here is a simple theorem.

Theorem DMST
Determinant of Matrices of Size Two
Suppose that A = ab cd . Then det A = ad bc

Proof   Applying Definition DM,

ab cd = a d b c = adbc

Do you recall seeing the expression ad bc before? (Hint: Theorem TTMI)

Subsection CD: Computing Determinants

There are a variety of ways to compute the determinant. We will establish first that we can choose to mimic our definition of the determinant, but by using matrix entries and submatrices based on a row other than the first one.

Theorem DER
Determinant Expansion about Rows
Suppose that A is a square matrix of size n. Then

det A = (1)i+1 A i1 det A i|1 + (1)i+2 A i2 det A i|2 + (1)i+3 A i3 det A i|3 + + (1)i+n A in det A i|n1 i n

which is known as expansion about row i.

Proof   Given the recursive definition of the determinant, it should be no surprise that we will use induction for this proof (Technique I). When n = 1, there is nothing to prove since there is but one row. When n = 2, we just examine expansion about the second row,

(1)2+1 A 21 det A 2|1 + (1)2+2 A 22 det A 2|2 = A21 A12 + A22 A11  Definition DM = A11 A22 A12 A21 = det A  Theorem DMST

So the theorem is true for matrices of size n = 1 and n = 2. Now assume the result is true for all matrices of size n 1 as we derive an expression for expansion about row i for a matrix of size n. We will abuse our notation for a submatrix slightly, so A i1,i2|j1,j2 will denote the matrix formed by removing rows i1 and i2, along with removing columns j1 and j2. Also, as we take a determinant of a submatrix, we will need to “jump up” the index of summation partway through as we “skip over” a missing column. To do this smoothly we will set

εj = 0 < j 1 > j

Now,

det A = j=1n(1)1+j A 1j det A 1|j  Definition DM = j=1n(1)1+j A 1j 1n j (1)i1+εj Ai det A 1,i|j, Induction, row i = 1jn 1n j (1)j+i+εj A1j Ai det A 1,i|j, = =1n(1)i+ A i 1jn j (1)jεj A1j det A 1,i|j, = =1n(1)i+ A i 1jn j (1)εj+j A 1j det A i, 1|,j  2εj is even = =1n(1)i+ A i det A i|  Definition DM

We can also obtain a formula that computes a determinant by expansion about a column, but this will be simpler if we first prove a result about the interplay of determinants and transposes. Notice how the following proof makes use of the ability to compute a determinant by expanding about any row.

Theorem DT
Determinant of the Transpose
Suppose that A is a square matrix. Then det At = det A.

Proof   As before, with a recursive definition, a proof by induction will be natural (Technique I). For the base case, a square matrix of size 1 is symmetric, so A = At, and the determinants will be equal. Now assume the theorem is true for all square matrices of size n 1 and consider the determinant of a matrix of size n.

det At = 1 n i=1n det At = 1 n i=1n j=1n(1)i+j At ij det At i|j Theorem DER = 1 n i=1n j=1n(1)i+j A ji det A j|i  Definition TM = 1 n j=1n i=1n(1)j+i A ji det A j|i  Switch order of summation = 1 n j=1n det A  Theorem DER = det A

Now we can easily get the result that a determinant can be computed by expansion about any column as well.

Theorem DEC
Determinant Expansion about Columns
Suppose that A is a square matrix of size n. Then

det A = (1)1+j A 1j det A 1|j + (1)2+j A 2j det A 2|j + (1)3+j A 3j det A 3|j + + (1)n+j A nj det A n|j1 j n

which is known as expansion about column j.

Proof  

det A = det At  Theorem DT = j=1n At ji det At j|i  Theorem DER = j=1n A ij det A i|j  Definition TM

That the determinant of an n × n matrix can be computed in 2n different (albeit similar) ways is nothing short of remarkable. For the doubters among us, we will do an example, computing a 4 × 4 matrix in two different ways.

Example TCSD
Two computations, same determinant
Let

A = 2 3 0 1 9 2 0 1 1 3 21 4 1 2 6

Then expanding about the fourth row (Theorem DER with i = 4) yields,

A = (4)(1)4+1 3 0 1 2 0 1 3 21 + (1)(1)4+2 2 0 1 9 0 1 1 21 + (2)(1)4+3 2 3 1 9 2 1 1 3 1 + (6)(1)4+4 2 3 0 9 2 0 1 3 2 = (4)(10) + (1)(22) + (2)(61) + 6(46) = 92

while expanding about column 3 (Theorem DEC with j = 3) gives

A = (0)(1)1+3 92 1 1 3 1 4 1 6 + (0)(1)2+3 23 1 1 31 4 1 6 + (2)(1)3+3 2 3 1 9 21 4 1 6 + (2)(1)4+3 2 3 1 9 2 1 1 3 1 = 0 + 0 + (2)(107) + (2)(61) = 92

Notice how much easier the second computation was. By choosing to expand about the third column, we have two entries that are zero, so two 3 × 3 determinants need not be computed at all!

When a matrix has all zeros above (or below) the diagonal, exploiting the zeros by expanding about the proper row or column makes computing a determinant insanely easy.

Example DUTM
Determinant of an upper triangular matrix
Suppose that

T = 2 3 1 3 3 01 5 2 1 0 0 3 9 2 0 0 0 1 3 0 0 0 0 5

We will compute the determinant of this 5 × 5 matrix by consistently expanding about the first column for each submatrix that arises and does not have a zero entry multiplying it.

det T = 2 3 1 3 3 01 5 2 1 0 0 3 9 2 0 0 0 1 3 0 0 0 0 5 = 2(1)1+1 15 2 1 0 3 9 2 0 01 3 0 0 0 5 = 2(1)(1)1+1 3 9 2 013 0 0 5 = 2(1)(3)(1)1+1 13 0 5 = 2(1)(3)(1)(1)1+1 5 = 2(1)(3)(1)(5) = 30

If you consult other texts in your study of determinants, you may run into the terms “minor” and “cofactor,” especially in a discussion centered on expansion about rows and columns. We’ve chosen not to make these definitions formally since we’ve been able to get along without them. However, informally, a minor is a determinant of a submatrix, specifically det A i|j and is usually referenced as the minor of Aij. A cofactor is a signed minor, specifically the cofactor of Aij is (1)i+j det A i|j.

Subsection READ: Reading Questions

  1. Construct the elementary matrix that will effect the row operation 6R2 + R3 on a 4 × 7 matrix.
  2. Compute the determinant of the matrix
    2 3 1 3 8 2 413
  3. Compute the determinant of the matrix
    392 4 2 01 4 27 002 5 2 00 0 16 00 0 0 4

Subsection EXC: Exercises

C24 Doing the computations by hand, find the determinant of the matrix below.

2 3 2 42 1 2 4 2

 
Contributed by Robert Beezer Solution [1070]

C25 Doing the computations by hand, find the determinant of the matrix below.

314 2 5 1 2 0 6

 
Contributed by Robert Beezer Solution [1070]

C26 Doing the computations by hand, find the determinant of the matrix A.

A = 2032 5124 3012 5321

 
Contributed by Robert Beezer Solution [1071]

Subsection SOL: Solutions

C24 Contributed by Robert Beezer Statement [1068]
We’ll expand about the first row since there are no zeros to exploit,

2 3 2 42 1 2 4 2 = (2) 21 4 2 + (1)(3) 41 2 2 + (2) 42 2 4 = (2)((2)(2) 1(4)) + (3)((4)(2) 1(2)) + (2)((4)(4) (2)(2)) = (2)(8) + (3)(10) + (2)(12) = 70

C25 Contributed by Robert Beezer Statement [1068]
We can expand about any row or column, so the zero entry in the middle of the last row is attractive. Let’s expand about column 2. By Theorem DER and Theorem DEC you will get the same result by expanding about a different row or column. We will use Theorem DMST twice.

314 2 5 1 2 0 6 = (1)(1)1+2 21 26 + (5)(1)2+2 34 26 + (0)(1)3+2 34 21 = (1)(10) + (5)(10) + 0 = 60

C26 Contributed by Robert Beezer Statement [1069]
With two zeros in column 2, we choose to expand about that column (Theorem DEC),

det A = 2032 5124 3012 5321 = 0(1) 524 312 521 + 1(1) 232 312 521 + 0(1) 232 524 521 + 3(1) 232 524 312 = (1) 2(1(1) 2(2)) 3(3(1) 5(2)) + 2(3(2) 5(1)) + (3) 2(2(2) 4(1)) 3(5(2) 4(3)) + 2(5(1) 3(2)) = (6 + 21 + 2) + (3)(0 + 6 2) = 29