Lay's Linear Algebra

Chapter 3: Determinants

3.1 Introduction to determinants

Study guide for Linear Algebra and Its Applications (David C. Lay, 6th edition)

Independent study guide. Not affiliated with or endorsed by Pearson.

Big idea

A square matrix gets one number attached to it, and that number answers the invertibility question. For a $2 \times 2$ matrix the number is $ad - bc$, and you already met it when you wrote down the inverse formula: the inverse exists exactly when $ad - bc$ is not zero. This section pushes that one number up to every size.

The push is recursive. To get the determinant of an $n \times n$ matrix, cross out a row and a column, take the determinant of what is left, attach a sign, and add up across one row. Each smaller determinant is computed the same way, down to the $2 \times 2$ case where the formula is explicit. That is the whole definition.

Two facts make the recursion usable. First, you may expand along any row or any column, not just the first row, and every choice gives the same answer. So pick the line with the most zeros and most of the work disappears. Second, a triangular matrix hands over its determinant immediately: multiply the diagonal. Almost every determinant you compute by hand exploits one of these two.

Decoder

The determinant is the alternating sum of the entries of a row weighted by the determinants of the matrices obtained by deleting that entry’s row and column.

Read it as a recipe. Walk along one row. At each entry, delete the row and column it sits in; what remains is a smaller square matrix with its own determinant. Multiply the entry by that smaller determinant. Add the results, but flip the sign of every other term. The flipping is what “alternating” means, and the sign depends only on position, not on the numbers.

The phrase “cofactor of an entry” packs the sign and the smaller determinant into one object. The cofactor at row $i$, column $j$ is $(-1)^{i+j}$ times the determinant of the matrix with row $i$ and column $j$ removed. Once cofactors are named, the definition shrinks to: multiply each entry of a row by its cofactor and add.

Definitions and results

Determinant of a $2 \times 2$ matrix. For $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$, the determinant is $\det A = ad - bc$. It is written $\det A$ or with vertical bars around the entries.

Minor and cofactor. Let $A$ be $n \times n$ with $n \ge 2$. Deleting row $i$ and column $j$ leaves an $(n-1) \times (n-1)$ matrix; call its determinant the minor $M_{ij}$. The cofactor is $C_{ij} = (-1)^{i+j} M_{ij}$. The sign factor follows a checkerboard that starts with $+$ in the top-left corner and alternates in both directions, so you never need to compute $(-1)^{i+j}$ by hand.

Cofactor expansion. The determinant of $A$ is

$$ \det A = a_{i1}C_{i1} + a_{i2}C_{i2} + \cdots + a_{in}C_{in} $$

for any fixed row $i$, and equally

$$ \det A = a_{1j}C_{1j} + a_{2j}C_{2j} + \cdots + a_{nj}C_{nj} $$

for any fixed column $j$. Every row and every column gives the same number. This is the result that makes the definition well posed and also makes it practical: expand along whichever line has the most zeros.

A zero entry costs nothing. If $a_{ij} = 0$, its term in the expansion is zero and its cofactor never has to be computed. A row with a single nonzero entry reduces an $n \times n$ determinant to one $(n-1) \times (n-1)$ determinant.

Triangular matrices. If every entry below the diagonal is zero, or every entry above it is, then $\det A$ is the product of the diagonal entries. Expand along the first column of a lower-triangular matrix repeatedly and this falls out. In particular the determinant of the identity is $1$, and the determinant of any matrix with a zero on the diagonal of a triangular form is $0$.

Size of the work. Cofactor expansion on a general $n \times n$ matrix costs on the order of $n!$ multiplications, which is hopeless past about $n = 4$ by hand and past about $n = 12$ by machine. That is why the next section replaces expansion with row reduction. Expansion stays the definition and stays the right tool for small matrices and for matrices with many zeros.

Worked examples

The $2 \times 2$ case

Take

