Tutorials › Linear Algebra › A Recurrence for Tridiagonal Determinants

Determinants by Cofactor Expansion · Tutorial 226 of 1000

A Recurrence for Tridiagonal Determinants

Learn how cofactor expansion reduces a tridiagonal determinant to two smaller determinants, then use the recurrence to calculate and check examples.

Beginner 9 min read

What You'll Learn

  • Identify the diagonal, superdiagonal, and subdiagonal entries of a tridiagonal matrix.
  • Define the leading determinants and their initial values.
  • Derive the recurrence, including its minus sign and neighboring-entry product.
  • Compute determinants of different sizes using only the two preceding values.
  • Check recurrence calculations by direct cofactor expansion.
  • Recognize why the method depends on the tridiagonal zero pattern.

Why a Recurrence Helps

A determinant can be expanded into smaller determinants by cofactor expansion. For a matrix with many zero entries, this can be efficient, but repeatedly expanding large determinants still creates a growing collection of calculations. A tridiagonal matrix has a particularly regular pattern: nonzero entries can occur only on the main diagonal and the diagonals immediately above and below it. Expanding in a boundary row or column therefore relates its determinant to just two smaller determinants.

We work over \(\mathbb{R}\). For an \(n\times n\) tridiagonal matrix, write \(a_i\) for the entry on the main diagonal in row \(i\), \(b_i\) for the entry just above the main diagonal in row \(i\), and \(c_i\) for the entry just below the main diagonal in row \(i+1\). The entries \(b_i\) and \(c_i\) need not be equal.

$$ \mathbf{T}_n= \begin{bmatrix} a_1&b_1&0&\cdots&0\\ c_1&a_2&b_2&\ddots&\vdots\\ 0&c_2&a_3&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&b_{n-1}\\ 0&\cdots&0&c_{n-1}&a_n \end{bmatrix}. $$

For each \(k\) from \(1\) to \(n\), let \(D_k\) be the determinant of the leading \(k\times k\) submatrix of \(\mathbf{T}_n\). In other words, this submatrix uses rows \(1,\dots,k\) and columns \(1,\dots,k\). We also set \(D_0=1\), the convention that the determinant of the empty matrix is \(1\). This value makes the recurrence work at \(k=2\).

Theorem (Tridiagonal determinant recurrence): For the leading determinants of \(\mathbf{T}_n\), \(D_0=1\), \(D_1=a_1\), and for \(k=2,\dots,n\), $$ D_k=a_kD_{k-1}-b_{k-1}c_{k-1}D_{k-2}. $$

Deriving the Recurrence

The minus sign comes from the cofactor sign, while the product \(b_{k-1}c_{k-1}\) comes from the two entries adjacent to the last diagonal entry. To derive the formula, consider the leading \(k\times k\) submatrix and expand its determinant along its last row. The only entries in that row that may be nonzero are \(c_{k-1}\) in column \(k-1\) and \(a_k\) in column \(k\).

Proof. The contribution from \(a_k\), at position \((k,k)\), is \(a_k\) times its cofactor. Its cofactor sign is \((-1)^{k+k}=1\), and the minor is the leading \((k-1)\times(k-1)\) submatrix. This contribution is therefore \(a_kD_{k-1}\).

The contribution from \(c_{k-1}\), at position \((k,k-1)\), has cofactor sign \((-1)^{k+(k-1)}=-1\). In its minor, row \(k\) and column \(k-1\) have been removed. The remaining last column is the original column \(k\). It has just one possibly nonzero entry, \(b_{k-1}\), in the last row of that minor. Expanding the minor along this column gives \(b_{k-1}D_{k-2}\): the entry is in the last row and last column of the minor, so its cofactor sign is positive, and the resulting matrix is the leading \((k-2)\times(k-2)\) submatrix. The contribution from \(c_{k-1}\) is consequently \(-c_{k-1}b_{k-1}D_{k-2}\). Adding the two contributions gives the stated recurrence. When \(k=2\), the resulting smaller determinant is \(D_0=1\), as defined. Finally, the leading \(1\times1\) determinant is \(D_1=a_1\). \(\square\)

This derivation also explains why both adjacent entries appear. The off-diagonal entry \(c_{k-1}\) is the entry used in the first expansion; the cofactor minor contributes the other entry \(b_{k-1}\). If either entry is zero, their product is zero and the second term vanishes.

Using the Recurrence in Order

Once the entries of the matrix are known, calculate \(D_0\) and \(D_1\), then use the recurrence for \(D_2,D_3,\dots\) in sequence. At each stage, only the two preceding determinants are needed. The following process is valid because the theorem derives each \(D_k\) from determinants of smaller leading submatrices; it is not a shortcut based on a guess about the answer.

1
Set the starting values.
Use \(D_0=1\) and \(D_1=a_1\).
2
Build each next determinant.
For \(k=2,\dots,n\), calculate \(a_kD_{k-1}-b_{k-1}c_{k-1}D_{k-2}\).
3
Read off the requested size.
The determinant of the full matrix is \(D_n\); the preceding values are determinants of its leading submatrices.

Worked Example: A Four-by-Four Matrix with Unequal Adjacent Entries

Calculate the determinant of

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

Here the diagonal entries are \(2,3,4,5\), and the adjacent pairs \((b_1,c_1),(b_2,c_2),(b_3,c_3)\) are \((1,3),(2,1),(1,2)\). Start with \(D_0=1\) and \(D_1=2\). Then

