Block elimination 2026-10-14
Write a linear system as and , with an invertible matrix. Solving the first equation for and substituting in the second gives
Thus the Schur complement is the coefficient matrix remaining after the variables have been eliminated. When it is an invertible matrix, solve the reduced linear system for and recover . In computation, expressions such as mean solving with each column of , using the same LU decomposition or Cholesky decomposition when applicable.
For the example under block matrix inverse and right-hand side , take and . Since , the reduced equation is . Back substitution gives
The original equations return , and , respectively. The reduction retained the influence of on through the correction .
A short proof outline also explains whether is an invertible matrix: the exact matrix factorization
has invertible matrices on the outside. Therefore is an invertible matrix precisely when the central block diagonal matrix is one. Reversing the factors gives the block matrix inverse, while taking determinants gives the Schur complement determinant identity.
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] For a complex Hermitian positive-definite matrix, the corresponding factorization is , with the conjugate transpose and the diagonal of positive and real.[ref] The factorization turns a linear system into two triangular systems.
For example, matching entries in gives
Choose the positive square roots in order: , and . Therefore
The 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.
Figure 1. . Original exact two-by-two example. Multiplying the displayed lower triangular matrix by its transpose recovers ; forward substitution and backward substitution in a triangular system give for . Details.
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.
André-Louis Cholesky developed his calculation in the setting of geodetic adjustment: measured angles and lengths must satisfy geometric relations, while corrections should be small. The manuscript reproduced in Claude Brezinski's study is titled Sur la résolution numérique des systèmes d’équations linéaires and ends with the date 2 December 1910 at Vincennes. The manuscript reports a 56-equation calculation adjusting altitudes in an Algerian triangulation network. Its date establishes when this written account existed, rather than an exact invention date.[ref]
A related algebraic reason for the method's usefulness is that normal equations involve a Gram matrix. If a real matrix has linearly independent columns, then
so is a positive-definite matrix. That gives the structure needed by a Cholesky decomposition. The historical adjustment problem instead produces from independent constraint rows; the same argument applies to its transpose. In numerical least squares, explicitly forming normal equations squares the condition number of a full-column-rank design matrix; a QR decomposition can therefore be preferable for accuracy. Indeed, the extreme singular values give . The factorization remains useful when a positive-definite matrix is already the natural input.
For any real vector , a Cholesky decomposition gives the quadratic form identity
Since is an invertible matrix, this squared Euclidean norm is positive whenever . The factorization thus certifies positive definiteness and gives coordinates in which the quadratic form is a sum of ordinary squares. For the matrix above,
The level set is an ellipse; the linear map sends it to the unit circle. The points and go to and , respectively.
Figure 1. . Original exact ellipse and its image under . Matching point colors show two mapped points; the axes use their own coordinates. This transformation need not be a rotation or a uniform scaling. Details.
The same factor works in the reverse direction for Gaussian random vectors. If has independent unit-variance, zero-mean Gaussian random variables as coordinates, has covariance matrix . In this example and : their variances are and , while their covariance is . This is a concrete way to generate specified correlations from independent draws.
A triangular factor is not generally a square root of a matrix in the sense . Here . The Cholesky decomposition uses the product with the transpose, which is also what makes the quadratic form a squared Euclidean norm.
For a real positive-definite matrix in finite dimension, write by the spectral theorem for real symmetric matrices. In the coordinates in an orthonormal basis , the positive level set becomes
This is an ellipsoid, with semi-major and semi-minor axes in two dimensions forming an ellipse; each semi-axis has length and direction given by the corresponding eigenvector. In the opening example, the shorter semi-axis is along , while the longer is along . A stiffer direction, meaning a larger eigenvalue, reaches the same energy at a smaller displacement. The ratio of longest to shortest semi-axis is , the square root of the spectral condition number of a positive-definite matrix.[ref]
Strict positivity matters because gives
Hence a fixed positive level set cannot extend arbitrarily far. The Cholesky decomposition gives another view: , so the ellipsoid is the inverse image of a sphere under an invertible linear map. A singular positive semidefinite matrix has a nonzero kernel; adding a kernel vector preserves its quadratic form, so any nonempty positive level set is unbounded. These statements concern finite dimension; the positive definite symmetric operator entry explains why strict positivity alone need not give a uniform lower bound on an infinite-dimensional Hilbert space.
Fill-in Created 2026-10-14 Updated 2026-10-18
Fill-in consists of new nonzero positions created by Gaussian elimination, absent from the original sparse matrix in the same ordering. For a Cholesky decomposition , compare with the lower triangle of , not with the unpermuted input. Each new undirected edge of the elimination graph contributes one structural position in . The sparse elimination of a four-leaf star gives six such positions when the center is eliminated first, and none when the leaves are eliminated first.
Symbolic factorization predicts possible nonzeros from the pattern alone. An initially zero becomes nonzero in a single scalar step if both and are nonzero; however, at later steps several contributions can cancel. For an exact example, let
Eliminate indices in that order. The first Schur complement, in order , is
The second pivot element updates the entry to . The remaining block is , so all four pivot elements are positive and is a symmetric positive-definite matrix. The elimination graph retains the structural edge , but this exact choice of coefficients makes the numerical entry vanish. A small change to generally removes the cancellation.
Such an exact zero is different from discarding a small value computed with floating-point arithmetic. The symbolic factorization deliberately reserves space for possible entries without depending on special numerical identities. A perfect elimination ordering creates no structural fill-in at all; an ordering with cancellations need not have that property.
Gaussian sampling from a precision Cholesky factor Created 2026-10-05 Updated 2026-10-06
If a positive-definite matrix is the precision matrix of a multivariate normal distribution, draw independent and solve . Then has covariance . This avoids forming the inverse and exploits a banded Cholesky decomposition when is banded.
Matrix bandwidth 2026-10-14
The bandwidth in this convention is the largest distance from the main diagonal of a nonzero matrix entry. A symmetric positive-definite matrix of bandwidth can be factored using operations and storage; its Cholesky decomposition does not introduce entries outside that band. A variable permutation changes bandwidth, so it is a property of both the sparsity pattern and its ordering.
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]
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.
For a real symmetric positive-definite matrix, the Cholesky decomposition is , where is upper triangular with positive diagonal; equivalently with lower triangular.
Existence can be proved by induction. Write , where . For a nonzero vector , evaluate the quadratic form at to obtain . The Schur complement is therefore positive definite. By induction it has factor , and
has . The one-dimensional starting case is the positive square root.
For uniqueness, if , then is upper triangular and satisfies . Since is upper triangular and equals , which is lower triangular, is diagonal. Orthogonality makes its diagonal entries , and positivity of the diagonals of forces . Hence and .
Full column rank makes positive definite: for nonzero , . Let be its unique upper-triangular Cholesky decomposition with positive diagonal. Defining gives
Thus the skinny QR decomposition exists. If is another such decomposition, orthonormality gives . Cholesky uniqueness forces , and then . Therefore the skinny factorization with positive diagonal is unique. This is the thin QR factorization from Cholesky decomposition; no inverse of the rectangular is assumed.
Use the undirected graph of the symmetric off-diagonal sparsity pattern. Reading the original matrix gives the edges
This connected nine-vertex, eight-edge graph is a tree. A leaf-removal perfect elimination ordering is
The corresponding lists of remaining neighbors are, in order, . Thus simultaneous row and column permutation to this ordering allows Gaussian elimination without fill-in.
Here are the precise facts that justify the procedure. First, eliminating index makes the remaining entries
Only pairs of remaining neighbors of can acquire a new nonzero entry. Consequently a vertex whose remaining neighbors form a clique can be eliminated without structural fill. Such a vertex is simplicial. An ordering in which each successive vertex is simplicial is a perfect elimination ordering. The graph characterization says that a graph admits such an ordering if and only if it is a chordal graph, meaning every cycle of length at least four has a chord. A tree has no cycles; more concretely, every nontrivial finite tree has a leaf, and removing a leaf leaves a forest. These statements explain why successive leaf removal works here without having to find a general-purpose chordal ordering.
Second, for a symmetric positive-definite matrix, every diagonal pivot and every successive Schur complement is positive definite. For example, if the first pivot is and its coupling column is , then for any nonzero remaining vector ,
Thus no zero pivot requires abandoning the proposed ordering. Since each eliminated vertex here has at most one remaining neighbor, its Schur update changes only a diagonal entry. This proves the claimed fill-free LDL decomposition or Cholesky decomposition for every positive-definite matrix with the given pattern, including cases with additional accidental zeros. It is leaf elimination of a tree-pattern positive-definite matrix.
Sparse Gaussian elimination seeks a direct solution while preserving the advantage of a small number of nonzeros. The main issue is that eliminating unknowns creates new interactions between the remaining unknowns. For a symmetric positive-definite system, simultaneous row and column permutation merely changes the elimination order, and Cholesky decomposition or LDL decomposition can proceed without pivoting. Partition one elimination step as
The remaining system has the Schur complement . It is positive-definite because, for any nonzero , minimizing the positive quadratic form of over the first coordinate gives . This both justifies the next positive pivot and identifies exactly where fill can appear.
The matrix graph of a symmetric sparsity pattern has one vertex per unknown and an edge when is structurally nonzero. At pivot , the update
can change an entry only when both and are current neighbors of . Thus the elimination graph operation removes and makes its remaining neighbors a clique. Edges absent before this update are fill-in. The graph describes structural or generic nonzeros: special cancellations in the numerical values can reduce the actual fill, but cannot justify omitting possible entries in advance.
A useful global description is the fill-path criterion for symmetric elimination. After a set has been eliminated, remaining vertices are adjacent generically exactly when their original graph contains a path from to with all internal vertices in . The assertion starts with the original edges when is empty. Eliminating the next vertex concatenates two earlier such paths through it; conversely, split any allowed path at the newly eliminated vertex to recover the two earlier connections. This induction explains why sparse long-range couplings may eventually become dense.
The order is decisive. For a star with four leaves, eliminating a leaf only changes the diagonal of its sole neighbor and creates no fill. Repeated leaf elimination preserves this property. Eliminating the central vertex first instead connects all four leaves, creating six edges and a dense four-variable trailing system. This occurs, for example, in a positive-definite star matrix with central diagonal , leaf diagonals and edge entries ; no cancellation removes the new leaf couplings.
Figure 1.
The same sparse star graph creates no fill with leaf elimination and six fill edges with central elimination
. Details.
For an arbitrary graph, an ordering creates no fill precisely when each pivot's later neighbors are already a clique, namely a perfect elimination ordering. Such an ordering exists exactly for a chordal graph. A chordless cycle of length at least four illustrates the obstruction: its first removed vertex connects its two previously nonadjacent neighbors. Eliminating in a chosen order adds chords until the completed graph is chordal. Thus sparsity of the original matrix alone does not guarantee sparse factors; the graph and its ordering matter together.
If pivot has later neighbors, its column contains factor entries and its symmetric outer-product update costs arithmetic. The total storage is governed by and the work by . A band ordering with matrix bandwidth gives the familiar storage and work, but a narrow profile or graph separator can do better than a single global band. The minimum degree algorithm greedily chooses a current low-degree pivot; it often keeps immediate updates small, but it must account for previously created fill and need not minimize total fill.
Nested dissection instead finds a small vertex separator, recursively eliminates disconnected subdomains, and leaves separator variables until last. For a regular two-dimensional grid with unknowns, a separator has vertices. Its dense final work is , and recursive balanced separation gives
At each level the summed separator-square storage is , giving factor storage over the logarithmic number of levels. These estimates assume the usual geometric separator structure; they are not guarantees for every sparse graph. Independent subdomains also expose parallel work.
In a practical solver a symbolic factorization phase uses the pattern and ordering to allocate factor storage and schedule updates. For the lower-triangular factor, the elimination tree takes the parent of column to be its first later row index containing a structural nonzero. Descendant updates flow towards those later pivots, making the tree useful for dependency scheduling and the organization of the factorization. Compressed sparse storage records only entries and indices; the numerical phase then computes the values, followed by forward and backward substitution. The factors can be reused for many right-hand sides.
Finally, structural efficiency must be balanced with numerical stability. For a nonsymmetric system the pattern can be represented by a directed or bipartite graph, and elimination creates edges from incoming to outgoing neighbors. Separate row and column permutations are possible. A fill-reducing column ordering does not ensure a safe pivot: scaling and partial pivoting may be needed to prevent division by a tiny number and large growth. Such row interchanges can change the predicted fill. Positive-definite symmetric problems avoid this conflict; general sparse solvers must manage it explicitly. Graph-based ordering controls factor sparsity, while pivoting controls numerical safety; an effective sparse factorization needs both.
For the Cholesky decomposition , choose lower triangular with positive diagonal whenever is positive-definite. Successive entries are
The equation gives , so . Finally,
Thus for ,
It is nonsingular, and for every nonzero vector , .
Necessity also follows from the leading principal determinants , and , or directly from the second elimination pivot. Hence
At the displayed limiting factor still satisfies , but has rank two and zero second diagonal entry: is positive semidefinite, not positive-definite. For , taking gives , so no real factor exists.
Let . Independence of the standard normal distributions gives , , and joint density
Choose a matrix with , for example the lower-triangular factor from the Cholesky decomposition. It exists and is nonsingular because is a symmetric positive-definite matrix. Then the required simulation is
It has mean and covariance matrix , and every linear combination of its coordinates is Gaussian, so it has the required multivariate normal distribution.
For the multivariate normal density, apply the change of variables formula to . Its absolute Jacobian determinant is , and
Hence
The nonsingularity assumption is needed for a density with respect to -dimensional Lebesgue measure.
Write for two rows of the data matrix and . Three possible dissimilarities for continuous variables are the following.
The Euclidean distance is
It is simple and has the usual geometric interpretation when coordinates have comparable units. Its disadvantage is sensitivity to the numerical scales: a change of units or a high-variance variable can dominate it. Strongly correlated coordinates can also give repeated weight to essentially the same information. Squared Euclidean distance is useful in some methods, but is not itself a metric because it need not satisfy the triangle inequality.
The standardized Euclidean distance is
where is the sample variance of coordinate across individuals. It measures differences in standard-deviation units and is invariant under positive coordinate rescalings when the scales are estimated consistently. It is useful for differently measured variables, but requires nonzero sample variances, ignores correlations between coordinates and can give excessive influence to a low-variance noisy variable. With fixed positive scales it is a Euclidean distance after a diagonal change of coordinates, so it is a metric.
The Mahalanobis distance is
where is the pooled sample covariance matrix of all individuals. If is its Cholesky decomposition, then : it is Euclidean distance in whitened coordinates. It adjusts for both scales and correlations, avoiding duplicate weight for highly correlated variables, and is invariant under nonsingular affine transformations when the sample covariance matrix is transformed accordingly. No multivariate normal distribution assumption is required merely to define the distance. However, must be a positive-definite matrix; when there are too few observations or dependent coordinates, its inverse is unavailable. Estimation of can also be unstable and sensitive to outliers. These trade-offs determine whether covariance adjustment is preferable to the simpler distances.
Choose an initial . At each iteration, evaluate and using and draw from the conditional multivariate normal distribution just derived. Next compute and draw
For example, generate and set . A draw of the conditional multivariate normal distribution can be formed as with a Cholesky decomposition and a vector of independent standard normal distributions.
This two-block Gibbs sampler alternates the full conditional distributions of the independent normal and inverse-gamma regression priors posterior. The conditional-integration argument proves that its invariant distribution is the joint posterior distribution. Under the usual convergence conditions, retain the pairs after an initial transient as the requested dependent posterior sample. The new variance update uses the newly drawn coefficients, rather than the previous coefficients.