Lecture 26 - Determinants

Learning Objectives

Determinants of Small Matrices

In Lecture 23, we learned about the determinant of a \( 2\times 2\) matrix: \( \det \begin{bmatrix} a & b \\ c & d \end{bmatrix} = ad-bc \). The determinant has the property that if \( A \) is a \( 2 \times 2\) matrix, then \( \det A \ne 0 \) if and only if \( A \) is invertible.

There is a formula for the determinant of a \( 3\times 3\) matrix: \[ \det \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} = aei + bfg + cdh - ceg - bdi - afh. \] It is true that if \( A \) is a \(3 \times 3\) matrix, then \( \det A \ne 0 \) if and only if \( A \) is invertible. However, this formula is impractical to use and doesn't easily generalize to larger matrices.

In this lecture, we will learn a general method for computing determinants of square matrices of any size.

Minors and Cofactors

Our method for computing determinants is based on breaking down our matrix into smaller and smaller matrices.

Definition. Given an \( n \times n \) matrix \( A \), the minor \( M_{i,j} \) is the determinant of the matrix that results from eliminating row \( i \) and column \( j \) from \( A \).

Example 1. Let \( A = \begin{bmatrix} -5 & 2 & 1 \\ 3 & 0 & -4 \\ 7 & 10 & -2 \end{bmatrix} \). Compute the minor \( M_{2,3} \).

The matrix that results from eliminating row 2 and column 3 from \( A \) is \( \begin{bmatrix} -5 & 2 \\ 7 & 10 \end{bmatrix} \), and the determinant of this matrix is \( (-5)(10) - (2)(7) = -64 \). \( \Box \)

Example 2. Let \( A \) be the same matrix from Example 1. Compute the minor \( M_{3,1} \).

The matrix that results from eliminating row 3 and column 1 from \( A \) is \( \begin{bmatrix} 2 & 1 \\ 0 & -4 \end{bmatrix} \), and the determinant of this matrix is \( (2)(-4)-(1)(0) = -8 \). \( \Box \)

Definition. Given an \( n \times n \) matrix \( A \), the cofactor \( C_{i,j} \) is equal to \( (-1)^{i+j} M_{i,j} \).

The \( (-1)^{i+j} \) expression introduces a pattern of plusses and minuses that determines whether \( C_{i,j} = M_{i,j} \) or \( C_{i,j} = -M_{i,j} \): \[ \begin{bmatrix} + & - & + & - & \cdots \\ - & + & - & + & \cdots \\ + & - & + & - & \cdots \\ - & + & - & + & \cdots \\ \vdots & \vdots &\vdots &\vdots & \ddots \end{bmatrix} \]

Definition of the Determinant

Definition. Given an \( n \times n \) matrix \( A \), the determinant of \( A \) is computed by the following process:

  1. Choose any row or column of \( A \)
  2. Multiply each entry of the chosen row/column by the cofactor corresponding to that entry
  3. Add up the results of these products
As a formula, for any \( 1 \le k \le n \) we can write \( \det A = \sum_{i=1}^n a_{ik} C_{i,k} = \sum_{j=1}^n a_{kj} C_{k,j} \).

Example 3. Let \( A = \begin{bmatrix} 3 & -1 & 5 \\ 0 & 4 & -9 \\ -1 & 2 & 8 \end{bmatrix} \). Compute \( \det A \).

If we choose the first row, we see from the definition that \( \det A = 3\cdot C_{1,1} + (-1)\cdot C_{1,2} + 5\cdot C_{1,3} \). Computing the cofactors, we have: \[ 3\cdot C_{1,1} = 3\cdot(-1)^{1+1} \cdot \det \begin{bmatrix} 4 & -9 \\ 2 & 8 \end{bmatrix} = (3)\Bigl( (4)(8)-(-9)(2) \Bigr) = 150 \] \[ (-1) \cdot C_{1,2} = (-1) \cdot(-1)^{1+2} \cdot \det \begin{bmatrix} 0 & -9 \\ -1 & 8 \end{bmatrix} = (1)\Bigl( (0)(8)-(-9)(-1) \Bigr) = -9 \] \[ 5\cdot C_{1,3} = 5\cdot(-1)^{1+3} \cdot \det \begin{bmatrix} 0 & 4 \\ -1 & 2 \end{bmatrix} = (5)\Bigl( (0)(2)-(4)(-1) \Bigr) = 20 \] Adding the products gives \( \det A = 150+(-9)+20=161 \). \( \Box \)

One surprising property of determinants is that it does not matter which row or column you choose. For Example 3, we could have instead chosen the first column. We would then have \( \det A = 3\cdot C_{1,1} + 0\cdot C_{2,1} + (-1)\cdot C_{3,1} \). One advantage of this choice is that we don't have to compute \( C_{2,1} \), since that value is being multiplied by zero. We compute: \[ 3\cdot C_{1,1} = 3\cdot(-1)^{1+1} \cdot \det \begin{bmatrix} 4 & -9 \\ 2 & 8 \end{bmatrix} = (3)\Bigl( (4)(8)-(-9)(2) \Bigr) = 150 \] \[ (-1)\cdot C_{3,1} = (-1)\cdot (-1)^{3+1} \cdot \det \begin{bmatrix} -1 & 5 \\ 4 & -9 \end{bmatrix} = (-1) \Bigl( (-1)(-9)-(5)(4) \Bigr) = 11 \] Adding these gives us \( \det A = 150+11 = 161 \).

