## Section PDM Properties of Determinants of Matrices

We have seen how to compute the determinant of a matrix, and the incredible fact that we can perform expansion about *any* row *or* column to make this computation. In this largely theoretical section, we will state and prove several more intriguing properties about determinants. Our main goal will be the two results in Theorem SMZD and Theorem DRMM, but more specifically, we will see how the value of a determinant will allow us to gain insight into the various properties of a square matrix.

### Subsection DRO Determinants and Row Operations

We start easy with a straightforward theorem whose proof presages the style of subsequent proofs in this subsection.

#### Theorem DZRC. Determinant with Zero Row or Column.

Suppose that \(A\) is a square matrix with a row where every entry is zero, or a column where every entry is zero. Then \(\detname{A}=0\text{.}\)

#### Proof.

Suppose that \(A\) is a square matrix of size \(n\) and row \(i\) has every entry equal to zero. We compute \(\detname{A}\) via expansion about row \(i\text{,}\)

The proof for the case of a zero column is entirely similar, or could be derived from an application of Theorem DT employing the transpose of the matrix.

#### Theorem DRCS. Determinant for Row or Column Swap.

Suppose that \(A\) is a square matrix. Let \(B\) be the square matrix obtained from \(A\) by interchanging the location of two rows, or interchanging the location of two columns. Then \(\detname{B}=-\detname{A}\text{.}\)

#### Proof.

Begin with the special case where \(A\) is a square matrix of size \(n\) and we form \(B\) by swapping *adjacent* rows \(i\) and \(i+1\) for some \(1\leq i\leq n-1\text{.}\) Notice that the assumption about swapping adjacent rows means that \(\submatrix{B}{i+1}{j}=\submatrix{A}{i}{j}\) for all \(1\leq j\leq n\text{,}\) and \(\matrixentry{B}{i+1,j}=\matrixentry{A}{ij}\) for all \(1\leq j\leq n\text{.}\) We compute \(\detname{B}\) via expansion about row \(i+1\text{,}\)

So the result holds for the special case where we swap adjacent rows of the matrix. As any computer scientist knows, we can accomplish *any* rearrangement of an ordered list by swapping adjacent elements. This principle can be demonstrated by naïve sorting algorithms such as “bubble sort.” In any event, we do not need to discuss every possible reordering, we just need to consider a swap of two rows, say rows \(s\) and \(t\) with \(1\leq s\lt t\leq n\text{.}\)

Begin with row \(s\text{,}\) and repeatedly swap it with each row just below it, including row \(t\) and stopping there. This will total \(t-s\) swaps. Now swap the former row \(t\text{,}\) which currently lives in row \(t-1\text{,}\) with each row above it, stopping when it becomes row \(s\text{.}\) This will total another \(t-s-1\) swaps. In this way, we create \(B\) through a sequence of \(2(t-s)-1\) swaps of adjacent rows, each of which adjusts \(\detname{A}\) by a multiplicative factor of \(-1\text{.}\) So

as desired.

The proof for the case of swapping two columns is entirely similar, or could be derived from an application of Theorem DT employing the transpose of the matrix.

So Theorem DRCS tells us the effect of the first row operation (Definition RO) on the determinant of a matrix. Here is the effect of the second row operation.

#### Theorem DRCM. Determinant for Row or Column Multiples.

Suppose that \(A\) is a square matrix. Let \(B\) be the square matrix obtained from \(A\) by multiplying a single row by the scalar \(\alpha\text{,}\) or by multiplying a single column by the scalar \(\alpha\text{.}\) Then \(\detname{B}=\alpha\detname{A}\text{.}\)

#### Proof.

Suppose that \(A\) is a square matrix of size \(n\) and we form the square matrix \(B\) by multiplying each entry of row \(i\) of \(A\) by \(\alpha\text{.}\) Notice that the other rows of \(A\) and \(B\) are equal, so \(\submatrix{A}{i}{j}=\submatrix{B}{i}{j}\text{,}\) for all \(1\leq j\leq n\text{.}\) We compute \(\detname{B}\) via expansion about row \(i\text{,}\)

The proof for the case of a multiple of a column is entirely similar, or could be derived from an application of Theorem DT employing the transpose of the matrix.

