Tutorials › Linear Algebra › Cofactor Expansion Along Any Row or Column

Determinants by Cofactor Expansion · Tutorial 219 of 1000

Cofactor Expansion Along Any Row or Column

Use the cofactor expansion theorem to compute a determinant along any chosen row or column, and check each term through its minor and sign.

Beginner 10 min read

What You'll Learn

  • Define the minor and cofactor associated with a matrix entry
  • Write cofactor expansions along any specified row or column
  • Compute determinants using exact arithmetic and verify results with a second expansion
  • Apply the expansion when a row or column has only one nonzero entry
  • Avoid confusing row cofactors with column cofactors or omitting checkerboard signs

Expanding Beyond the First Row

The recursive definition of a determinant gives a way to expand along the first row. The same pattern works along every row and every column: each entry is multiplied by a signed determinant formed by deleting its row and column. This means a determinant can be calculated from whichever row or column is specified, although the choice may affect how much arithmetic is required.

We work with square matrices over \(\mathbb{R}\). For a matrix \(\mathbf{A}=[a_{ij}]\in\mathbb{R}^{n\times n}\), delete row \(i\) and column \(j\) to obtain an \((n-1)\times(n-1)\) matrix. Its determinant is the minor associated with entry \(a_{ij}\). The sign attached to that minor alternates in a checkerboard pattern.

Definition: The minor determinant \(M_{ij}\) of \(a_{ij}\) is the determinant of the matrix obtained by deleting row \(i\) and column \(j\) from \(\mathbf{A}\). The cofactor of \(a_{ij}\) is \(C_{ij}=(-1)^{i+j}M_{ij}\). For a \(1\times1\) matrix, the deleted matrix is \(0\times0\), and its determinant is defined to be \(1\).

The sign depends on the positions of the entry, not on the values of the matrix. The sign is positive when \(i+j\) is even and negative when \(i+j\) is odd. For example, the signs in a \(4\times4\) cofactor array are

$$ \begin{bmatrix} +&-&+&-\\ -&+&-&+\\ +&-&+&-\\ -&+&-&+ \end{bmatrix}. $$
Theorem (Cofactor expansion along any row or column): For \(\mathbf{A}\in\mathbb{R}^{n\times n}\), \(n\geq1\), and any row index \(i\) or column index \(j\), $$ \det\mathbf{A}=\sum_{k=1}^{n}a_{ik}C_{ik} \qquad\text{and}\qquad \det\mathbf{A}=\sum_{k=1}^{n}a_{kj}C_{kj}. $$ These are called cofactor expansions along row \(i\) and column \(j\), respectively. This is a standard determinant theorem; its proof is developed in the later treatment of determinant properties. Here, the theorem justifies using any specified row or column: the resulting sum equals the determinant.

In each sum, the cofactors belong to the same row or column as the entries being used. A row expansion uses \(a_{i1},\dots,a_{in}\) with \(C_{i1},\dots,C_{in}\); a column expansion uses \(a_{1j},\dots,a_{nj}\) with \(C_{1j},\dots,C_{nj}\). Cofactors are not reused from a different row or column.

Computing Along a Chosen Row

Worked Example: Expansion Along the Second Row

Compute the determinant of \(\mathbf{A}=\begin{bmatrix}1&2&0\\3&-1&4\\2&1&5\end{bmatrix}\) by expanding along row 2.

Row 2 is \([3,-1,4]\). First compute its three cofactors, deleting the indicated row and column each time:

$$ \begin{aligned} C_{21} &=(-1)^{2+1}\det\begin{bmatrix}2&0\\1&5\end{bmatrix} =-\bigl(2\cdot5-0\cdot1\bigr)=-10,\\ C_{22} &=(-1)^{2+2}\det\begin{bmatrix}1&0\\2&5\end{bmatrix} =1\cdot(1\cdot5-0\cdot2)=5,\\ C_{23} &=(-1)^{2+3}\det\begin{bmatrix}1&2\\2&1\end{bmatrix} =-\bigl(1\cdot1-2\cdot2\bigr)=3. \end{aligned} $$

