2.1 Determinants by Cofactor Expansion
Determinants are fundamental to Linear Algebra, providing scalar values that encapsulate key properties of a square matrix.
Recall from previous discussions, a \(2 \times 2\) matrix \(A\) is invertible if its determinant is non-zero.
\[ A = \left[ \begin{array}{ll}a & b \\ c & d \end{array} \right] \]
The determinant of \(A\) is a scalar value: \[ \operatorname {det}(A) = a d - b c \quad \text{or} \quad \left| \begin{array}{ll}a & b \\ c & d \end{array} \right| = a d - b c \]
Important: \(\operatorname{det}(A)\) is a number, while \(A\) is a matrix.
If \(\operatorname{det}(A) \ne 0\), the inverse of \(A\) can be expressed as: \[ A^{-1} = \frac{1}{\operatorname{det}(A)} \left[ \begin{array}{rr}d & -b \\ -c & a \end{array} \right] \]
To define determinants for larger matrices inductively, we use new terminology: minors and cofactors.
First, let’s use subscripted entries for a general \(2 \times 2\) matrix: \[ A = \left[ \begin{array}{ll}a_{11} & a_{12} \\ a_{21} & a_{22} \end{array} \right] \implies \operatorname *{det}(A) = a_{11}a_{22} - a_{12}a_{21} \]
Base case for induction: The determinant of a \(1 \times 1\) matrix \([a_{11}]\) is \(\operatorname *{det}[a_{11}] = a_{11}\).
If \(A\) is a square matrix:
The sign factor \((-1)^{i+j}\) follows a “checkerboard” pattern:
\[ \left[{\begin{array}{l l l l l l}{+}&{-}&{+}&{-}&{+}&{\cdots}\\ {-}&{+}&{-}&{+}&{-}&{\cdots}\\ {+}&{-}&{+}&{-}&{+}&{\cdots}\\ {-}&{+}&{-}&{+}&{-}&{\cdots}\\ {\vdots}&{\vdots}&{\vdots}&{\vdots}&{\vdots}\end{array}}\right] \]
This means \(C_{ij} = M_{ij}\) if \(i+j\) is even (positive sign), and \(C_{ij} = -M_{ij}\) if \(i+j\) is odd (negative sign).
Let \[ A = \left[ \begin{array}{ccc}3 & 1 & -4 \\ 2 & 5 & 6 \\ 1 & 4 & 8 \end{array} \right] \] To find \(M_{11}\), delete row 1 and column 1: \[ M_{11} = \operatorname{det}\left| \begin{array}{cc}5 & 6 \\ 4 & 8 \end{array} \right| = (5)(8) - (6)(4) = 40 - 24 = 16 \] Since \(1+1=2\) (even), \(C_{11} = (-1)^{1+1}M_{11} = M_{11} = 16\).
To find \(M_{32}\), delete row 3 and column 2: \[ M_{32}=\operatorname{det}\left|\begin{array}{cc}{3}&{-4}\\ {2}&{6}\end{array}\right|=(3)(6)-(-4)(2) = 18 - (-8) = 26 \] Since \(3+2=5\) (odd), \(C_{32} = (-1)^{3+2}M_{32} = -M_{32} = -26\).
Let’s re-examine the \(2 \times 2\) determinant using cofactors. For \(A = \left[ \begin{array}{ll}a_{11} & a_{12} \\ a_{21} & a_{22} \end{array} \right]\), the checkerboard pattern for signs is \(\left[{\begin{array}{c c}{+}&{-}\\ {-}&{+}\end{array}}\right]\).
The cofactors are:
Using these, \(\operatorname{det}(A)\) can be expressed in terms of cofactors in four ways:
All four expansions evaluate to \(\operatorname{det}(A) = a_{11}a_{22} - a_{12}a_{21}\).
Theorem 2.1.1 (Uniqueness of Cofactor Expansion) If \(A\) is an \(n \times n\) matrix, then regardless of which row or column of \(A\) is chosen, the number obtained by multiplying the entries in that row or column by the corresponding cofactors and adding the resulting products is always the same.
This allows for the formal definition for general \(n \times n\) matrices:
The determinant of an \(n \times n\) matrix \(A\) is the number obtained by any of the following cofactor expansions:
Cofactor expansion along the \(j\)-th column: \[ \operatorname *{det}(A) = a_{1j}C_{1j} + a_{2j}C_{2j} + \dots +a_{nj}C_{nj} \]
Cofactor expansion along the \(i\)-th row: \[ \operatorname *{det}(A) = a_{i1}C_{i1} + a_{i2}C_{i2} + \dots +a_{in}C_{in} \]
Let’s find the determinant of \(A\) by cofactor expansion along the first row:
\[ A=\left[{\begin{array}{r r r}{3}&{1}&{0}\\ {-2}&{-4}&{3}\\ {5}&{4}&{-2}\end{array}}\right] \]
\(\operatorname *{det}(A) = a_{11}C_{11} + a_{12}C_{12} + a_{13}C_{13}\)
\[ \begin{aligned} \operatorname *{det}(A) &= 3 \cdot \operatorname{det}\left| \begin{array}{cc}{-4} & 3\\ 4 & {-2} \end{array} \right| - 1 \cdot \operatorname{det}\left| \begin{array}{cc}{-2} & 3\\ 5 & {-2} \end{array} \right| + 0 \cdot \operatorname{det}\left| \begin{array}{cc}{-2} & {-4}\\ 5 & 4 \end{array} \right| \\ &= 3((-4)(-2) - (3)(4)) - 1((-2)(-2) - (3)(5)) + 0 \cdot (\text{any value}) \\ &= 3(8 - 12) - 1(4 - 15) + 0 \\ &= 3(-4) - 1(-11) + 0 \\ &= -12 + 11 + 0 \\ &= -1 \end{aligned} \]
The best strategy for cofactor expansion is to expand along a row or column with the most zero entries. This reduces the number of minors you need to compute.
Let’s use the same matrix and evaluate \(\operatorname{det}(A)\) by cofactor expansion along the first column:
\[ A=\left[{\begin{array}{r r r}{3}&{1}&{0}\\ {-2}&{-4}&{3}\\ {5}&{4}&{-2}\end{array}}\right] \]
\(\operatorname *{det}(A) = a_{11}C_{11} + a_{21}C_{21} + a_{31}C_{31}\)
\[ \begin{aligned} \operatorname *{det}(A) &= 3 \cdot \operatorname{det}\left| \begin{array}{cc}{-4} & 3\\ 4 & {-2} \end{array} \right| - (-2) \cdot \operatorname{det}\left| \begin{array}{cc}{1} & 0\\ 4 & {-2} \end{array} \right| + 5 \cdot \operatorname{det}\left| \begin{array}{cc}{1} & 0\\ {-4} & 3 \end{array} \right| \\ &= 3((-4)(-2) - (3)(4)) + 2((1)(-2) - (0)(4)) + 5((1)(3) - (0)(-4)) \\ &= 3(8 - 12) + 2(-2 - 0) + 5(3 - 0) \\ &= 3(-4) + 2(-2) + 5(3) \\ &= -12 - 4 + 15 \\ &= -1 \end{aligned} \] This agrees with the result from the first-row expansion.
Consider this \(4 \times 4\) matrix. Which row or column would you choose for expansion to minimize calculations?
\[ A = \left[ \begin{array}{cccc}1 & 0 & 0 & -1 \\ 3 & 1 & 2 & 2 \\ 1 & 0 & -2 & 1 \\ 2 & 0 & 0 & 1 \end{array} \right] \]
The second column is the optimal choice as it contains three zeros: \(a_{12}=0\), \(a_{32}=0\), \(a_{42}=0\). Expanding along the second column: \[ \operatorname *{det}(A) = a_{12}C_{12} + a_{22}C_{22} + a_{32}C_{32} + a_{42}C_{42} \] Since \(a_{12}, a_{32}, a_{42}\) are zero, only the \(a_{22}C_{22}\) term remains: \[ \operatorname *{det}(A) = 1 \cdot C_{22} = 1 \cdot (-1)^{2+2} M_{22} = M_{22} \] Now we need to calculate \(M_{22}\), which is the determinant of the \(3 \times 3\) submatrix after deleting row 2 and column 2: \[ M_{22} = \operatorname{det}\left| \begin{array}{ccc} 1 & 0 & -1 \\ 1 & -2 & 1 \\ 2 & 0 & 1 \end{array} \right| \quad (\text{again, second column has zeros!}) \]
Calculating \(M_{22}\) by expanding along its second column: \(M_{22} = 0 \cdot C_{12}^{(M_{22})} + (-2) \cdot C_{22}^{(M_{22})} + 0 \cdot C_{32}^{(M_{22})}\)
\(M_{22} = (-2) \cdot (-1)^{2+2} \operatorname{det}\left| \begin{array}{cc}{1}&{{-1}}\\ {{2}}&{{1}}\end{array}\right|\)
\(M_{22} = -2 \cdot ((1)(1) - (-1)(2))\)
\(M_{22} = -2 \cdot (1 + 2) = -2 \cdot 3 = -6\)
Thus, \(\operatorname *{det}(A) = -6\).
Let’s verify this with Python (using NumPy):
A special and very useful case involves triangular matrices, common in system analysis after methods like Gaussian elimination.
Theorem 2.1.2 If \(A\) is an \(n \times n\) triangular matrix (upper triangular, lower triangular, or diagonal), then \(\det(A)\) is the product of the entries on the main diagonal of the matrix; that is, \(\det(A) = a_{11} a_{22} \dots a_{nn}\).
\[ \operatorname *{det}\left[ \begin{array}{cccc}a_{11} & 0 & 0 & 0 \\ a_{21} & a_{22} & 0 & 0 \\ a_{31} & a_{32} & a_{33} & 0 \\ a_{41} & a_{42} & a_{43} & a_{44} \end{array} \right] \] Expanding along the first row (which has many zeros) simplifies quickly: \(= a_{11} \cdot \operatorname *{det}\left[ \begin{array}{ccc}a_{22} & 0 & 0 \\ a_{32} & a_{33} & 0 \\ a_{42} & a_{43} & a_{44} \end{array} \right]\) \(= a_{11}a_{22} \cdot \operatorname *{det}\left[ \begin{array}{cc}a_{33} & 0 \\ a_{43} & a_{44} \end{array} \right]\) \(= a_{11}a_{22}a_{33}a_{44}\)
This technique offers a quick visual shortcut for small matrices, but it only works for \(2 \times 2\) and \(3 \times 3\) determinants! It does not generalize to \(4 \times 4\) or higher.
Multiply entries on the rightward arrow and subtract the product of entries on the leftward arrow. \[ \left| \begin{array}{ll}a_{11} & a_{12} \\ a_{21} & a_{22} \end{array} \right| = a_{11} a_{22} - a_{12} a_{21} \]
Calculate the determinant of \(\left[ \begin{array}{cc}3 & 1 \\ 4 & -2 \end{array} \right]\) using the arrow technique.
\[ \left| \begin{array}{cc}3 & 1 \\ 4 & -2 \end{array} \right| = (3)(-2) - (1)(4) = -6 - 4 = -10 \]
Verify this with Python:
Calculate the determinant of \(\left[ \begin{array}{ccc}1 & 2 & 3 \\ -4 & 5 & 6 \\ 7 & -8 & 9 \end{array} \right]\) using the arrow technique.
\[ \left[ (1)(5)(9) + (2)(6)(7) + (3)(-4)(-8) \right] \\ - \left[ (3)(5)(7) + (1)(6)(-8) + (2)(-4)(9) \right] \] \[ = [45 + 84 + 96] - [105 - 48 - 72] \] \[ = [225] - [-15] = 225 + 15 = 240 \]
Verify with Python:
Determinants are more than just mathematical curiosities; they have critical applications in Electrical and Computer Engineering.
A common engineering problem is solving for unknown currents or voltages in a circuit. This often leads to a system of linear equations represented by a matrix.
A unique solution for voltages/currents exists if the determinant of the circuit’s system matrix is non-zero. If the determinant is zero, it might indicate a redundant equation, a short circuit, or an open circuit, leading to non-unique or no solution for certain variables.