Example 4. Let \( A = \begin{bmatrix} -3 & 0 & 1 & -1 \\ 0 & 2 & -1 & 0 \\ 1 & -2 & -1 & 0 \\ 4 & 0 & 0 & -5 \end{bmatrix} \). Compute \( \det A \).

We want to choose a row or column that has as many zeroes as possible to reduce the number of computations we need to perform. There are many good choices, including the second row of \( A \). Using this row gives \( \det A = 0\cdot C_{2,1} + 2\cdot C_{2,2} + (-1)\cdot C_{2,3} + 0\cdot C_{2,4} = 2\cdot C_{2,2} + (-1)\cdot C_{2,3} \). Both \( C_{2,2} \) and \( C_{2,3} \) are computed as \( 3\times 3\) determinants as we did in Example 3: \[ 2\cdot C_{2,2} = 2\cdot (-1)^{2+2} \cdot \det \begin{bmatrix} -3 & 1 & -1 \\ 1 & -1 & 0 \\ 4 & 0 & -5 \end{bmatrix} = (2)(-14) = -28 \] \[ (-1)\cdot C_{2,3} = (-1)\cdot (-1)^{2+3} \cdot \det \begin{bmatrix} -3 & 0 & -1 \\ 1 & -2 & 0 \\ 4 & 0 & -5 \end{bmatrix} = (1)(-38) = -38 \] Adding these gives \( \det A = (-28)+(-38) = -66 \). \( \Box \)

Triangular Matrices

There is a class of matrices for which computing determinants is especially easy:

Definition. A square matrix with entries \( a_{ij} \) is upper triangular if \( a_{ij} = 0 \) whenever \( i \gt j \). A square matrix is lower triangular if \( a_{ij} = 0 \) whenever \( i \lt j \). A square matrix is triangular if it is either upper triangular or lower triangular.

We can visualize these definitions like this, where "\( * \)" represents an entry that may be nonzero:

\( \begin{bmatrix} * & * & * & \cdots & * & * \\ 0 & * & * & \cdots & * & * \\ 0 & 0 & * & \cdots & * & * \\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & 0 & \cdots & * & * \\ 0 & 0 & 0 & \cdots & 0 & * \end{bmatrix} \) \( \qquad \) \( \begin{bmatrix} * & 0 & 0 & \cdots & 0 & 0 \\ * & * & 0 & \cdots & 0 & 0 \\ * & * & * & \cdots & 0 & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ * & * & * & \cdots & * & 0 \\ * & * & * & \cdots & * & * \end{bmatrix} \)
Upper Triangular Lower Triangular

Upper triangular matrices have zeroes below the main diagonal, and lower triangular matrices have zeroes above the main diagonal.

Theorem. Let \( A \) be a triangular \( n\times n\) matrix. Then \( \det A = \prod_{i=1}^n a_{ii} \), the product of the diagonal entries of \( A\).

Proof. We employ a recursive argument. Suppose that \( A \) is upper triangular (the argument for lower triangular matrices is similar). Choose the first column of \( A \) for computing \( \det A \), which gives \( \det A = a_{11} C_{1,1} + a_{21} C_{2,1} + \cdots + a_{n1} C_{n,1} \). Since \( A\) is triangular, \( a_{21} = a_{31} = \cdots = a_{n1} = 0 \). So, \(det A = a_{11} C_{1,1} = a_{11} \det B \), where \( B \) is the matrix that results from eliminating the first row and column of \( A \).

Now, \( B \) is also upper triangular, so by a similar argument, \( \det A = a_{11} \det B = a_{11} a_{22} \det C \), where \( C \) is the result of eliminating the first two rows and columns of \( A \). Continuing in this way gives \( \det A = a_{11} a_{22} \cdots a_{nn} \). \( \Box \)

Example 5. Let \( \det A = \begin{bmatrix} 3 & 0 & 1 & -4 & 0 \\ 0 & -2 & 8 & -5 & 9 \\ 0 & 0 & 2 & 1 & -10 \\ 0 & 0 & 0 & 5 & 0 \\ 0 & 0 & 0 & 0 & -1 \end{bmatrix} \). Compute \( \det A \).

We recognize that \( A \) is triangular, and compute \( \det A = (3)(-2)(2)(5)(-1) = 60 \). \( \Box \)

Properties of Determinants

Theorem (Properties of Determinants). Let \( A \) be an \( n\times n\) matrix. Then,

The proof of these properties is beyond the scope of this text, but you can learn more by reading the supplemental Lecture 26B: Understanding Determinant Properties.

« Lecture 25 Back to Top Lecture 27 »