Let us go for understanding the effect of all three row operations. But first we need an intermediate result, but it is an easy one.

#### Theorem DERC. Determinant with Equal Rows or Columns.

Suppose that \(A\) is a square matrix with two equal rows, or two equal columns. Then \(\detname{A}=0\text{.}\)

#### Proof.

Suppose that \(A\) is a square matrix of size \(n\) where the two rows \(s\) and \(t\) are equal. Form the matrix \(B\) by swapping rows \(s\) and \(t\text{.}\) Notice that as a consequence of our hypothesis, \(A=B\text{.}\) Then

The proof for the case of two equal columns is entirely similar, or could be derived from an application of Theorem DT employing the transpose of the matrix.

Now explain the third row operation. Here we go.

#### Theorem DRCMA. Determinant for Row or Column Multiples and Addition.

Suppose that \(A\) is a square matrix. Let \(B\) be the square matrix obtained from \(A\) by multiplying a row by the scalar \(\alpha\) and then adding it to another row, or by multiplying a column by the scalar \(\alpha\) and then adding it to another column. Then \(\detname{B}=\detname{A}\text{.}\)

#### Proof.

Suppose that \(A\) is a square matrix of size \(n\text{.}\) Form the matrix \(B\) by multiplying row \(s\) by \(\alpha\) and adding it to row \(t\text{.}\) Let \(C\) be the auxiliary matrix where we replace row \(t\) of \(A\) by row \(s\) of \(A\text{.}\) Notice that \(\submatrix{A}{t}{j}=\submatrix{B}{t}{j}=\submatrix{C}{t}{j}\) for all \(1\leq j\leq n\text{.}\) We compute the determinant of \(B\) by expansion about row \(t\text{,}\)

The proof for the case of adding a multiple of a column is entirely similar, or could be derived from an application of Theorem DT employing the transpose of the matrix.

Is this what you expected? We could argue that the third row operation is the most popular, and yet it has no effect whatsoever on the determinant of a matrix! We can exploit this, along with our understanding of the other two row operations, to provide another approach to computing a determinant. We will explain this approach in the context of an example.

#### Example DRO. Determinant by row operations.

Suppose we desire the determinant of the \(4\times 4\) matrix

We will perform a sequence of row operations on this matrix, shooting for an upper triangular matrix, whose determinant will be simply the product of its diagonal entries. For each row operation, we will track the effect on the determinant via Theorem DRCS, Theorem DRCM, Theorem DRCMA.

The matrix \(A_{12}\) is upper triangular, so expansion about the first column (repeatedly) will result in \(\detname{A_{12}}=(1)(1)(1)(1)=1\) (see Example DUTM) and thus, \(\detname{A}=-110(1)=-110\text{.}\)

Notice that our sequence of row operations was somewhat ad hoc, such as the transformation to \(A_5\text{.}\) We could have been even more methodical, and strictly followed the process that converts a matrix to reduced row-echelon form (Theorem REMEF), eventually achieving the same numerical result with a final matrix that equaled the \(4\times 4\) identity matrix. Notice too that we could have stopped with \(A_8\text{,}\) since at this point we could compute \(\detname{A_8}\) by two expansions about first columns, followed by a simple determinant of a \(2\times 2\) matrix (Theorem DMST).

The beauty of this approach is that computationally we should already have written a procedure to convert matrices to reduced-row echelon form, so all we need to do is track the multiplicative changes to the determinant as the algorithm proceeds. Further, for a square matrix of size \(n\) this approach requires on the order of \(n^3\) multiplications, while a recursive application of expansion about a row or column (Theorem DER, Theorem DEC) will require in the vicinity of \((n-1)(n!)\) multiplications. So even for very small matrices, a computational approach utilizing row operations will have superior run-time. Tracking, and controlling, the effects of round-off errors is another story, best saved for a numerical linear algebra course.

### Subsection DROEM Determinants, Row Operations, Elementary Matrices

As a final preparation for our two most important theorems about determinants, we prove a handful of facts about the interplay of row operations and matrix multiplication with elementary matrices with regard to the determinant. But first, a simple, but crucial, fact about the identity matrix.

