The QR Factorization and the Determinant#
This is an elegant and useful theoretical result that connects QR factorization to another fundamental matrix property.
Theorem 19 (Determinant via QR Factorization)
For any square matrix \(A \in \mathbb{R}^{n \times n}\), if \(A=QR\) is its QR decomposition, then:
Proof. Sketch of proof:
Start with the property \(\det(AB) = \det(A)\det(B)\).
\(\det(A) = \det(QR) = \det(Q)\det(R)\).
Since \(Q\) is an orthogonal matrix, its determinant is always \(\det(Q) = \pm 1\). Therefore, \(|\det(A)| = |\det(R)|\).
Since \(R\) is an upper triangular matrix, its determinant is simply the product of its diagonal entries, \(\det(R) = \prod_{i=1}^{n} r_{ii}\).
Combining these gives the result.
Important
Why it’s important: This provides a very numerically stable way to compute the determinant of a matrix. The standard cofactor expansion is computationally infeasible for large matrices, and using LU factorization can suffer from overflow/underflow issues. The QR approach avoids these problems.