$$ \begin{aligned} D_2&=3D_1-(1)(3)D_0=3(2)-3(1)=3,\\ D_3&=4D_2-(2)(1)D_1=4(3)-2(2)=8,\\ D_4&=5D_3-(1)(2)D_2=5(8)-2(3)=34. \end{aligned} $$

Thus \(\det\mathbf{T}_4=D_4=34\). As a check independent of the sequence of leading determinants, expand the original matrix along its first row. The minor for the entry \(2\) has determinant \(44\), and the minor for the entry \(1\) has determinant \(54\):

$$ \begin{aligned} \det\begin{bmatrix}3&2&0\\1&4&1\\0&2&5\end{bmatrix} &=3(20-2)-2(5-0)=44,\\ \det\begin{bmatrix}3&2&0\\0&4&1\\0&2&5\end{bmatrix} &=3(20-2)=54. \end{aligned} $$

The first-row cofactor signs are positive and negative, respectively, so the full determinant is \(2(44)-1(54)=88-54=34\), confirming the recurrence calculation.

Worked Example: A Family with Constant Entries

Consider the \(n\times n\) tridiagonal matrix whose diagonal entries are all \(2\), and whose entries immediately above and below the diagonal are all \(-1\). Its leading determinants satisfy

$$ D_0=1,\qquad D_1=2,\qquad D_k=2D_{k-1}-D_{k-2}\quad (k\ge2), $$

because \((-1)(-1)=1\). The first values are \(D_2=2(2)-1=3\), \(D_3=2(3)-2=4\), \(D_4=2(4)-3=5\), and \(D_5=2(5)-4=6\). Thus the determinant of the \(5\times5\) matrix in this family is \(6\).

Check: the recurrence applied at the final step gives \(D_5=2D_4-D_3=2(5)-4=6\). The pattern can also be verified directly as a formula: for every \(k\ge0\), \(D_k=k+1\). The starting values give \(D_0=1=0+1\) and \(D_1=2=1+1\). If \(D_{k-1}=k\) and \(D_{k-2}=k-1\), then \(D_k=2k-(k-1)=k+1\). Induction proves the formula, and at \(k=5\) it again gives \(D_5=6\).

Proposition: For the tridiagonal family with diagonal entries \(2\) and both adjacent diagonals equal to \(-1\), the determinant of the \(n\times n\) matrix is \(n+1\) for every integer \(n\ge0\).

Proof. The case \(n=0\) follows from the convention \(D_0=1\), and the case \(n=1\) follows from \(D_1=2\). Suppose \(n\ge2\) and the formula holds for the two preceding indices, so \(D_{n-1}=n\) and \(D_{n-2}=n-1\). The recurrence gives \(D_n=2n-(n-1)=n+1\). Therefore the formula holds for all \(n\ge0\) by induction. \(\square\)

Worked Example: Checking a Three-by-Three Determinant

Use the recurrence to calculate

$$ \det\begin{bmatrix} 1&2&0\\ 3&4&1\\ 0&5&2 \end{bmatrix}. $$

Here \(D_0=1\), \(D_1=1\), and the entries are \(a_2=4\), \(a_3=2\), \(b_1=2\), \(c_1=3\), \(b_2=1\), \(c_2=5\). Thus

$$ \begin{aligned} D_2&=4(1)-(2)(3)(1)=-2,\\ D_3&=2(-2)-(1)(5)(1)=-9. \end{aligned} $$

So the determinant is \(-9\). To check, expand along the first row. The first minor has determinant \(4(2)-1(5)=3\); the second minor has determinant \(3(2)-1(0)=6\). The cofactor expansion is \(1(3)-2(6)=-9\), as required.

Scope and a Common Sign Error

The recurrence applies to tridiagonal matrices because the last row has at most two nonzero entries, and the minor from the off-diagonal entry has a last column with at most one nonzero entry. A matrix with other nonzero entries outside these three diagonals does not, in general, obey this same two-term recurrence. Before using the formula, check the zero pattern and identify \(b_{k-1}\) and \(c_{k-1}\) from the same adjacent pair.

Common mistake: changing the cofactor minus sign. For the \(2\times2\) matrix \(\begin{bmatrix}2&1\\3&4\end{bmatrix}\), an incorrect use of a plus sign would give \(D_2=4(2)+(1)(3)(1)=11\). But the entry \(3\) in position \((2,1)\) has cofactor sign \((-1)^{2+1}=-1\). The correct calculation is \(D_2=4(2)-(1)(3)(1)=5\). Direct cofactor expansion confirms \(2(4)-1(3)=8-3=5\). The sign does not depend on whether the entries themselves are positive or negative; it comes from the cofactor position.

It is also important not to replace the adjacent-entry product by a square unless the entries are known to be equal. In the first example, the pair at the second step was \(b_2=2\) and \(c_2=1\), so the recurrence used \(2\cdot1\), not \(2^2\). Keeping the two entries separately makes the recurrence valid for both symmetric and nonsymmetric tridiagonal matrices.

Check Your Understanding

Use cofactor signs and the leading determinants to justify each answer.

  1. For a tridiagonal matrix with \(D_0=1\), \(D_1=3\), \(a_2=4\), \(b_1=2\), and \(c_1=5\), calculate \(D_2\).
  2. Write the recurrence for \(D_3\) using \(a_3,b_2,c_2,D_2,D_1\).
  3. For the family with diagonal entries \(2\) and adjacent entries \(-1\), calculate \(D_4\) from the recurrence.
  4. In the recurrence, which cofactor position produces the minus sign?
  5. Explain why a nonzero entry two places above the main diagonal prevents using this tridiagonal recurrence without further justification.

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