Part III: Decompositions | Chapter 3

Matrix Decompositions

LU, QR, Cholesky, and Schur: the computational workhorses of numerical linear algebra

Historical Context

Matrix decompositions form the backbone of computational linear algebra. Gaussian elimination (formalized as LU decomposition) dates to ancient Chinese mathematics but was systematized by Gauss for least squares. André-Louis Cholesky developed his decomposition for geodetic survey computations during World War I. Householder (1958) and Givens introduced numerically stable QR algorithms, while Issai Schur's triangularization theorem (1909) provided the theoretical foundation for modern eigenvalue algorithms.

3.1 LU Decomposition

Theorem: LU Factorization

For $A \in \mathbb{R}^{n \times n}$, there exist a permutation matrix $P$, unit lower triangular $L$, and upper triangular $U$ such that $PA = LU$. Without pivoting ($P = I$), the factorization exists when all leading principal minors are nonzero.

The LU decomposition costs $\frac{2}{3}n^3$ flops and enables solving $Ax = b$ in$O(n^2)$ via forward and back substitution. Partial pivoting (row exchanges) ensures numerical stability; complete pivoting additionally permutes columns but is rarely needed in practice.

3.2 QR Decomposition

Theorem: QR Factorization

Every $A \in \mathbb{R}^{m \times n}$ ($m \geq n$) with full column rank has a unique factorization $A = QR$ where $Q \in \mathbb{R}^{m \times n}$ has orthonormal columns and $R \in \mathbb{R}^{n \times n}$ is upper triangular with positive diagonal entries.

Three methods compute the QR decomposition:

  • Gram-Schmidt: Conceptually simple, $O(mn^2)$, but can lose orthogonality
  • Householder reflections: $O(2mn^2 - \frac{2}{3}n^3)$, excellent stability, the standard method
  • Givens rotations: Best for sparse matrices, zeroes one element at a time

3.3 Cholesky Decomposition

Theorem: Cholesky Factorization

If $A$ is symmetric positive definite, then there exists a unique lower triangular $L$with positive diagonal entries such that $A = LL^T$. The computation requires only$\frac{1}{3}n^3$ flops—half of LU.

Cholesky is the method of choice for solving symmetric positive definite systems (covariance matrices, normal equations, finite element stiffness matrices). It is also a convenient test for positive definiteness: the factorization exists if and only if the matrix is SPD.

3.4 Schur Decomposition

Theorem (Schur)

Every $A \in \mathbb{C}^{n \times n}$ can be written as $A = UTU^*$ where $U$ is unitary and $T$ is upper triangular with eigenvalues on the diagonal. For real matrices, the real Schur form uses an orthogonal $Q$ and quasi-upper-triangular $T$ (with $1 \times 1$ and $2 \times 2$ diagonal blocks).

The Schur decomposition is the numerically stable alternative to the Jordan form. The implicit QR algorithm computes it in $O(n^3)$ operations and is the basis of all practical eigenvalue computations. Unlike the Jordan form, the Schur form is stable under perturbation—a crucial property for floating-point arithmetic.

3.5 Selection Guide

DecompositionRequirementsCostBest For
LUSquare, nonsingular$\frac{2}{3}n^3$General linear systems
QRAny shape$2mn^2$Least squares, eigenvalues
CholeskySPD$\frac{1}{3}n^3$SPD systems, sampling
SchurSquare$O(n^3)$Eigenvalues, matrix functions
SVDAny shape$O(mn^2)$Rank, pseudoinverse, PCA

Computational Laboratory

This simulation computes LU, QR, Cholesky, and Schur decompositions, verifies each factorization, compares performance, and visualizes the sparsity patterns of the resulting factors.

Matrix Decompositions: LU, QR, Cholesky, Schur

Python
matrix_decompositions.py112 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

Rate this chapter: