Cholesky decomposition Created 2026-09-28 Updated 2026-10-18
Every real symmetric matrix that is a positive-definite matrix has a unique Cholesky decomposition , where is a lower triangular matrix with positive diagonal entries.[ref]
DPOTRF (LAPACK 3.12.1) by LAPACK project. DPOTRF, LAPACK 3.12.1: Purpose, lower-triangular factorization; UPLO and INFO argument documentation
For a complex Hermitian positive-definite matrix, the corresponding factorization is , with the conjugate transpose and the diagonal of positive and real.[ref]ZPOTRF (LAPACK 3.12.1) by LAPACK project. ZPOTRF, LAPACK 3.12.1: Purpose, Hermitian factorization with conjugate transpose
The factorization turns a linear system into two triangular systems.For example, matching entries in givesChoose the positive square roots in order: , and . ThereforeThe second radicand, , is the scalar Schur complement remaining after eliminating the first variable. A positive diagonal of alone would not guarantee that this quantity is positive; Sylvester's criterion explains the relevant leading principal minors.
For that right-hand side, first use forward substitution to solve : and , so . Then use backward substitution in a triangular system to solve : and , giving . No matrix inverse is required. For several right-hand sides with the same , keep the same factor and repeat only these triangular solves.
Computed three-by-three LU decomposition 2026-10-14
Here is an original example of Gaussian elimination that can be checked entirely with integers. Start withThe first pivot element is . The elimination multipliers are and . Apply the elementary row operations and to obtainNow the second pivot element is , and . The elementary row operation givesImportantly, comes from the current reduced matrix, not the original entry . To reconstruct from , its second row is twice the first row of plus the second; its third row is minus the first row of plus three times the second plus the third. These are exactly the coefficients in the lower triangular matrix .
Gaussian elimination turns a three-by-three matrix into an upper triangular matrix, while elimination multipliers are stored in a lower triangular matrix
. Details. The unpivoted calculation here illustrates the structure of LU decomposition; applying partial pivoting to this particular would choose a different first row and different factors. Both procedures can represent the same linear system when their permutation matrices are handled consistently.
Diagonal matrix entry 2026-10-18
A diagonal matrix entry uses the same row and column index. The diagonal entries of a lower triangular matrix determine its determinant by their product.
Forward substitution 2026-10-14
Forward substitution solves a linear system with a lower triangular matrix and nonzero diagonal, from the first row downward:The first sum is empty, so . Each subsequent row uses only components already found. For a unit triangular matrix , omit the division because . The complementary procedure, back substitution, solves an upper triangular matrix system from the last row upward.[ref]
Gauss-Seidel method Created 2026-10-05 Updated 2026-10-18
With , the Gauss-Seidel method solves . It uses each newly computed coordinate immediately in the remaining triangular solve. It is successive over-relaxation with parameter one, and converges from every start when is a symmetric positive-definite matrix.
To solve a linear system , split its matrix into the diagonal matrix and the strictly lower and upper parts , retaining their actual signs. Every diagonal entry must be nonzero. A sweep updates coordinates in order:The Jacobi method uses the old vector throughout; the Gauss-Seidel method reuses each fresh coordinate. Thus the update order is part of the method.[ref]
Notes for Ma221 Lecture 21, Nov 10 2009. Math 221, Matrix Computations, Fall 2009; Gauss-Seidel: component loop, splitting and update-order remark, web lines 372–380
The matrix splitting has , , so its iteration matrix isCompute the update by forward substitution with the lower triangular matrix , rather than forming a matrix inverse. For a sparse matrix, a sweep only visits stored entries and can overwrite the working vector. Dependencies on fresh coordinates constrain parallel execution. This makes the Gauss-Seidel method an inexpensive solver component, including in a multigrid method.[ref]
Notes for Ma221 Lecture 21, Nov 10 2009. Math 221, Matrix Computations, Fall 2009; Basic iterative methods, cheap splitting requirement; Gauss-Seidel loop and red-black ordering; opening list of solver building blocks
Laplace expansion Created 2026-10-18 Updated 2026-10-20
Expand the determinant along any fixed row using the displayed formula, where deletes row and column . The signed matrix minors are its cofactors. Applying the same formula to the transpose gives the column expansion. The row formula follows from the Leibniz formula for determinants by grouping permutations according to the selected column in row . For a lower triangular matrix, expanding along the first row reduces the determinant to times a smaller triangular determinant; induction gives the product of all diagonal entries, even when some vanish.
LU decomposition Created 2026-09-29 Updated 2026-10-14
An LU decomposition writes a square matrix as , with a lower triangular matrix and an upper triangular matrix. We use a unit triangular matrix , meaning . The factors record Gaussian elimination: contains the reduced equations, while stores the elimination multipliers needed to reconstruct the original equations. This makes Reusing LU factors for multiple right-hand sides inexpensive.[ref]
For an invertible matrix, unpivoted LU decomposition requires nonzero pivot elements at every elimination step; invertibility alone does not guarantee this. In general use Pivoted LU decomposition, with the explicit convention and a permutation matrix . Once the factors exist, solving a linear system needs forward substitution followed by back substitution, rather than forming a matrix inverse.
Matrix decomposition 2026-10-14
A matrix decomposition expresses a matrix as a matrix product of factors with simpler structure. An LU decomposition uses triangular factors, a QR decomposition uses an orthogonal matrix and a triangular factor, and a singular value decomposition separates input directions, stretching factors and output directions. The factorization is an identity; the chosen structure determines what it helps compute.
For an original two-by-two example,The outer factors are a lower triangular matrix and an upper triangular matrix, each with unit diagonal as in a unit triangular matrix; the middle factor is a diagonal matrix. Their matrix product is , and the final diagonal entry is the Schur complement of the first entry . This is the scalar version of the factorization under block elimination.
To solve , solve with the three factors in their displayed order from left to right: first the lower triangular factor, then the diagonal factor, then the upper triangular factor. The intermediate vectors are and , giving the concise answer . A new right-hand side uses the same factors. This is why Reusing LU factors for multiple right-hand sides is useful: factorization records work that otherwise would be repeated, while forward substitution and back substitution apply it cheaply.[ref]
Convex Optimization by Stephen Boyd and Lieven Vandenberghe. §C.4.1, printed pp. 673–674: block factor-solve interpretation
Different decompositions reveal different features. A Cholesky decomposition uses positive definiteness of a symmetric matrix, while a singular value decomposition also applies to rectangular matrices and exposes matrix rank. The existence and numerical behaviour of the factors depend on their own hypotheses; for example, an unpivoted LU decomposition can fail when a chosen pivot element is zero even though the matrix is an invertible matrix.
Matrix splitting Created 2026-09-24 Updated 2026-10-18
A matrix splitting chooses an easy part of a matrix and corrects for the remaining part . To solve the linear system , first rewrite it as , then use the old vector on the right and solve for the new vector on the left. The matrix inverse notation describes the update mathematically; each step should solve with rather than construct its matrix inverse.[ref]
Notes for Ma221 Lecture 21, Nov 10 2009. Math 221, Matrix Computations, Fall 2009; Basic iterative methods: definition A = M − K and recurrence (*), with the two conditions for a useful splitting
The same identity also yields a correction based on the linear-system residual:This connects a matrix splitting to matrix preconditioning: rescales the imbalance before adding a correction. Choosing gives and the exact solution in one step, but requires solving the original linear system; choosing cheaply matters as much as the convergence criterion for a stationary iteration.
With the sign convention , is the diagonal matrix of diagonal entries and contain the actual lower and upper entries, without reversing their signs. The Jacobi method uses , ; the Gauss-Seidel method uses , . The first requires only division by diagonal entries; the second uses a lower triangular matrix and forward substitution. These choices explain their different information flows.
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]
Fundamentals of Numerical Computation by Tobin A. Driscoll and others. §2.6.1, Definition 2.6.1; §2.6.2, Definition 2.6.2 and equation (2.6.1): pivot selection and reordered-row factorization
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]
Fundamentals of Numerical Computation by Tobin A. Driscoll and others. §2.6.4, Example 2.6.6 and the concluding discussion: stability of unpivoted and pivoted factorization
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] Sparse elimination of a four-leaf star 2026-10-18
Take a star graph with center and four leaves . Let be its Laplacian matrix and the identity matrix. In the order , the original example isFor a nonzero vector , its quadratic form isThus 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 complementEvery 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 isIndeed 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, areThe 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 isThere 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.
Eliminating the center of a four-leaf star graph creates a clique; eliminating leaves creates no fill-in
. Details. 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]
Lecture 27: Sparse Gaussian Elimination. Applications of Parallel Computers, CS267, Spring 1996; CS267, Lecture 27, 23 April 1996, Cholesky versus LU Decomposition: distinction between numerical pivot selection and advance ordering, and phases 1–4; Sparse Matrix Storage Schemes
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]
Algorithmic Aspects of Vertex Elimination on Graphs by Donald J. Rose and others. Abstract: symmetric positive-definite systems, fill calculation for a prescribed ordering, and algorithms for special orderings; publication information, June 1976
Triangular solve 2026-10-18
A triangular solve computes the unique solution of a linear system for an invertible triangular system using forward substitution for a lower triangular matrix or backward substitution in a triangular system for an upper triangular matrix.
Unit triangular matrix 2026-10-14
A unit triangular matrix is a triangular matrix whose diagonal entries are all one. It is an invertible matrix with determinant one. In the convention used for LU decomposition, is a unit lower triangular matrix, so forward substitution needs no division by its diagonal entries.