$$ A = \begin{bmatrix} 3 & 1 \\ 5 & 2 \end{bmatrix} $$

Then $\det A = 3(2) - 1(5) = 6 - 5 = 1$. Since the determinant is not zero, $A$ is invertible, and the inverse formula divides by $1$, so the inverse has whole-number entries: $\begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix}$. Check one product entry: row one of $A$ times column one of the inverse gives $3(2) + 1(-5) = 1$.

Expanding a $3 \times 3$ along the first row

Take

$$ B = \begin{bmatrix} 1 & 2 & -1 \\ 3 & 0 & 2 \\ -2 & 1 & 4 \end{bmatrix} $$

Delete row one and column one to get $\begin{bmatrix} 0 & 2 \\ 1 & 4 \end{bmatrix}$, with determinant $0(4) - 2(1) = -2$. The sign at position one-one is $+$.

Delete row one and column two to get $\begin{bmatrix} 3 & 2 \\ -2 & 4 \end{bmatrix}$, with determinant $12 - (-4) = 16$. The sign at position one-two is $-$.

Delete row one and column three to get $\begin{bmatrix} 3 & 0 \\ -2 & 1 \end{bmatrix}$, with determinant $3 - 0 = 3$. The sign at position one-three is $+$.

So

$$ \det B = 1(-2) - 2(16) + (-1)(3) = -2 - 32 - 3 = -37 $$

Check by expanding along column two instead. The entries there are $2$, $0$, $1$, with signs $-$, $+$, $-$. The zero kills the middle term. The first term is $-2 \cdot \det\begin{bmatrix} 3 & 2 \\ -2 & 4 \end{bmatrix} = -2(16) = -32$. The third is $-1 \cdot \det\begin{bmatrix} 1 & -1 \\ 3 & 2 \end{bmatrix} = -(2 + 3) = -5$. The total is $-32 - 5 = -37$, matching.

Choosing the line with the zeros

Take

$$ C = \begin{bmatrix} 2 & 0 & 0 \\ 1 & 3 & 4 \\ 5 & 0 & 6 \end{bmatrix} $$

Column two is $0$, $3$, $0$. Only one term survives, and its sign at position two-two is $+$:

$$ \det C = 3 \cdot \det\begin{bmatrix} 2 & 0 \\ 5 & 6 \end{bmatrix} = 3(12 - 0) = 36 $$

Check along the first row, which also has two zeros: the only surviving term is $2 \cdot \det\begin{bmatrix} 3 & 4 \\ 0 & 6 \end{bmatrix} = 2(18) = 36$. The two routes agree, and both needed one small determinant instead of three.

Reading a triangular determinant off the diagonal

Take

$$ D = \begin{bmatrix} 4 & 7 & -2 \\ 0 & 3 & 5 \\ 0 & 0 & -1 \end{bmatrix} $$

Everything below the diagonal is zero, so $\det D = 4 \cdot 3 \cdot (-1) = -12$. Confirm it the slow way by expanding along the first column: the only nonzero entry is $4$, leaving $4 \cdot \det\begin{bmatrix} 3 & 5 \\ 0 & -1 \end{bmatrix} = 4(-3 - 0) = -12$. Same answer, and the entries $7$, $-2$, and $5$ above the diagonal never mattered.

Practice

Start with the two sizes you can do from the formula and one pass of expansion.

Practice

Generated problems for this section, graded instantly.

Then work the general recursion: pick a good row or column, build the cofactors with their signs, and add.

Practice

Generated problems for this section, graded instantly.

Videos

Watch for the moment the determinant is described as a scaling factor for area. That picture is not needed to compute anything here, but it explains in advance why a zero determinant means the matrix is not invertible: the transformation has flattened space onto something thinner, and nothing can unflatten it.

The determinant | Chapter 6, Essence of linear algebra

3Blue1Brown

Quiz

Five items on computing determinants by formula and by cofactor expansion.

Quiz

5 problems with a score at the end.