#### Theorem DIM. Determinant of the Identity Matrix.

For every \(n\geq 1\text{,}\) \(\detname{I_n}=1\text{.}\)

#### Proof.

It may be overkill, but this is a good situation to run through a proof by induction on \(n\) (Proof Technique I). Is the result true when \(n=1\text{?}\) Yes,

Now assume the theorem is true for the identity matrix of size \(n-1\) and investigate the determinant of the identity matrix of size \(n\) with expansion about row 1,

#### Theorem DEM. Determinants of Elementary Matrices.

For the three possible versions of an elementary matrix (Definition ELEM) we have the determinants,

\(\displaystyle \detname{\elemswap{i}{j}}=-1\)

\(\displaystyle \detname{\elemmult{\alpha}{i}}=\alpha\)

\(\displaystyle \detname{\elemadd{\alpha}{i}{j}}=1\)

#### Proof.

Swapping rows \(i\) and \(j\) of the identity matrix will create \(\elemswap{i}{j}\) (Definition ELEM), so

Multiplying row \(i\) of the identity matrix by \(\alpha\) will create \(\elemmult{\alpha}{i}\) (Definition ELEM), so

Multiplying row \(i\) of the identity matrix by \(\alpha\) and adding to row \(j\) will create \(\elemadd{\alpha}{i}{j}\) (Definition ELEM), so

#### Theorem DEMMM. Determinants, Elementary Matrices, Matrix Multiplication.

Suppose that \(A\) is a square matrix of size \(n\) and \(E\) is any elementary matrix of size \(n\text{.}\) Then

#### Proof.

The proof procedes in three parts, one for each type of elementary matrix, with each part very similar to the other two.

First, let \(B\) be the matrix obtained from \(A\) by swapping rows \(i\) and \(j\text{,}\)

Second, let \(B\) be the matrix obtained from \(A\) by multiplying row \(i\) by \(\alpha\text{,}\)

Third, let \(B\) be the matrix obtained from \(A\) by multiplying row \(i\) by \(\alpha\) and adding to row \(j\text{,}\)

Since the desired result holds for each variety of elementary matrix individually, we are done.

### Subsection DNMMM Determinants, Nonsingular Matrices, Matrix Multiplication

If you asked someone with substantial experience working with matrices about the value of the determinant, they'd be likely to quote the following theorem as the first thing to come to mind.

#### Theorem SMZD. Singular Matrices have Zero Determinants.

Let \(A\) be a square matrix. Then \(A\) is singular if and only if \(\detname{A}=0\text{.}\)

#### Proof.

Rather than jumping into the two halves of the equivalence, we first establish a few items. Let \(B\) be the unique square matrix that is row-equivalent to \(A\) and in reduced row-echelon form (Theorem REMEF, Theorem RREFU). For each of the row operations that converts \(B\) into \(A\text{,}\) there is an elementary matrix \(E_i\) which effects the row operation by matrix multiplication (Theorem EMDRO). Repeated applications of Theorem EMDRO allow us to write

Then

From Theorem DEM we can infer that the determinant of an elementary matrix is never zero (note the ban on \(\alpha=0\) for \(\elemmult{\alpha}{i}\) in Definition ELEM). So the product on the right is composed of nonzero scalars, with the possible exception of \(\detname{B}\text{.}\) More precisely, we can argue that \(\detname{A}=0\) if and only if \(\detname{B}=0\text{.}\) With this established, we can take up the two halves of the equivalence.

##### (⇒)

If \(A\) is singular, then by Theorem NMRRI, \(B\) cannot be the identity matrix. Because (1) the number of pivot columns is equal to the number of nonzero rows, (2) not every column is a pivot column, and (3) \(B\) is square, we see that \(B\) must have a zero row. By Theorem DZRC the determinant of \(B\) is zero, and by the above, we conclude that the determinant of \(A\) is zero.

##### (⇐)

We will prove the contrapositive (Proof Technique CP). So assume \(A\) is nonsingular, then by Theorem NMRRI, \(B\) is the identity matrix and Theorem DIM tells us that \(\detname{B}=1\neq 0\text{.}\) With the argument above, we conclude that the determinant of \(A\) is nonzero as well.