Now multiply each entry in row 2 by its cofactor and add:

$$ \det\mathbf{A} =3(-10)+(-1)(5)+4(3) =-30-5+12=-23. $$

Check: Expanding along row 1 gives \(C_{11}=-9\), \(C_{12}=-7\), and \(C_{13}=5\). Hence \(1(-9)+2(-7)+0(5)=-9-14=-23\), agreeing with the row-2 expansion.

The check illustrates an important point: the cofactor values change when the expansion row changes, but the sum is still the same determinant. The theorem guarantees that equality. When verifying a computation, it is enough to recompute a second expansion correctly; the cofactors from the first expansion cannot simply be carried over.

Computing Along a Chosen Column

Worked Example: Expansion Along the First Column

Compute the determinant of \(\mathbf{B}=\begin{bmatrix}2&1&1\\1&3&2\\4&1&3\end{bmatrix}\) by expanding along column 1.

The entries in column 1 are \(2,1,4\). Their cofactors are found by deleting the corresponding row and column:

$$ \begin{aligned} C_{11} &=(+1)\det\begin{bmatrix}3&2\\1&3\end{bmatrix} =9-2=7,\\ C_{21} &=(-1)\det\begin{bmatrix}1&1\\1&3\end{bmatrix} =-(3-1)=-2,\\ C_{31} &=(+1)\det\begin{bmatrix}1&1\\3&2\end{bmatrix} =2-3=-1. \end{aligned} $$

Therefore the column-1 expansion is

$$ \det\mathbf{B}=2(7)+1(-2)+4(-1)=14-2-4=8. $$

Check: Along row 2, the cofactors are \(C_{21}=-2\), \(C_{22}=2\), and \(C_{23}=2\). The expansion gives \(1(-2)+3(2)+2(2)=-2+6+4=8\).

In both row and column expansions, signs belong to the positions \((i,j)\) of the entries in the original matrix. Deleting a row and column produces a smaller matrix for calculating the minor, but it does not reset the sign pattern. The sign remains \((-1)^{i+j}\) using the original indices.

One Matrix, Two Different Expansions

Worked Example: Comparing a Row and a Column Expansion

For \(\mathbf{D}=\begin{bmatrix}1&0&0&2\\0&1&0&-1\\0&0&1&3\\1&1&1&4\end{bmatrix}\), compute the determinant along row 4 and along column 4.

For the row-4 expansion, calculate the cofactors using the first three rows. The signs in row 4 are \(-,+,-,+\). The corresponding minors are

$$ \begin{aligned} M_{41} &=\det\begin{bmatrix}0&0&2\\1&0&-1\\0&1&3\end{bmatrix}=2, & C_{41}&=-2,\\ M_{42} &=\det\begin{bmatrix}1&0&2\\0&0&-1\\0&1&3\end{bmatrix}=1, & C_{42}&=1,\\ M_{43} &=\det\begin{bmatrix}1&0&2\\0&1&-1\\0&0&3\end{bmatrix}=3, & C_{43}&=-3,\\ M_{44} &=\det\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}=1, & C_{44}&=1. \end{aligned} $$

Since row 4 is \([1,1,1,4]\), its expansion is \((-2)+1+(-3)+4=0\).

For the column-4 expansion, the entries are \(2,-1,3,4\). The corresponding cofactors are \(C_{14}=-1\), \(C_{24}=-1\), \(C_{34}=-1\), and \(C_{44}=1\). For example, the first three minors are \(\det\begin{bmatrix}0&1&0\\0&0&1\\1&1&1\end{bmatrix}=1\), \(\det\begin{bmatrix}1&0&0\\0&0&1\\1&1&1\end{bmatrix}=-1\), and \(\det\begin{bmatrix}1&0&0\\0&1&0\\1&1&1\end{bmatrix}=1\); the signs \(-,+,-\) give the stated cofactors. The last minor is the identity matrix, so \(C_{44}=1\). Thus column 4 gives

