Tutorials › Linear Algebra › Choosing a Sparse Row or Column

Determinants by Cofactor Expansion · Tutorial 220 of 1000

Choosing a Sparse Row or Column

Use sparsity to plan cofactor expansions, then evaluate and check the smaller determinants carefully.

Beginner 10 min read

What You'll Learn

  • Choose a row or column with few nonzero entries before expanding
  • Use the cofactor sign from the entry’s position in the current matrix
  • Reduce an expansion with one nonzero entry to a single minor
  • Recognize when an entire zero row or column makes the determinant zero
  • Compute and check minors at successive stages

Choose Where to Expand Before You Calculate

Cofactor expansion can turn a determinant into a sum of smaller determinants, but the amount of work depends on where the expansion begins. If a row contains several zeros, those entries contribute no terms. Choosing a row or column with few nonzero entries therefore often reduces the number of minors that need to be evaluated. The choice is a practical strategy, not a change to the determinant: expansion along any row or column gives the same value.

For an \(n\times n\) matrix \(\mathbf{A}=[a_{ij}]\), the minor \(M_{ij}\) is the determinant of the matrix formed by deleting row \(i\) and column \(j\). The cofactor at position \((i,j)\) is \(C_{ij}=(-1)^{i+j}M_{ij}\). The cofactor expansion theorem states that expansion along row \(i\) or column \(j\) gives

$$ \det\mathbf{A}=\sum_{j=1}^{n}a_{ij}(-1)^{i+j}M_{ij} \qquad\text{or}\qquad \det\mathbf{A}=\sum_{i=1}^{n}a_{ij}(-1)^{i+j}M_{ij}. $$

In each formula, the row or column being expanded is fixed, and the sum runs over the other index. This theorem applies to every square matrix. When an entry is zero, its entire term is zero, so its minor need not be calculated. The sign still comes from the entry’s position \((i,j)\) in the matrix currently being expanded.

Strategy: Scan the rows and columns, count their nonzero entries, and usually expand along one with the smallest count. Then calculate only the minors attached to nonzero entries. If a resulting minor also has a sparse row or column, use that structure in the next expansion.

What Sparsity Guarantees

Two immediate consequences make sparse expansion especially useful. A completely zero row or column forces the determinant to be zero. A row or column with exactly one nonzero entry reduces the determinant to one signed entry times one smaller determinant. Both statements follow directly from the expansion formula.

Theorem (Zero row or column): If a square matrix has a row or a column consisting entirely of zeros, then its determinant is zero.

Proof. Expand along the zero row, or along the zero column. Every term in the corresponding cofactor expansion contains an entry from that row or column as a factor. Each such entry is zero, so every term is zero and their sum is zero. \(\square\)

Theorem (One nonzero entry): Suppose row \(i\) of a square matrix has exactly one nonzero entry, \(a_{ik}\). Then \(\det\mathbf{A}=a_{ik}(-1)^{i+k}M_{ik}\). The same formula holds if column \(k\) has exactly one nonzero entry, \(a_{ik}\).

Proof. Expand along row \(i\). Every term except the one indexed by \(k\) contains a zero entry, so those terms vanish. The remaining term is \(a_{ik}(-1)^{i+k}M_{ik}\). If column \(k\) has exactly one nonzero entry, expansion along that column likewise has only the term indexed by \(i\) left. \(\square\)

Counting nonzero entries is a reliable way to reduce the number of terms at the next step: if the chosen row or column has \(r\) nonzero entries, its expansion has exactly \(r\) potentially nonzero terms. This count does not, by itself, determine the total work. The resulting minors can have different patterns of zeros, so it is useful to inspect the minors as well as the original matrix.

Worked Examples: Following the Sparse Entries

Worked Example: A Row with One Nonzero Entry

Compute the determinant by choosing a sparse row.

$$ \mathbf{A}= \begin{bmatrix} 1&0&0&2\\ 0&3&0&0\\ 2&1&1&0\\ 1&0&4&1 \end{bmatrix}. $$

Row 2 has just one nonzero entry, \(a_{22}=3\). Its cofactor sign is \((-1)^{2+2}=1\). Deleting row 2 and column 2 leaves

$$ M_{22}= \det\begin{bmatrix} 1&0&2\\ 2&1&0\\ 1&4&1 \end{bmatrix}. $$

In this minor, expand along row 1, which also has one zero. The signs in this \(3\times3\) matrix are positive, negative, positive across row 1:

$$ \begin{aligned} M_{22} &=1\det\begin{bmatrix}1&0\\4&1\end{bmatrix} +2\det\begin{bmatrix}2&1\\1&4\end{bmatrix}\\ &=1(1\cdot1-0\cdot4)+2(2\cdot4-1\cdot1)\\ &=1+2(7)=15. \end{aligned} $$

Therefore \(\det\mathbf{A}=3M_{22}=3(15)=45\). The sign is positive because the original nonzero entry was at \((2,2)\).

Check: Re-expanding the \(3\times3\) minor along its first row gives \(1+14=15\), as calculated. The original row-2 expansion has no other nonzero terms, so it gives \(3(15)=45\).

Worked Example: A Sparse Column and a Second Check

Use a column with one nonzero entry to compute

$$ \mathbf{B}= \begin{bmatrix} 2&1&0&0\\ 1&0&3&0\\ 0&4&1&0\\ 1&2&0&5 \end{bmatrix}. $$

Column 4 has only one nonzero entry, \(b_{44}=5\), whose cofactor sign is \((-1)^{4+4}=1\). Deleting row 4 and column 4 gives

