Determinants

Table of Contents

1. Determinants

The determinant of a matrix serves as a method for checking if a given square matrix is invertible or not. The fundamental principle of the determinant rests on the fact that a square matrix is invertible if all the diagonal entries are nonzero for its upper triangular form, as this implies there is a pivot in every row.

That's what the determinant does: it yields a nonzero value only if all the diagonal entries for the upper triangular form of the square matrix are nonzero.

1.1. Determinant of \(2 \times 2\)

Given a \(2 \times 2\) matrix with the upper left entry nonzero, we can simplify the matrix to be upper triangular like so:

\begin{align} \begin{bmatrix} a & b \\ c & d \end{bmatrix} \sim \begin{bmatrix} a & b \\ ac & ad \end{bmatrix} \sim \begin{bmatrix} a & b \\ 0 & ad-bc \end{bmatrix} \notag \end{align}

We want \(ad-bc \neq 0\). Thus, we call \(ad-bc\) the determinant of a \(2 \times 2\) matrix, where the matrix is invertible if and only if \(ad-bc \neq 0\).

1.2. Determinant of \(3 \times 3\)

We can also try to turn a \(3 \times 3\) matrix into an upper triangular form, if the top left entry is nonzero (this can always be the case, unless the first entry for all the rows are zero, in which case it is clear that the matrix is not invertible):

\begin{align} \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix} \sim \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{11}a_{21} & a_{11}a_{22} & a_{11}a_{23} \\ a_{11}a_{31} & a_{11}a_{32} & a_{11}a_{33} \end{bmatrix} \sim \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ 0 & a_{11}a_{22} - a_{12}a_{21} & a_{11}a_{23}-a_{13}a_{21} \\ 0 & a_{11}a_{32} - a_{12}a_{31} & a_{11}a_{33} - a_{13}a_{31} \end{bmatrix} \notag \end{align}

Since we know that \(a_{11}\) is nonzero, we want to know if the diagonal of the \(2 \times 2\) matrix formed by removing the first column and row have entries that are all nonzero. However, this is exactly what the determinant does, so we can just find the determinant of that submatrix.

Therefore, calculating this determinant gives us:

\begin{align} (a_{11}a_{22} - a_{12}a_{21})(a_{11}a_{33} - a_{13}a_{31}) - (a_{11}a_{23}-a_{13}a_{21})(a_{11}a_{32} - a_{12}a_{31}) \neq 0 \notag \\ a_{11}^{2}a_{22}a_{33}-a_{11}a_{12}a_{21}a_{33}-a_{11}a_{13}a_{22}a_{31}+a_{12}a_{13}a_{21}a_{31}-[a_{11}^{2}a_{23}a_{32}-a_{11}a_{13}a_{21}a_{32}-a_{11}a_{12}a_{23}a_{31}+a_{12}a_{13}a_{21}a_{31}] \neq 0 \notag \\ a_{11}[a_{11}a_{22}a_{33}+a_{13}a_{21}a_{32}+a_{12}a_{23}a_{31}-a_{12}a_{21}a_{33}-a_{13}a_{22}a_{31}-a_{11}a_{23}a_{32}]+a_{12}a_{13}a_{21}a_{31}-a_{12}a_{13}a_{21}a_{31} \neq 0\notag \\ a_{11}[a_{11}a_{22}a_{33}+a_{13}a_{21}a_{32}+a_{12}a_{23}a_{31}-a_{12}a_{21}a_{33}-a_{13}a_{22}a_{31}-a_{11}a_{23}a_{32}] \neq 0 \notag \\ a_{11}a_{22}a_{33}+a_{13}a_{21}a_{32}+a_{12}a_{23}a_{31}-a_{12}a_{21}a_{33}-a_{13}a_{22}a_{31}-a_{11}a_{23}a_{32} \neq 0 \notag \end{align}

This is precisely the determinant of a \(3 \times 3\) matrix. We can view this, alternatively, as:

\begin{align} \det(A) = a_{11} \begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{vmatrix} - a_{12} \begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix} + a_{13} \begin{vmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{vmatrix} \end{align}

1.3. Determinant of \(n \times n\)

We can generalize our method to any \(n \times n\) matrix \(A=[a_{ij}]\). We call the determinant of the submatrix with the i-th row and j-th column removed the minor of an entry \(a_{ij}\), or \(M_{ij}\). Then, define the cofactor \(C_{ij}\) of entry \(a_{ij}\) to be \((-1)^{i+j}M_{ij}\).

We claim that we can apply cofactor expansion to any row and column to find the determinant like so:

\begin{align} \det(A) = \sum a_{ij}C_{ij} \end{align}

where \(i\) and \(j\) iterate along some row or column of \(A\).

1.3.1. Proof

We can see that cofactor expansion works using induction. We know that the base case, \(2 \times 2\), is true. The inductive hypothesis will assume that for any \(k \times k\) matrix, the cofactor expansion will find the determinant that will be non-zero if and only if it is invertible, that is, it will correctly determine invertibility.

For the inductive step, we must prove that this still holds for any \((k+1) \times (k+1)\) matrix \(A\). Without loss of generality, we will use the first row to perform our expansion.

We know that the first entry in the first row must be nonzero, because if it is zero, then we can simply do a row exchange. If all first entries are zero, then this matrix is clearly not invertible as there cannot be a pivot in every row.

We can now create a matrix \(A'\) by applying row operations on \(A\) that eliminate the first entries for every row other than the first, such that we get a matrix like so:

\begin{align} \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1,k+1} \\ 0 \\ \vdots & & B \\ 0 \end{bmatrix} \notag \end{align}

We know that the determinant of \(A\) is the same as the determinant of \(A'\). We can now compute the determinant of \(A\) by doing cofactor expansion on \(A'\):

\begin{align} \det(A) &= det(A') = a_{11}C'_{11} + a_{12}C'_{12} + \cdots + a_{1, k+1}C'_{1,k+1} \notag \\ &= a_{11}\det(B) + a_{12}C'_{12} + \cdots + a_{1, k+1}C'_{1,k+1} \notag \\ \end{align}

However, notice that except for the minor \(B\), all the other minors have their first column as all zeroes (because every first entry except for the first row is zero). This implies that except for \(B\), all the other minors have a zero determinant because they are not invertible. Knowing this, we can simplify the determinant \(A\) to just:

\begin{align} \det(A) &= a_{11}\det(B) + a_{12}C'_{12} + \cdots + a_{1, k+1}C'_{1,k+1} \notag \\ &= a_{11}\det(B) + a_{12}\cdot 0 + \cdots + a_{1, k+1} \cdot 0 \notag \\ &= a_{11}\det(B) \notag \end{align}

Now, let's prove that this determinant works. Since \(a_{11}\) is nonzero, \(A\) is invertible if and only if \(B\) is invertible. Since by our inductive hypothesis we know that the determinant of \(B\) given by cofactor expansion works, this means that the matrix \(B\) is invertible if and only if \(\det(B) \neq 0\).

Therefore, if \(A\) is not invertible, then \(B\) is also not invertible, and \(\det(B) = 0\) which implies \(\det(A) = a_{11}\det(B) = 0\). However, if \(A\) is invertible, then \(B\) is also invertible, which means \(\det(A)\) is nonzero.

Thus, \(A\) is invertible if and only if \(\det(A) \neq 0\), given by cofactor expansion, which completes the inductive step.

Since the base case of \(2 \times 2\) is true, and the inductive step has shown that if \(k \times k\) is true then \((k+1) \times (k+1)\) is also true, then we conclude by induction that the cofactor expansion formula for determinants is valid for all matrices greater than \(2 \times 2\). \(\quad \blacksquare\)

1.4. Determinant of Triangular Matrix

We want to consider the general determinant of an upper triangular matrix, like so:

\begin{align} A = \begin{vmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ 0 & a_{22} & \cdots & a_{2n} \\ \vdots & & \ddots \\ 0 & 0 & \cdots & a_{nn} \end{vmatrix} \notag \end{align}

If we do cofactor expansion on the first column, notice that we only need to consider \(a_{11}\) because all the other entries are \(0\). Thus, the cofactor expansion of this matrix is just:

\begin{align} \det A &= a_{11} \begin{vmatrix}a_{22} & \cdots & a_{2n} \\ 0 & \ddots \\ 0 & \cdots & a_{nn} \end{vmatrix} \notag \\ &= a_{11} \cdot a_{22} \begin{vmatrix}a_{32} & \cdots & a_{2n} \\ 0 & \ddots \\ 0 & \cdots & a_{nn}\end{vmatrix} \notag \\ &\vdots \notag \\ &= a_{11} \cdot a_{22} \cdot \cdots \cdot a_{nn} \end{align}

So, the determinant of a triangular matrix is just the product of the diagonal entries.

1.5. Determinant of Identity Matrix

Since the identity matrix is in triangular form, with ones on the diagonal and zeroes everywhere else, the determinant of any identity matrix is just \(1\).

1.6. Product of Determinants

A property of the product of determinants, if \(A, B\) are square matrices:

\begin{align} \det (AB) = \det A \cdot \det B \end{align}

2. Row Operations with Determinants

We would like to understand how row operations would affect the determinant of a matrix. We will consider the three basic row operations: scaling, interchanging two rows, and adding a multiple of one row to another.

2.1. Scaling

Consider the \(2 \times 2\) case:

\begin{align} \begin{vmatrix} a & b \\ c & d \end{vmatrix} &= ad - bc \notag \\ \begin{vmatrix} ra & rb \\ c & d \end{vmatrix} &= rad - rbc = r(ad - bc) \notag \end{align}

We see that scaling a row in a matrix by \(r\) scales the determinant by \(r\) as well. This can be generalized to any size square matrix as by cofactor expansion, their determinant can all be represented by a sum of \(2 \times 2\) determinants, whose \(r\) can then be factored out.

2.2. Interchanging

Consider the \(2 \times 2\) case:

\begin{align} \begin{vmatrix} a & b \\ c & d \end{vmatrix} &= ad - bc \notag \\ \begin{vmatrix} c & d \\ a & b \end{vmatrix} &= bc - ad \notag \end{align}

We see that interchanging a row makes the determinant the negative of the original. To see why this applies to any size square matrix, consider the following two cases.

In the first case, we interchange two adjacent rows. We can keep the minors in the cofactor expansion the same by simply swapping which row to expand on. However, the only thing that changes is the sign of \((-1)^{i+j}\): since \(i\) changes by one, the determinant changes by a factor of \(-1\). In other words, interchanging two adjacent rows in a square matrix makes the new determinant the negative of the original.

The second case would be interchanging two non-adjacent rows. However, realize that we reach the same result of interchanging two non-adjacent rows by chaining together interchanges of adjacent rows. Let's say their are \(n\) rows between the two non-adjacent rows we want to interchange. It can be shown that it takes \(n+1\) interchanges to get the first row to the place of the second row, and another \(n\) interchanges to get the second row back to the place of the first row. Therefore, in total, there will always be \(2n+1\) adjacent row interchanges, which is always an odd number. Since multiplying the original determinant by a factor of \({-1}^{2n+1}\) will always yield \(-1\), interchanging two non-adjacent rows will also make the new determinant the negative of the original.

2.3. Addition

Consider the following \(3 \times 3\) matrix where the first row has been added to a multiple of the second row:

\begin{align} \begin{vmatrix} a_{11} + ra_{21} & a_{12} + ra_{22} & a_{13} + ra_{23} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix} = \begin{vmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix} + \begin{vmatrix} ra_{21} & ra_{22} & ra_{23} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix} \notag \end{align}

We can break this up into these two matrices by considering how cofactor expansion on the first row works: the minors are the same, and we can break apart each of the entries and distribute.

Notice that the first matrix is simply the determinant of the original matrix, and the second matrix has the first row as a multiple of the second row. This means the determinant of the second matrix must be \(0\), since if one row is the multiple of another, it is impossible to have a pivot in every row and thus the matrix is not invertible.

In other words, the determinant of a matrix that has one row added to the multiple of another is just the determinant of the original matrix.

3. Cramer's Rule

Cramer's rule can be used to solve \(n \times n\) systems which have a unique solution. If \(A\) is \(n \times n\) and invertible, \(\mathbf{b}\) is \(n \times 1\), and we want to solve \(A\mathbf{x} = \mathbf{b}\), denote \(A_i(\mathbf{b})\) as the matrix \(A\) with its i-th column replaced by \(\mathbf{b}\). Then, Cramer's rule states that for \(A\mathbf{x} = \mathbf{b}\), where \(\mathbf{X} = (x_1, x_2, \dots, x_n)\), the solution is:

\begin{align} x_i = \frac{\det[A_i(\mathbf{b})]}{\det A} \end{align}

3.1. Proof

Consider \(A \cdot I_i(\mathbf{x})\). We know that due to matrix multiplication by columns, we have the following:

\begin{align} AI_i(\mathbf{x}) &= A_i(\mathbf{b}) \notag \\ \det[AI_i(\mathbf{x})] &= \det[A_i(\mathbf{b})] \notag \\ \det A \cdot \det I_i(\mathbf{x}) &= \det[A_i(\mathbf{b})] \notag \\ \det A \cdot x_i &= \det[A_i(\mathbf{b})] \notag \\ x_i &= \frac{\det[A_i(\mathbf{b})]}{\det A} \notag \end{align}
Last modified: 2025-09-19 10:06