For the case of \(2\times 2\) matrices you might compare the application of Theorem SMZD with the combination of the results stated in Theorem DMST and Theorem TTMI.

#### Example ZNDAB. Zero and nonzero determinant, Archetypes A and B.

The coefficient matrix in Archetype A has a zero determinant (check this!) while the coefficient matrix in Archetype B has a nonzero determinant (check this, too). These matrices are singular and nonsingular, respectively. This is exactly what Theorem SMZD says, and continues our list of contrasts between these two archetypes.

In Section MINM we said “singular matrices are a distinct minority.” If you built a random matrix and took its determinant, how likely would it be that you got zero?

Since Theorem SMZD is an equivalence (Proof Technique E) we can expand on our growing list of equivalences about nonsingular matrices. The addition of the condition \(\detname{A}\neq 0\) is one of the best motivations for learning about determinants.

#### Theorem NME7. Nonsingular Matrix Equivalences, Round 7.

Suppose that \(A\) is a square matrix of size \(n\text{.}\) The following are equivalent.

\(A\) is nonsingular.

\(A\) row-reduces to the identity matrix.

The null space of \(A\) contains only the zero vector, \(\nsp{A}=\set{\zerovector}\text{.}\)

The linear system \(\linearsystem{A}{\vect{b}}\) has a unique solution for every possible choice of \(\vect{b}\text{.}\)

The columns of \(A\) are a linearly independent set.

\(A\) is invertible.

The column space of \(A\) is \(\complex{n}\text{,}\) \(\csp{A}=\complex{n}\text{.}\)

The columns of \(A\) are a basis for \(\complex{n}\text{.}\)

The rank of \(A\) is \(n\text{,}\) \(\rank{A}=n\text{.}\)

The nullity of \(A\) is zero, \(\nullity{A}=0\text{.}\)

The determinant of \(A\) is nonzero, \(\detname{A}\neq 0\text{.}\)

#### Proof.

Theorem SMZD says \(A\) is singular if and only if \(\detname{A}=0\text{.}\) If we negate each of these statements, we arrive at two contrapositives that we can combine as the equivalence, \(A\) is nonsingular if and only if \(\detname{A}\neq 0\text{.}\) This allows us to add a new statement to the list found in Theorem NME6.

Computationally, row-reducing a matrix is the most efficient way to determine if a matrix is nonsingular, though the effect of using division in a computer can lead to round-off errors that confuse small quantities with critical zero quantities. Conceptually, the determinant may seem the most efficient way to determine if a matrix is nonsingular. The definition of a determinant uses just addition, subtraction and multiplication, so division is never a problem. And the final test is easy: is the determinant zero or not? However, the number of operations involved in computing a determinant by the definition very quickly becomes so excessive as to be impractical.

Now for the *coup de grace*. We will generalize Theorem DEMMM to the case of *any* two square matrices. You may recall thinking that matrix multiplication was defined in a needlessly complicated manner. For sure the definition of a determinant seems even stranger. (Though Theorem SMZD might be forcing you to reconsider.) Read the statement of the next theorem and contemplate how nicely matrix multiplication and determinants play with each other.

#### Theorem DRMM. Determinant Respects Matrix Multiplication.

Suppose that \(A\) and \(B\) are square matrices of the same size. Then \(\detname{AB}=\detname{A}\detname{B}\text{.}\)

#### Proof.

This proof is constructed in two cases. First, suppose that \(A\) is singular. Then \(\detname{A}=0\) by Theorem SMZD. By the contrapositive of Theorem NPNT, \(AB\) is singular as well. So by a second application of Theorem SMZD, \(\detname{AB}=0\text{.}\) Putting it all together

as desired.

For the second case, suppose that \(A\) is nonsingular. By Theorem NMPEM there are elementary matrices \(E_{1},\,E_{2},\,E_{3},\,\dots,\,E_{s}\) such that \(A=E_1E_2E_3\dots E_s\text{.}\) Then

It is amazing that matrix multiplication and the determinant interact this way. Might it also be true that \(\detname{A+B}=\detname{A}+\detname{B}\text{?}\) (Exercise PDM.M30)