$$ \begin{aligned} M_{44} &=\det\begin{bmatrix}2&1&0\\1&0&3\\0&4&1\end{bmatrix}\\ &=2\det\begin{bmatrix}0&3\\4&1\end{bmatrix} -1\det\begin{bmatrix}1&3\\0&1\end{bmatrix}\\ &=2(0\cdot1-3\cdot4)-(1\cdot1-3\cdot0)\\ &=2(-12)-1=-25. \end{aligned} $$

Thus \(\det\mathbf{B}=5(-25)=-125\).

Check: Expand \(\mathbf{B}\) along row 1, which has two nonzero entries. The first minor is

$$ \begin{aligned} M_{11} &=\det\begin{bmatrix}0&3&0\\4&1&0\\2&0&5\end{bmatrix}\\ &=5\det\begin{bmatrix}0&3\\4&1\end{bmatrix} =5(-12)=-60. \end{aligned} $$

The second minor is

$$ \begin{aligned} M_{12} &=\det\begin{bmatrix}1&3&0\\0&1&0\\1&0&5\end{bmatrix}\\ &=1\det\begin{bmatrix}1&0\\1&5\end{bmatrix} =1(5)=5. \end{aligned} $$

Since the entry \(b_{12}=1\) has negative cofactor sign, expansion along row 1 gives \(2M_{11}-M_{12}=2(-60)-5=-125\), agreeing with the column expansion.

Worked Example: Compare the Available Choices

For this matrix, row 2 is the sparsest row, but an independent expansion along row 1 provides a useful check.

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

Expanding along row 2 leaves only \(c_{24}=3\). Its sign is \((-1)^{2+4}=1\), and deleting row 2 and column 4 gives

$$ \begin{aligned} M_{24} &=\det\begin{bmatrix}1&0&2\\4&1&0\\0&2&5\end{bmatrix}\\ &=1\det\begin{bmatrix}1&0\\2&5\end{bmatrix} +2\det\begin{bmatrix}4&1\\0&2\end{bmatrix}\\ &=1(5)+2(8)=21. \end{aligned} $$

Consequently, \(\det\mathbf{C}=3(21)=63\).

Check: Row 1 has two nonzero entries, so its expansion has two terms. The corresponding minors are

$$ \begin{aligned} M_{11} &=\det\begin{bmatrix}0&0&3\\1&0&0\\2&5&1\end{bmatrix} =3\det\begin{bmatrix}1&0\\2&5\end{bmatrix}=15,\\ M_{13} &=\det\begin{bmatrix}0&0&3\\4&1&0\\0&2&1\end{bmatrix} =3\det\begin{bmatrix}4&1\\0&2\end{bmatrix}=24. \end{aligned} $$

Both entries in row 1 have positive signs: their positions are \((1,1)\) and \((1,3)\). Thus this expansion gives \(1(15)+2(24)=15+48=63\), which confirms the result.

Signs and the Size of Each Minor

A sparse choice saves work only if the signs and the minors are handled correctly. The sign belongs to the position of an entry in the matrix at the moment of expansion. After deleting a row and a column, a smaller matrix has its own row and column positions. If expanding a minor, use those new positions to determine its cofactor signs.

The minor \(M_{ij}\) is formed by deleting row \(i\) and column \(j\); it is not formed by deleting the row and column containing zeros, unless those are the indices of the particular cofactor being calculated. Keep the selected nonzero entry and its indices visible while constructing the minor. This helps prevent both sign mistakes and deletion of the wrong row or column.

For a \(2\times2\) matrix, the determinant used at the end of an expansion is \(ad-bc\):

$$ \det\begin{bmatrix}a&b\\c&d\end{bmatrix}=ad-bc. $$

For a larger minor, apply cofactor expansion again or use the \(3\times3\) computation rule already established for determinants. The sparse strategy is recursive: at each stage, choose a row or column with few nonzero entries in the current minor, rather than relying only on the pattern of the original matrix.

Common Mistake: Using the Wrong Cofactor Sign

In the third example, the sole nonzero entry in row 2 is at position \((2,4)\). A common error is to assign it a negative sign and write \(\det\mathbf{C}=-3(21)=-63\). The correction is to calculate the exponent: \(2+4=6\), so \((-1)^{2+4}=(-1)^6=1\). The correct expansion is \(\det\mathbf{C}=3(21)=63\).

Do not decide a sign from the value of an entry or from the appearance of the matrix. Use \((-1)^{i+j}\) for the entry’s current position. Also, zeros only remove terms: they do not change the sign pattern of the remaining cofactors.

In practice, sparse expansion is most valuable when it reduces a large determinant to a small number of manageable minors. It is a choice of route through the calculation, not a separate determinant rule. The cofactor expansion theorem licenses the route; counting nonzero entries helps choose it; careful index tracking ensures that the final value is correct.

Check Your Understanding

For each question, identify the expansion row or column and track the signs using the entry positions.

  1. What does the cofactor expansion theorem imply if a square matrix has an entirely zero column?
  2. A \(4\times4\) matrix has exactly one nonzero entry in row 3, at column 1. What sign multiplies that entry’s minor?
  3. For \(\begin{bmatrix}1&0&2\\0&3&0\\4&1&1\end{bmatrix}\), expand along row 2 and compute the determinant.
  4. Why does choosing a row with the fewest nonzero entries reduce the number of potentially nonzero terms?
  5. When you expand a minor formed by deleting a row and column, which positions determine the signs in that next 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