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 asIf is an invertible matrix, define its Schur complement . Then is an invertible matrix exactly when is an invertible matrix, andThe order of the matrix products matters. In particular, the lower-right block is , rather than generally : the coupling through and changes the response.[ref]
Convex Optimization by Stephen Boyd and Lieven Vandenberghe. Appendix A.5.5, printed p. 650: inverse of a symmetric block matrix; §C.4.1, printed p. 673: elimination for general blocks
For an original example, takeThe Schur complement is . Substitution gives the concise answerMultiplying in either order gives the identity matrix; the lower-right entry is , whereas . The difference records the feedback through the two eliminated variables.
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]
Convex Optimization by Stephen Boyd and Lieven Vandenberghe. §C.4.1, printed pp. 672–675: Algorithm C.4, factor-solve interpretation and dense complexity comparison
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 exampleIts exact solution is the quadratic polynomial . Use a uniform mesh with and three interior unknowns . The finite difference method replaces the negative second derivative byMultiplying by and moving the prescribed Dirichlet boundary conditions to the right givesThe endpoint values contribute and to the first and last equations; they are not additional unknowns. The Thomas algorithm givesand back substitution yieldsAll 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.
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 givesThe boundary term is zero. Thus the weak formulation is to find such thatThe 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]
https://ocw.mit.edu/courses/18-085-computational-science-and-engineering-i-fall-2008/676ba0a00eef45a6cb3823c4da61ee11_18-085F08-L18.pdf. Strang, MIT 18.085, Lecture 18, transcript pp. 2–8: weak form, hat basis, and assembly
Take the uniform finite element mesh , , with . The continuous trial space isHere 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 matrixThe 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 exactlyThus 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.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 69 5 b Solution Created 2026-10-03 Updated 2026-10-14
The sine vectors , , simultaneously diagonalize these two symmetric tridiagonal matrices. Their eigenvalues areThus 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 isAs 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.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 67 5 b Solution Created 2026-10-03 Updated 2026-10-14
The B-spline collocation matrix in the cubic case is the finite tridiagonal matrixFor , 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 serieshas nonnegative entries and proves invertibility. Since , its absolute entries equal those of . The absolute row sums are therefore the entries of .
The equation becomesIts constant particular solution is ; the two characteristic roots of the homogeneous recurrence are and . Imposing the two boundary values givesThis 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 isEquivalently, 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.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 341 5 iii Solution Created 2026-10-03 Updated 2026-10-06
Put and . The interior piecewise-linear hat functions areThey 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 isThus, with , the requested scalar equations areAt 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.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 216 3 b i Solution Created 2026-10-03 Updated 2026-10-05
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 toIts Gaussian autoregressive conditional precision is the tridiagonal matrix withCombining this prior with and completing the square givesThe 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 .
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 341 3 b Solution Created 2026-10-03 Updated 2026-10-05
Let be the tridiagonal matrix with diagonal two and adjacent entries minus one, incorporating zero Dirichlet boundary conditions. The actual PDF scheme isAn orthonormal basis of eigenvectors of has components , and substitution givesThey 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).
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 341 4 b Solution Created 2026-10-03 Updated 2026-10-05
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 . ThusThe generator is a skew-Hermitian matrix. ConsequentlyThe 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 givesApplying 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.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 341 5 c Solution Created 2026-10-03 Updated 2026-10-05
The piecewise-linear hat functions have disjoint supports unless their nodes coincide or are neighbours. Direct integration on the two adjacent intervals givesSince and the hat is symmetric about , its load is . Thus the reaction-diffusion finite element matrix gives the explicit equationsThe 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 givesBoth terms are positive for the Dirichlet modes. This also identifies precisely how the diffusion stiffness matrix and reaction mass matrix combine.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 4 39C a Solution Created 2026-09-24 Updated 2026-10-03
Expand the unknown in Fourier modes:By Termwise differentiation of a Fourier series,Also,Therefore the coefficient of on the left-hand side isThe right-hand side has coefficientsbecause the coefficient of each of is and the constant coefficient is one. Hence the Fourier spectral system for a cosine-modulated second derivative isIts coefficient array is an infinite tridiagonal matrix.
For a spectral truncation, retain the modes , setand 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.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 318 3 c Solution 2026-09-25
For Cardinal cubic B-splines, the values at integer knots areand all other knot values vanish. Since ,This tridiagonal matrix is strictly diagonally dominant. The standard inverse bound for such a matrix givesThe minimum denominator is , soPart (b) then yields
Tridiagonal elimination recurrences 2026-10-14
Let . Store the tridiagonal matrix by its diagonal , lower diagonal , and upper diagonal . The linear system iswith 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.
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] Tridiagonal matrix algorithm 2026-10-14
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]
Thomas algorithm (NPTEL Lecture 13). Lecture 13, Thomas algorithm: opening historical attribution and Crank Nicolson motivation
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. ThusThis 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]DGTSV (LAPACK 3.12.1) by LAPACK project. DGTSV, Purpose lines 34–39; DL argument lines 63–69; adjacent interchange lines 188–199; back solve lines 295–305



