Block matrix inverse Created 2026-09-24 Updated 2026-10-14
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]
Block tridiagonal matrix Created 2026-10-03 Updated 2026-10-06
A block tridiagonal matrix has nonzero blocks only on its main block diagonal and the two adjacent block diagonals. It is the block analogue of a tridiagonal matrix.
Consider the original small Poisson equation example
Its exact solution is the quadratic polynomial . Use a uniform mesh with and three interior unknowns . The finite difference method replaces the negative second derivative by
Multiplying by and moving the prescribed Dirichlet boundary conditions to the right gives
The endpoint values contribute and to the first and last equations; they are not additional unknowns. The Thomas algorithm gives
and back substitution yields
All three values equal exactly: the centered finite difference for the second derivative is exact on a quadratic polynomial. This special nodal exactness does not assert exactness for arbitrary forcing or for the piecewise-linear curve joining the nodes.
Figure 1.
Exact quadratic Dirichlet Poisson solution and the three interior values recovered by tridiagonal elimination
. Details.
For any interior points with , the scaled tridiagonal matrix has and . Its pivot elements are : start at and use . All are positive. Interior rows have equality in diagonal dominance, so strict diagonal dominance is not the reason this example works. Instead it is a symmetric positive-definite matrix, since for a real vector with ,
Zero would force every neighbouring value equal and hence all values zero. This connects the boundary constraints directly to the safe pivots for tridiagonal elimination.
Consider the Poisson equation on an interval with homogeneous Dirichlet boundary conditions:
Two integrations and the endpoint conditions give the exact solution . To approximate it, multiply by a test function that vanishes at both endpoints. Integration by parts gives
The boundary term is zero. Thus the weak formulation is to find such that
The zero-trace Sobolev space consists of square-integrable functions with square-integrable weak derivatives and zero endpoint values in their continuous representatives; it does not require a classical second derivative. This is why continuous piecewise linear functions are admissible despite corners. The Poincaré inequality makes a coercive bilinear form on . Strang derives this one-dimensional weak formulation, the piecewise-linear hat functions, and their load and derivative-product integrals in the cited lecture; its endpoint example uses a free left endpoint, while both endpoints here are fixed.[ref]
Take the uniform finite element mesh , , with . The continuous trial space is
Here means polynomials of degree at most one on each interval. This is a conforming finite element space in , with interior piecewise-linear hat functions as a basis. Their endpoint values enforce the Dirichlet boundary conditions automatically. Set and test the weak formulation against each :
Each interior hat has two slopes and , each over a length . Its squared derivative therefore integrates to . Adjacent hats have opposite slopes on their one shared interval, giving . All other derivative products vanish. The stiffness matrix is the tridiagonal matrix
The load is the area of a triangle of base and height one, including hats next to the boundary. Boundary hats are omitted because the boundary values are prescribed. The piecewise-linear hat function article explains how the same entries arise by adding local two-node contributions.
With four mesh intervals, , there are three unknowns:
For example, the first row gives and the middle gives . The coefficients are the nodal values . At , linear interpolation gives , whereas : exactness at the nodes still leaves a visible error between them.
In this model the Galerkin method solution equals the nodal approximation obtained by linear interpolation on any finite element mesh. Indeed, on each interval , is the average of and is constant. Therefore . Summing proves Galerkin orthogonality for , and uniqueness gives . This argument relies on the constant diffusion coefficient, conformity and exact integration; nodal exactness is not a general promise for finite element methods with other operators or integration rules.
On a uniform mesh, direct subtraction of the chord from the parabola gives, on every element of length ,
The largest value error is at an element midpoint. Its size and the energy norm error are exactly
Thus gives and . With eight elements, , these become and . Halving the mesh spacing quarters the maximum value error but only halves the energy norm error: values and slopes converge at different rates. The figure shows the small value error at its own scale, where the four-to-one reduction becomes clear.
Figure 1.
Exact Poisson parabola and continuous piecewise-linear finite element solutions on four and eight intervals, with midpoint errors shown separately
. Details.
The sine vectors , , simultaneously diagonalize these two symmetric tridiagonal matrices. Their eigenvalues are
Thus the semidiscrete decay rates are . The Forward Euler method multiplies each mode by . Stability requires for every mode.
For a fixed finite Dirichlet grid the largest mode is . Consequently the exact finite-grid bound is
As the mesh is refined, the upper bound decreases to . Hence the mesh-independent answer is . This is the forward Euler limit for a consistent hat mass matrix. The frequently seen diffusion bound belongs to the standard second-difference scheme or a lumped mass matrix, and is not the bound for the consistent Galerkin equations derived here.
The B-spline collocation matrix in the cubic case is the finite tridiagonal matrix
For , this is simply the one-entry matrix .
To evaluate the inverse norm exactly, let . Then , where has ones immediately above and below the diagonal and zeros elsewhere. Since , the convergent Neumann series
has nonnegative entries and proves invertibility. Since , its absolute entries equal those of . The absolute row sums are therefore the entries of .
The equation becomes
Its constant particular solution is ; the two characteristic roots of the homogeneous recurrence are and . Imposing the two boundary values gives
This can also be checked by direct substitution, since . The numerator is smallest at the central index or central pair of indices: its successive difference is . Thus, with , the exact inverse norm of midpoint cubic spline collocation is
Equivalently, if the fraction is , and if it is . The finite norm is not exactly three: it equals for , two for , and tends to three as grows. Hence three is the sharp dimension-independent bound for these inverse matrix norms.
Put and . The interior piecewise-linear hat functions are
They are a basis of the continuous piecewise-affine functions vanishing at both endpoints. The support of a function for each hat only overlaps those of neighbouring hats, so the stiffness matrix is a tridiagonal matrix. Direct integration gives the derivative contribution on the diagonal and on adjacent diagonals.
For the potential contribution, symmetry about gives . On the overlap of and , their product is symmetric about , and its integral is . This is the affine-weighted hat mass matrix calculation. Consequently,
and all other entries vanish. The exact right-hand side is
Thus, with , the requested scalar equations are
At the endpoints the coefficient multiplying the zero boundary value is simply omitted. Since , its point values are not even well defined; replacing by would require an additional quadrature rule convention and regularity hypothesis, not present here. The exact Ritz method uses the displayed integrals. The finite element interpolation estimate and Céa lemma, using , give an energy norm error; the Aubin–Nitsche duality argument gives in the L2 norm on this interval.
Use the printed parameterization , , and . Let , be the design matrix with rows , and . Conditional on and the parameters, contributes no extra dependence on by conditional independence.
The stationary autoregressive normal distribution has prior density proportional to
Its Gaussian autoregressive conditional precision is the tridiagonal matrix with
Combining this prior with and completing the square gives
The precision matrix is positive definite. Compute its lower Cholesky decomposition , solve , draw , and solve . Then return . This Gaussian sampling from a precision Cholesky factor is exact because . Tridiagonal structure gives linear cost in and preserves the conditional correlation between days. Notice that the solve uses , not .
These conditionals are normalized for every fixed positive , despite the joint posterior impropriety explained in part (a). If the intended model uses instead, replace the observation coefficient by throughout; the information and precision terms then use and .
Let be the tridiagonal matrix with diagonal two and adjacent entries minus one, incorporating zero Dirichlet boundary conditions. The actual PDF scheme is
An orthonormal basis of eigenvectors of has components , and substitution gives
They form an orthonormal basis by the spectral theorem for real symmetric matrices. Hence is invertible for every , and the amplification eigenvalues are . For the discrete L2 norm ,
This bound has constant one independent of time step and mesh, which is the required stability of a numerical method. Therefore every positive Courant number is stable. If a forcing or local-defect sequence is added, the discrete variation-of-constants formula gives a bound by the initial norm plus the sum of those perturbation norms; this also justifies the global error conclusion in part (a).
Arrange the interior values into a vector . Represent the five-point Dirichlet Laplacian as a Kronecker sum , where is the tridiagonal matrix with diagonal and adjacent entries one. This Kronecker sum is real symmetric; the real sampled potential has a real diagonal matrix . Thus
The generator is a skew-Hermitian matrix. Consequently
The matrix exponential is a unitary matrix, either by differentiating its product with its adjoint or by unitary diagonalization of a normal matrix. For the two-dimensional discrete L2 norm , this gives
Applying the same equation to a difference proves stability of a numerical method with a mesh-independent constant one. This is norm conservation of a semidiscrete Schrödinger equation. It concerns continuous time after spatial discretization; an arbitrary subsequent time integrator need not preserve this stability.
The printed coordinates do not discretize the stated square. For with interior points in each direction, use , , , and sample there. The printed and unshifted coordinates instead describe a grid on . The matrix proof is valid for either geometry with its corresponding boundary values, so this transcription-independent statement flaw does not alter the stability conclusion.
The piecewise-linear hat functions have disjoint supports unless their nodes coincide or are neighbours. Direct integration on the two adjacent intervals gives
Since and the hat is symmetric about , its load is . Thus the reaction-diffusion finite element matrix gives the explicit equations
The coefficient matrix is a tridiagonal matrix and a positive-definite matrix by the energy identity in part (b), hence nonsingular. A separate spectral verification uses the sine basis with and gives
Both terms are positive for the Dirichlet modes. This also identifies precisely how the diffusion stiffness matrix and reaction mass matrix combine.
Expand the unknown in Fourier modes:
By Termwise differentiation of a Fourier series,
Also,
Therefore the coefficient of on the left-hand side is
The right-hand side has coefficients
because the coefficient of each of is and the constant coefficient is one. Hence the Fourier spectral system for a cosine-modulated second derivative is
Its coefficient array is an infinite tridiagonal matrix.
For a spectral truncation, retain the modes , set
and impose the displayed coefficient equation for every . This gives an explicit -dimensional tridiagonal system. The resulting finite Fourier series automatically satisfies the periodic boundary conditions.
For Cardinal cubic B-splines, the values at integer knots are
and all other knot values vanish. Since ,
This tridiagonal matrix is strictly diagonally dominant. The standard inverse bound for such a matrix gives
The minimum denominator is , so
Part (b) then yields
Let . Store the tridiagonal matrix by its diagonal , lower diagonal , and upper diagonal . The linear system is
with the nonexistent endpoint terms omitted. Initialize and . For , compute the elimination multiplier, modified pivot element, and modified right-hand side:
These recurrence relations apply the elementary row operation after the preceding row has already been reduced. The transformed linear system is an upper bidiagonal matrix:
Thus back substitution is especially short:
For , only remains. Check each pivot element before its first division, including before back substitution.
Figure 1.
Tridiagonal elimination preserves the narrow band: only one row and one diagonal coefficient change per step
. Details.
Equivalently, this constructs an LU decomposition with unit lower bidiagonal matrix , whose lower diagonal is , and upper bidiagonal matrix , whose diagonal is and upper diagonal is . The sweep is forward substitution in . There is no fill-in outside these bands when no rows are interchanged. LAPACK's DGTSV source uses these same coefficient and right-hand-side updates in its branch without row interchange.[ref]
The Thomas algorithm is Gaussian elimination specialized to a tridiagonal matrix: each row couples an unknown only to its immediate neighbours. Eliminating one unknown changes just the next diagonal entry and right-hand side. Provided all pivot elements are nonzero, a forward sweep followed by back substitution solves an -unknown linear system in time and storage, using Big O notation. Treating the same entries as a full matrix wastes the zeros: classical dense LU factorization and solve costs grow cubically for factorization and quadratically for storage.
A concrete reason to care is the Dirichlet Poisson solution by tridiagonal elimination: a three-point finite difference for the second derivative couples adjacent points on a mesh, producing precisely this tridiagonal matrix. The same structure occurs in one-dimensional Crank-Nicolson method calculations. NPTEL's archived Lecture 13 introduces the Thomas algorithm from that time-stepping problem and labels the procedure “Thomas algorithm (1949)”.[ref]
Tridiagonal solve costs 2026-10-14
For the displayed unpivoted Thomas algorithm with one right-hand side, count each scalar addition, subtraction, multiplication or division as one arithmetic operation. Forming takes five arithmetic operations per forward step. The last unknown takes one division; each remaining back substitution step takes three arithmetic operations. Thus
This is an operation-count model, excluding assignments, indexing, pivot checks and any special simplifications of the coefficients. It is not a timing benchmark. The original tridiagonal matrix needs scalar entries, and its right-hand side another . Overwriting with and with , then with , keeps storage ; the arrays, rather than the few loop temporaries, determine the total space complexity.
For repeated right-hand sides, retain the LU decomposition: computing once costs arithmetic operations, and each subsequent pair of forward substitution and back substitution sweeps costs . Hence right-hand sides cost arithmetic operations. This is the banded counterpart of Reusing LU factors for multiple right-hand sides.
An invertible matrix need not admit the unpivoted Thomas algorithm. For example,
Here and , but makes undefined. Interchanging the two equations instead gives the upper triangular matrix system , , solved immediately by back substitution. Even a nonzero first diagonal does not guarantee all later pivot elements: has determinant , yet .
For a general tridiagonal matrix, use a solver with partial pivoting when these structural guarantees are unavailable or a dangerously small pivot element occurs. Adjacent row interchanges can introduce a second upper diagonal, so a pivoted solver must track that additional fill-in; it cannot blindly continue the unpivoted recurrence relations. LAPACK's DGTSV explicitly performs partial pivoting, stores this extra upper diagonal, and includes it in back substitution. Its fixed-width storage and bounded work per row retain time for one right-hand side and storage.[ref]