Why the Diagonal Entries Determine the Result
A triangular matrix can contain many nonzero entries, but its zeros are arranged so that recursive cofactor expansion repeatedly reduces the determinant to a smaller triangular determinant. At each stage, the chosen row or column has just one potentially nonzero entry. The corresponding cofactor contributes that entry times the determinant of a minor, and the minor retains the triangular pattern. This is why the determinant depends only on the diagonal entries, even when entries away from the diagonal are not zero.
Throughout, matrices are square matrices over \(\mathbb{R}\). For a matrix \(\mathbf{A}=[a_{ij}]\) of size \(n\times n\), the entry \(a_{ij}\) is in row \(i\), column \(j\). A matrix is upper triangular when \(a_{ij}=0\) whenever \(i>j\), so entries below the main diagonal are zero. It is lower triangular when \(a_{ij}=0\) whenever \(i<j\), so entries above the main diagonal are zero. A diagonal matrix satisfies both conditions.
The proof uses the recursive cofactor expansion. If \(\mathbf{A}_{ij}\) denotes the matrix obtained by deleting row \(i\) and column \(j\) from \(\mathbf{A}\), then the cofactor is \(C_{ij}=(-1)^{i+j}\det(\mathbf{A}_{ij})\). Expanding along row \(i\) gives \(\det(\mathbf{A})=\sum_{j=1}^{n}a_{ij}C_{ij}\); expanding along column \(j\) gives \(\det(\mathbf{A})=\sum_{i=1}^{n}a_{ij}C_{ij}\). The determinant of a \(1\times1\) matrix \([a_{11}]\) is \(a_{11}\). These recursive formulas are the tools needed below.
The Recursive Proof
Proof. We prove the statement for all sizes by induction on \(n\), treating the upper- and lower-triangular cases separately. When \(n=1\), the matrix is \([a_{11}]\), and its determinant is \(a_{11}\), which is the product of its diagonal entries.
Now let \(n\ge 2\), and assume the formula holds for triangular matrices of size \(n-1\). First suppose that \(\mathbf{A}\) is upper triangular. In its first column, \(a_{i1}=0\) for every \(i>1\), by the definition of upper triangular. Expanding along that column therefore leaves only the term from row 1:
The sign is positive because \(1+1\) is even. The minor \(\mathbf{A}_{11}\) is obtained by deleting the first row and first column. Its entry in row \(i\), column \(j\) is \(a_{i+1,j+1}\). If \(i>j\), then \(i+1>j+1\), so \(a_{i+1,j+1}=0\); thus \(\mathbf{A}_{11}\) is upper triangular. By the induction hypothesis, its determinant is \(a_{22}a_{33}\cdots a_{nn}\). Hence \[ \det(\mathbf{A})=a_{11}(a_{22}a_{33}\cdots a_{nn}) =a_{11}a_{22}\cdots a_{nn}. \]
Now suppose instead that \(\mathbf{A}\) is lower triangular. In its last column, \(a_{in}=0\) for every \(i<n\), because \(i<n\). Expanding along column \(n\) leaves only the term from row \(n\):
The sign is positive because \(n+n\) is even. The minor \(\mathbf{A}_{nn}\), obtained by deleting the last row and last column, is lower triangular: its entries are the corresponding entries \(a_{ij}\) for \(1\le i,j\le n-1\), and every entry with \(i<j\) is zero. By the induction hypothesis, its determinant is \(a_{11}a_{22}\cdots a_{n-1,n-1}\). Therefore \[ \det(\mathbf{A})=a_{nn}(a_{11}a_{22}\cdots a_{n-1,n-1}) =a_{11}a_{22}\cdots a_{nn}, \] where the last equality uses commutativity of multiplication in \(\mathbb{R}\). Both cases hold at size \(n\), completing the induction. \(\square\)
The proof depends on more than the fact that many entries are zero. The zeros must leave a row or column with only one potentially nonzero entry, and the selected minor must remain triangular so the induction hypothesis applies. For an upper-triangular matrix, the first column has this property; for a lower-triangular matrix, the last column does. The cofactor signs are positive in both choices, so no minus sign enters the recurrence.
Seeing the Recursion in Examples
Worked Example: An Upper-Triangular Matrix
Find the determinant of \(\mathbf{A}=\begin{bmatrix}2&-1&4\\0&3&5\\0&0&-2\end{bmatrix}\) using cofactor expansion, and compare it with the diagonal product.
Expand along the first column. Its last two entries are zero, and the cofactor sign at position \((1,1)\) is positive. Deleting row 1 and column 1 leaves \(\begin{bmatrix}3&5\\0&-2\end{bmatrix}\):
The diagonal product is \(2\cdot3\cdot(-2)=-12\), agreeing with the expansion. In the \(2\times2\) minor, the upper-right entry \(5\) does not affect the determinant: its cofactor contribution is \(-5(0)=0\).
Worked Example: A Lower-Triangular Matrix
Find the determinant of \(\mathbf{B}=\begin{bmatrix}-1&0&0\\4&2&0\\3&-5&4\end{bmatrix}\) by expanding along its last column.
The first two entries in the last column are zero. The remaining entry is \(4\) in position \((3,3)\), whose cofactor sign is \((-1)^{3+3}=1\). The corresponding minor is lower triangular:
The diagonal product is \((-1)\cdot2\cdot4=-8\). Both the recursive computation and the theorem give the same value.
Worked Example: A Zero on the Diagonal
Consider the upper-triangular matrix \(\mathbf{C}=\begin{bmatrix}1&2&-3&4\\0&0&5&6\\0&0&7&8\\0&0&0&2\end{bmatrix}\). Use the recursive expansion to find its determinant and identify which diagonal entry causes the result.
Expand along the first column. Its only nonzero entry is \(1\) in position \((1,1)\), so the determinant equals that of the \(3\times3\) minor:
The first column of this minor consists entirely of zeros. Expanding along that column gives \[ \det\begin{bmatrix}0&5&6\\0&7&8\\0&0&2\end{bmatrix} =0\det\begin{bmatrix}7&8\\0&2\end{bmatrix} +0\left((-1)^{2+1}\det\begin{bmatrix}5&6\\0&2\end{bmatrix}\right) +0\det\begin{bmatrix}5&6\\7&8\end{bmatrix} =0. \] Thus \(\det(\mathbf{C})=1\cdot0=0\). The diagonal product is \(1\cdot0\cdot7\cdot2=0\), as the theorem predicts. The off-diagonal entries \(5,6,7,8\) do not change the conclusion: the zero diagonal entry forces the product, and hence the determinant, to be zero.
What the Formula Says About Zero Determinants
Proof. By the theorem, \(\det(\mathbf{A})=a_{11}a_{22}\cdots a_{nn}\). If some diagonal entry \(a_{kk}\) is zero, the product contains a zero factor, so \(\det(\mathbf{A})=0\). In the other direction, suppose every diagonal entry is nonzero. A product of finitely many nonzero real numbers is nonzero, since \(\mathbb{R}\) has no zero divisors. Therefore \(\det(\mathbf{A})\ne0\). These two implications prove the equivalence. \(\square\)
This corollary is about triangular matrices: its hypothesis matters. The diagonal entries alone do not determine the determinant of an arbitrary square matrix. Triangular structure is what makes the recursive argument collapse to a single surviving cofactor at each stage.
Common Pitfall: Checking the Triangular Condition
A common error is to use the diagonal-product formula when a matrix only looks partly triangular. For example, the matrix \(\begin{bmatrix}1&2&0\\3&4&0\\0&0&5\end{bmatrix}\) is not upper triangular, because its entry in row 2, column 1 is \(3\ne0\). Treating it as upper triangular gives the incorrect calculation \(\det(\mathbf{A})=1\cdot4\cdot5=20\).
Expanding correctly along the first row instead gives \[ \begin{aligned} \det(\mathbf{A}) &=1\det\begin{bmatrix}4&0\\0&5\end{bmatrix} -2\det\begin{bmatrix}3&0\\0&5\end{bmatrix} +0\det\begin{bmatrix}3&4\\0&0\end{bmatrix}\\ &=1(20)-2(15)+0\\ &=-10. \end{aligned} \] The correction is to check the required zeros before applying the theorem. For an upper-triangular matrix, every entry below the diagonal must be zero; for a lower-triangular matrix, every entry above it must be zero.
For a genuine triangular matrix, the formula is useful because it replaces a recursive determinant calculation with a product of \(n\) entries. The proof explains why that shortcut is valid: cofactor expansion isolates a diagonal entry, and the remaining minor has the same triangular structure at one smaller size. The formula also gives a direct way to detect a zero determinant in this setting: a zero diagonal entry makes the entire product zero, while nonzero diagonal entries make the product nonzero.
Check Your Understanding
For each question, identify the triangular condition or cofactor step that justifies your answer.
- State which entries must be zero for a \(4\times4\) matrix to be lower triangular.
- For an upper-triangular \(3\times3\) matrix, which column is used in the induction proof, and why is its surviving cofactor sign positive?
- Explain why deleting the first row and first column of an upper-triangular matrix leaves an upper-triangular minor.
- Find the determinant of \(\begin{bmatrix}3&-2\\0&-4\end{bmatrix}\) and verify it using the diagonal product.
- A lower-triangular matrix has diagonal entries \(2,0,-5\). What is its determinant, and which result justifies the answer?