#### Sage NME7. Nonsingular Matrix Equivalences, Round 7.

Our latest addition to the NME series is sometimes considered the best computational way to determine if a matrix is nonsingular. While computing a single number for a comparison to zero is a very appealing process, other properties of nonsingular matrices are faster for determining if a matrix is nonsingular. Still, it is a worthwhile equivalence. We illustrate both directions.

#### Sage PDM. Properties of Determinants of Matrices.

There are many properties of determinants detailed in this section. You have the tools in Sage to explore all of them. We will illustrate with just two. One is not particularly deep, but we personally find the interplay between matrix multiplication and the determinant nothing short of amazing, so we will not pass up the chance to verify Theorem DRMM. Add some checks of other properties yourself.

We copy the sixth row of the matrix `C`

to the fourth row, so by Theorem DERC, the determinant is zero.

Now, a demonstration of Theorem DRMM.

Earlier, in Sage NME1 we used the `random_matrix()`

constructor with the `algorithm='unimodular'`

keyword to create a nonsingular matrix. We can now reveal that in this context, “unimodular” means “with determinant 1.” So such a matrix will always be nonsingular by Theorem SMZD. But more can be said. It is not obvious at all, and Solution M20.1 has just a partial explanation, but the inverse of a unimodular matrix with all integer entries will have an inverse with all integer entries.

With a fraction-free inverse many “textbook” exercises can be constructed through the use of unimodular matrices. Experiment for yourself below. An `upper_bound`

keyword can be used to control the size of the entries of the matrix, though this will have little control over the inverse.

### Reading Questions PDM Reading Questions

#### 1.

Consider the two matrices below, and suppose you already have computed \(\detname{A}=-120\text{.}\) What is \(\detname{B}\text{?}\) Why?

#### 2.

State the theorem that allows us to make yet another extension to our NMEx series of theorems.

#### 3.

What is amazing about the interaction between matrix multiplication and the determinant?

### Exercises PDM Exercises

#### C30.

Each of the archetypes below is a system of equations with a square coefficient matrix, or is a square matrix itself. Compute the determinant of each matrix, noting how Theorem SMZD indicates when the matrix is singular or nonsingular.

Archetype A, Archetype B, Archetype F, Archetype K, Archetype L

#### M20.

Construct a \(3\times 3\) nonsingular matrix and call it \(A\text{.}\) Then, for each entry of the matrix, compute the corresponding cofactor, and create a new \(3\times 3\) matrix full of these cofactors by placing the cofactor of an entry in the same location as the entry it was based on. Once complete, call this matrix \(C\text{.}\) Compute \(A\transpose{C}\text{.}\) Any observations? Repeat with a new matrix, or perhaps with a \(4\times 4\) matrix.

The result of these computations should be a matrix with the value of \(\detname{A}\) in the diagonal entries and zeros elsewhere. The suggestion of using a nonsingular matrix was partially so that it was obvious that the value of the determinant appears on the diagonal.

This result (which is true in general) provides a method for computing the inverse of a nonsingular matrix. Since \(A\transpose{C}=\detname{A}I_n\text{,}\) we can multiply by the reciprocal of the determinant (which is nonzero!) and the inverse of \(A\) (it exists!) to arrive at an expression for the matrix inverse:

#### M30.

Construct an example to show that the following statement is not true for all square matrices \(A\) and \(B\) of the same size: \(\detname{A+B}=\detname{A}+\detname{B}\text{.}\)

#### T10.

Theorem NPNT says that if the product of square matrices \(AB\) is nonsingular, then the individual matrices \(A\) and \(B\) are nonsingular also. Construct a new proof of this result making use of theorems about determinants of matrices.

#### T15.

Use Theorem DRCM to prove Theorem DZRC as a corollary. (See Proof Technique LC.)

#### T20.

Suppose that \(A\) is a square matrix of size \(n\) and \(\alpha\in\complexes\) is a scalar. Prove that \(\detname{\alpha A}=\alpha^n\detname{A}\text{.}\)

#### T25.

Employ Theorem DT to construct the second half of the proof of Theorem DRCM (the portion about a multiple of a column).