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.
Block matrix inverse Created 2026-09-24 Updated 2026-10-18
A block matrix inverse expresses the matrix inverse in terms of smaller matrices. Partition a square matrix over a field as
If is an invertible matrix, define its Schur complement . Then is an invertible matrix exactly when is an invertible matrix, and
The order of the matrix products matters. In particular, the lower-right block is , rather than generally : the coupling through and changes the response.[ref]
For an original example, take
The Schur complement is . Substitution gives the concise answer
Multiplying in either order gives the identity matrix; the lower-right entry is , whereas . The difference records the feedback through the two eliminated variables.
Figure 1.
A block matrix inverse computed from the smaller Schur complement
. Original exact example. Colours mark the two-by-two block , the coupling blocks , and the scalar block . The same partition is retained in the matrix inverse; its blocks are not the entrywise inverses of the original blocks. Details.
Often the desired output is a solution of a linear system, rather than every entry of a matrix inverse. Block elimination solves with and then with , recovering the eliminated variables by back substitution. Reusing an LU decomposition of avoids explicitly forming . A favourable block diagonal matrix or tridiagonal matrix block can make this useful; merely partitioning an unstructured dense matrix does not guarantee a faster solve.[ref]
At each step of Gaussian elimination, select the largest absolute entry in the uneliminated part of the current column and interchange rows to put it on the diagonal. A nonsingular trailing Schur complement has a nonzero entry in its first column, so this procedure always finds a nonzero pivot in exact arithmetic. The permutation matrix records row interchanges; earlier multipliers must be interchanged too when assembling the lower-triangular factor. This yields the LU decomposition with unit diagonal in . Searching within columns and interchanging rows is distinct from interchanging columns.
Here is an original example of Gaussian elimination that can be checked entirely with integers. Start with
The first pivot element is . The elimination multipliers are and . Apply the elementary row operations and to obtain
Now the second pivot element is , and . The elementary row operation gives
Importantly, 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 .
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.
Elimination multiplier 2026-10-14
For , an elimination multiplier is the scalar used in the elementary row operation . This creates a zero below the pivot element. The remaining entries change by for . Storing these elimination multipliers gives the subdiagonal entries of in LU decomposition; later row interchanges must also reorder the already stored coefficients.
Gaussian elimination Created 2026-09-24 Updated 2026-10-25
Gaussian elimination applies elementary row operations to reduce a linear system to triangular form. Dense elimination uses arithmetic operations.
Gaussian elimination solves a linear system by removing one unknown from later equations at each step. Write the coefficients and right-hand side together as an augmented matrix . Apply the same elementary row operations to both parts until the coefficients form a row echelon form; for a square invertible matrix, this gives an upper triangular matrix system. Then back substitution recovers the unknowns from the last equation upward. The useful simplification is that each successive equation involves fewer unknowns, while the set of solutions stays the same.
Why do elementary row operations preserve solutions? Interchanging equations changes only their order. Multiplying an equation by a nonzero scalar can be undone by division. Replacing equation by itself plus times equation , with , can be undone by adding times the unchanged equation . Equivalently, an elementary matrix is an invertible matrix, so if and only if . Applying an operation to without also applying it to loses this equivalence.
At step , choose a nonzero pivot element after any row interchange. For every , form the elimination multiplier and perform the elementary row operation . Its coefficient in column becomes in exact arithmetic. Later operations combine rows that already have zeros in earlier columns, so those zeros survive. If an active column has no nonzero candidate, general row echelon form reduction skips it; a square invertible matrix always has a candidate at each step with suitable row interchanges. Partial pivoting also considers roundoff error when selecting the candidate.[ref]
For a dense matrix with one right-hand side, the classical algorithm uses arithmetic operations over the real numbers, counting each addition, subtraction, multiplication and division as one. At step , the coefficient update has entries, each costing one multiplication and one subtraction; the elimination multipliers, right-hand-side updates and back substitution contribute lower-order terms. Searching for partial pivoting adds comparisons, and storing the dense coefficients uses space. These assumptions exclude the different storage and work patterns of sparse Gaussian elimination; the exact loop counts appear in LU factorization and solve costs. Here denotes Big O notation.
Recording the same steps as an LU decomposition makes Reusing LU factors for multiple right-hand sides possible. This is useful whenever the coefficients stay fixed while the forcing vector changes: the expensive elimination is done once. The choice of pivot element matters even when the linear system is well conditioned, as Tiny-pivot roundoff in Gaussian elimination demonstrates.
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.
For classical dense Gaussian elimination over the real numbers, count each scalar addition, subtraction, multiplication or division as one arithmetic operation. At step , there are elimination multipliers to divide out and remaining entries, each requiring one multiplication and one subtraction. Thus this implementation's unpivoted factorization count is
Here uses Big O notation. Partial pivoting adds comparisons and row movement, leaving the leading arithmetic count unchanged. The leading count agrees with the standard dense LU decomposition analysis.[ref]
With unit , forward substitution uses arithmetic operations. Back substitution uses another plus diagonal divisions. Together these cost per right-hand side; applying a stored row permutation moves entries and requires no scalar arithmetic. In Big O notation, Reusing LU factors for multiple right-hand sides therefore costs
whereas refactorizing for each of the right-hand sides costs . For and , the leading counts are about versus arithmetic operations, nearly a tenfold saving. These are operation counts, not measured runtimes: memory access and optimized matrix multiplication also affect speed.[ref]
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.
Matrix inverse Created 2026-09-24 Updated 2026-10-14
For an -by- square matrix over a field, its matrix inverse is an -by- matrix satisfying both identities
where is the identity matrix. It exists exactly when is an invertible matrix, equivalently when its matrix rank is or its determinant is nonzero. It reverses the linear map: applying and then recovers the input, while applying and then recovers the output.[ref]
The matrix inverse is unique. If and both satisfy the identities, then . Although the definition is two-sided, for finite square matrices either identity alone suffices: forces a trivial kernel, whereas forces surjectivity; either makes an invertible matrix by the rank-nullity theorem. Rectangular matrices may have only one of these properties.
For a concrete example, take
Direct matrix multiplication gives
Consequently the vector follows a reversible journey:
The columns and are the images of the standard basis vectors. They turn the unit square into a parallelogram; the matrix inverse restores both the square and its surrounding grid. Since , this example changes shape while preserving area, illustrating that invertibility does not require preserving lengths or angles.
Figure 1.
A matrix inverse restores a grid and a vector; a singular matrix merges distinct inputs
. Details.
For comparison, the singular matrix
cannot have a matrix inverse: the output cannot specify which of the two inputs occurred. Their difference belongs to its kernel. Indeed collapses the plane to a line, its matrix rank is one, and its determinant is zero. No subsequent function of the output alone can reconstruct every input.
An important use of the matrix inverse is describing the unique solution of a linear system:
For , the preceding computation solves and , giving . In computation, usually solve the linear system using Gaussian elimination and a factorization such as an LU decomposition, rather than forming every entry of the matrix inverse. The inverse formula specifies the answer; a factorization provides a reusable way to compute it for each right-hand side.[ref]
Here the LU decomposition is especially simple:
Solve by forward substitution in a triangular system: and . Then solve by backward substitution in a triangular system: and . The same factors work when changes. If the whole matrix inverse is actually needed, its th column is the solution of , where is the th standard basis vector.
Reversing several operations means undoing the last one first. For invertible matrices of the same size,
because , and the product in the other order is also . This is why a change-of-basis matrix uses its matrix inverse to reverse the direction of coordinate conversion.
The coefficient matrix and right-hand side are
For an LU decomposition with unit diagonal in the lower factor, subtract row 1 from row 2, add twice row 1 to row 3, and then add the new row 2 to row 3. The elimination multipliers are , , and . Thus
Multiplication verifies . Forward substitution in gives , , and . Back substitution then gives , , and :
Every pivot is nonzero, so no row permutation is needed and the linear system has a unique solution.
Gaussian elimination uses first-column multipliers , second-column multiplier in the last row, and third-column multiplier there. Recording these in a unit lower-triangular matrix gives the LU decomposition
Forward substitution in gives . Back substitution gives , , , and . Hence the solution is
Eliminate the first entries of rows two, three and four using multipliers . All remaining subdiagonal entries are then already zero. The unit-lower-triangular LU decomposition is
Multiplication verifies . Since , all pivots are nonzero. Forward substitution in gives
Backward substitution in gives , , , and . Thus
Direct substitution yields as a check.
Use columnwise partial pivoting: select the largest absolute entry in the current column and interchange rows. In the first column the pivot is , so interchange rows 1 and 2. The multipliers are and , and elimination gives
The second pivot is , so interchange the two remaining rows. Their previously stored first-column multipliers must also be interchanged. The final multiplier is , giving the LU decomposition
The permutation matrix orders the original rows as . Multiplication verifies the displayed identity.
If “column pivoting” instead denotes interchanging columns rather than searching within a column, that convention gives with
This second identity uses a different pivot convention; it does not change the row-pivoted answer above.
Gaussian elimination without row exchanges gives the LU decomposition
Because has unit diagonal and is upper triangular,
Solving the two triangular systems gives
and
Gaussian elimination gives the LU decomposition
The prescribed diagonal entries of are visible, and direct multiplication gives .
Choose a shift which is not an eigenvalue. Inverse iteration applies power iteration to , implemented by a linear system solve rather than by forming an explicit matrix inverse:
A single LU decomposition of can be reused for all the solves at this fixed shift. An eigenpair transforms into
Thus an eigenvalue uniquely closest to becomes the dominant eigenvalue of . For a diagonalizable matrix, the argument in the preceding subpart gives convergence of diagonalizable fixed-shift inverse iteration, provided the starting coefficient in the target eigenspace is nonzero, with power iteration direction error , where
For any prescribed simple eigenvalue, taking a sufficiently close but unequal shift makes the numerator small while the denominator stays close to its positive separation from the remaining eigenvalues. This makes small and gives very fast convergence per iteration. The Rayleigh quotient of estimates directly. If estimates the associated eigenvalue of , the corresponding estimate is .
The selection principle also applies when the other eigenvalues have nontrivial blocks in the Jordan normal form: their contributions acquire powers of , multiplying strictly smaller geometric factors. A simple uniquely closest eigenvalue still attracts the direction when the Riesz projection of onto its generalized eigenspace is nonzero. For nonreal target eigenvalues, allow complex shifts and arithmetic; a real shift cannot distinguish a conjugate pair of equal distances. Setting makes the solve singular, and an exactly zero starting target component prevents convergence to that target in exact arithmetic. When is real, account for the sign behavior of fixed-shift inverse iteration.
Rank-one matrix update 2026-10-14
A rank-one matrix update changes a matrix by an outer product . For real vectors , its action on an input vector is
The dot product reads one scalar from the input, and the correction moves the output along . All correction outputs therefore lie in one linear span. If either vector is zero, the update is zero; otherwise the correction is a rank-one matrix. The full updated matrix need not have rank one.
For example, choose
The update sends to the correction . Although all four entries change, there is only one direction of correction. Adding it to the identity matrix gives .
This special structure allows existing work to be reused. The matrix determinant lemma updates the determinant using one scalar, and the Sherman–Morrison formula updates the matrix inverse using an outer product. Such formulas are useful when a linear system changes slightly after a new observation or a parameter adjustment: the unchanged part can retain its LU decomposition. The term rank-one describes the rank of the correction, not the size of the entry changes. [ref].
When a fixed matrix is used with several forcing or measurement vectors, compute its Pivoted LU decomposition once. Collect right-hand sides into the columns of , and the corresponding solutions into . Then
Each column undergoes the same row permutation, forward substitution and back substitution. Neither , nor depends on . This is the useful separation between preparing a linear system and applying its solution procedure repeatedly. LAPACK implements it by taking previously computed factors, permuting all right-hand sides, and performing the two triangular solves.[ref]
For the unpivoted factors in Computed three-by-three LU decomposition, take
Direct matrix multiplication checks all three identities , and . The first column reproduces the previous solve; the other two use exactly the same factors. New right-hand sides can also arrive one at a time. If changes, these stored factors generally need to be recomputed.
Figure 1.
One row permutation fixes a zero pivot element; each new right-hand side reuses the same LU decomposition and two triangular solves
. Details.
Sherman–Morrison formula Created 2026-09-24 Updated 2026-10-14
The Sherman–Morrison formula computes the matrix inverse after a rank-one matrix update. If is an invertible matrix and , then
The inverse correction is itself an outer product, divided by the scalar . The matrix determinant lemma shows that the nonzero-denominator condition is exactly the condition that the updated matrix remains an invertible matrix.
For , , and , we have . Thus the computed inverse is
Multiplication in either order gives the identity matrix. The result reuses the original inverse and the same correction vectors, rather than solving independently for all four inverse entries.
Often only the solution of an updated linear system is needed. If and , then
provided . The two solves use the same LU decomposition of . This expresses the computational benefit without requiring an explicitly stored matrix inverse. Strang's Lecture 14, transcript pp. 9–10 explains this reuse of the original factorization.
To see why the inverse correction works, first consider and put . The rank-one matrix satisfies . Expanding
also works in the reverse order. The general case follows by factoring out and replacing by . A matrix identity has reduced to cancellation of scalar coefficients.
Historically, Jack Sherman and Winifred J. Morrison studied updating an inverse when a single matrix entry changes in their [ref]. Such an entry change is the special rank-one matrix update , with standard basis vectors . The reference and the earlier 1949 abstract on row or column changes are recorded in Henderson and Searle, On Deriving the Inverse of a Sum of Matrices (1981), references 40–41. This distinguishes the specific original setting from the more general formula used here.