$$ 2(-1)+(-1)(-1)+3(-1)+4(1)=-2+1-3+4=0. $$

Check: Both expansions give \(0\). This agreement verifies the arithmetic using two separate sets of cofactors.

Consequences of the Expansion Formula

The cofactor expansion theorem also gives useful conclusions when entries in a row or column are zero. The results below are direct consequences; they do not require a separate determinant method.

Corollary: If row \(i\) has exactly one nonzero entry, \(a_{ik}\), then \(\det\mathbf{A}=a_{ik}C_{ik}\). If column \(j\) has exactly one nonzero entry, \(a_{kj}\), then \(\det\mathbf{A}=a_{kj}C_{kj}\).

Proof. For a row with only \(a_{ik}\) nonzero, expand along row \(i\): \(\det\mathbf{A}=\sum_{r=1}^{n}a_{ir}C_{ir}\). Every term with \(r\ne k\) is zero because \(a_{ir}=0\), leaving \(a_{ik}C_{ik}\). For a column with only \(a_{kj}\) nonzero, expand along column \(j\): \(\det\mathbf{A}=\sum_{r=1}^{n}a_{rj}C_{rj}\). Every term with \(r\ne k\) vanishes, leaving \(a_{kj}C_{kj}\). \(\square\)

Corollary: If a square matrix has a row or column consisting entirely of zeros, its determinant is zero.

Proof. If row \(i\) is zero, every entry \(a_{ik}\) in its cofactor expansion is zero, so \(\det\mathbf{A}=\sum_{k=1}^{n}0\cdot C_{ik}=0\). If column \(j\) is zero, its expansion gives \(\det\mathbf{A}=\sum_{k=1}^{n}0\cdot C_{kj}=0\). Thus either a zero row or a zero column forces the determinant to be zero. \(\square\)

These consequences explain why the expansion formula remains useful even when some entries vanish: zero terms contribute nothing, while each nonzero entry still requires its own cofactor. If a row or column has just one nonzero entry, the determinant reduces to that entry times one signed minor.

Common Sign and Indexing Pitfalls

Omitting the checkerboard sign gives a wrong cofactor. In the first worked example, the minor for \(a_{21}=3\) is \(\det\begin{bmatrix}2&0\\1&5\end{bmatrix}=10\). A wrong calculation sets \(C_{21}=10\), giving the row-2 contribution \(3(10)=30\). But \(2+1\) is odd, so \(C_{21}=(-1)^3(10)=-10\), and the correct contribution is \(3(-10)=-30\). The sign is part of the cofactor, even when the minor itself is positive.

Do not mix cofactors from different expansions. In the \(4\times4\) example, the row-4 cofactors are \((-2,1,-3,1)\), while the column-4 cofactors are \((-1,-1,-1,1)\). The row-4 entries must be paired with the first list; the column-4 entries must be paired with the second. Pairing entries from one row with cofactors from a different column does not follow the expansion formula.

Delete both the specified row and column. To calculate \(M_{ij}\), remove row \(i\) and column \(j\), then take the determinant of what remains. Removing only one of them produces a matrix of the wrong size and is not the required minor.

For every expansion, a reliable sequence is: fix the row or column; record its entries; calculate each minor by deleting the corresponding row and column; apply \((-1)^{i+j}\); then sum the entry-cofactor products. This keeps the indices, signs, and arithmetic separate enough to check.

Check Your Understanding

For each calculation, write down the expansion indices and verify the signs before evaluating the sum.

  1. For \(\begin{bmatrix}2&1&0\\1&-1&3\\4&2&1\end{bmatrix}\), compute the determinant by expanding along row 2.
  2. For the same matrix, compute the determinant by expanding along column 3, and compare the two results.
  3. In a \(4\times4\) matrix, what sign does the cofactor \(C_{32}\) have? Explain using \((-1)^{i+j}\).
  4. Suppose row 2 of a \(3\times3\) matrix is \([0,5,0]\). State the determinant in terms of \(C_{22}\).
  5. Explain why a matrix with a zero column must have determinant zero, using a column cofactor expansion.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon