Pivoted LU decomposition 2026-10-14
We fix the convention : the permutation matrix acts on the rows of , and the same row ordering must be applied to before the Triangular solves for LU decomposition. Equivalently, , since . LAPACK documents its factors as instead, so check the defining equation rather than just the letter .[ref] Partial pivoting selects the largest absolute candidate in the current column, among rows , before forming elimination multipliers.[ref]
A zero first pivot element does not imply a singular matrix. For example,
Unpivoted Gaussian elimination would divide by zero. Indeed, no with a unit lower triangular matrix exists: would force , contradicting . One row interchange resolves the obstruction. For , use ; back substitution then gives . Using the original with these factors would solve a different linear system.
Partial pivoting bounds each elimination multiplier by one in absolute value in exact arithmetic. This helps control roundoff error, but intermediate entries can still grow; it is not an unconditional guarantee of numerical stability for every matrix.[ref] It also does not remove the original problem's condition number. For the diagonal matrix with , the condition number in the Euclidean norm is . Row permutations preserve this condition number, because they preserve Euclidean norms. Even an exact solve changes from to when the right-hand side changes from to . This sensitivity is a property of the linear system, not a zero-pivot element failure.[ref]
Recursive inverse of a lower triangular matrix Created 2026-10-25 Updated 2026-10-31
For an invertible lower triangular matrix, the scalar pivot and the remaining triangular block are both invertible. The displayed formula follows by matrix multiplication: the lower-left block in the product is , and the diagonal blocks are identities. Recursively invert , compute , and assemble the inverse matrix; the one-dimensional base case is . This recursion reduces the size by one at each step.
Take a star graph with center and four leaves . Let be its Laplacian matrix and the identity matrix. In the order , the original example is
For a nonzero vector , its quadratic form is
Thus is a symmetric positive-definite matrix and either ordering below admits a Cholesky decomposition. Changing the ordering changes the work, rather than the mathematical solvability.
Center first. Eliminating with pivot element leaves the Schur complement
Every pair of leaves now has coupling : six new edges, hence six undirected fill-in positions. The four remaining vertices form a clique. In the Cholesky decomposition, the first column has and . The rest of the lower triangular matrix is dense. To check that later cancellation does not remove its entries, after leaves have also been eliminated, the active leaf block is
Indeed a leaf step sends to . All active off-diagonal entries remain negative. The successive pivot elements in ordinary symmetric Gaussian elimination, equivalently the squared diagonals in the Cholesky decomposition, are
The Cholesky decomposition therefore stores nonzero entries, including its diagonal.
Leaves first. Permute to . Each leaf has only one remaining neighbor, so its elimination changes only the center's diagonal, reducing it by . The successive pivot elements are , and the exact Cholesky decomposition is
There is no fill-in, and only nonzero entries in . This is a concrete instance of leaf elimination of a tree-pattern positive-definite matrix; its general proof explains why the same idea works on every tree pattern. The minimum degree algorithm also chooses a leaf at every nontrivial stage of this particular example, but that success gives no general optimality guarantee.
Figure 1.
Eliminating the center of a four-leaf star graph creates a clique; eliminating leaves creates no fill-in
. Details.
Figure 2.
The same symmetric positive-definite matrix has 15 or nine nonzero Cholesky decomposition factor entries, depending on its ordering
. Details.
The input has 13 nonzero matrix elements when both symmetric halves are counted, or nine in its lower triangle. The six added undirected edges correspond to six added positions in one triangular factor, or 12 positions if both symmetric halves of the filled pattern are displayed. Comparing all 13 input entries directly with the 15 entries of would mix counting conventions.
Sparse Gaussian elimination Created 2026-10-14 Updated 2026-10-18
Sparse Gaussian elimination solves a linear system by Gaussian elimination while exploiting its sparse matrix structure to avoid storing zeros and performing unnecessary arithmetic operations. The catch is that zeros in the input need not remain zero: eliminating a shared unknown can couple two equations that previously had no direct coupling. These new positions are fill-in, and their number can depend strongly on the order of elimination.
For a real symmetric positive-definite matrix, the usual direct method is a Cholesky decomposition. Choose an ordering, use symbolic factorization to allocate the predicted factor entries, compute their values, then solve two triangular systems. Compressed sparse storage makes the reduced storage useful. General LU decomposition may also need numerical partial pivoting, so an ordering chosen for sparsity can change during factorization.[ref]
For a fixed ordering, let be the permutation matrix that puts the unknowns in that order. Permute both rows and columns:
Here is the lower triangular matrix in the Cholesky decomposition of ; . Forward substitution and back substitution give the original solution. The simultaneous permutation preserves the symmetric positive-definite matrix property because for every nonzero vector . A row permutation alone generally loses the symmetric matrix structure.
The local mechanism is a Schur complement. If the active pivot element is , then for remaining indices ,
Even when , two nonzero couplings through make the second term nonzero. Thus the elimination graph removes and joins its remaining neighbors into a clique. The fill-path criterion for symmetric elimination extends this local rule across several steps. The elimination tree organizes the resulting dependencies; the minimum degree algorithm and nested dissection choose orderings to control them.
This connection between graphs and linear systems was already explicit in Donald J. Rose, R. Endre Tarjan and George S. Lueker's 1976 study of fill-in and perfect elimination orderings.[ref]
Triangularity of an inverse matrix Created 2026-10-31 Updated 2026-11-05
An invertible lower triangular matrix has a lower triangular matrix inverse. To see this, solve for column of the inverse. The nonzero diagonal and forward substitution force for . Applying the result to the transpose proves the upper-triangular case as well. Invertibility is essential; a singular triangular matrix has no ordinary matrix inverse.
Choose an eigenvector and let . The dual map preserves the annihilator of a vector subspace , of dimension one less. By induction, choose a basis of making the restriction upper triangular. Extend this to a basis of the whole dual space; its matrix remains upper triangular because is an invariant subspace. In the corresponding primal basis, the matrix is , which is lower triangular. Reversing the primal basis makes it upper triangular. Dimension zero and one start the induction. This also allows the original eigenvector to be the first vector of the resulting upper triangular basis.
Unit lower triangular matrix Created 2026-10-31 Updated 2026-11-05
A lower triangular matrix with every diagonal entry equal to one. Its determinant is one, and its inverse is again unit lower triangular. Such matrices store the elimination multipliers in an LU decomposition.