The Linear Algebra Problem and Evaluation Strategies
Summary
The numerical task of Part III is to solve the symmetric positive-definite (spd) linear system — equivalently to invert or minimise a convex quadratic. A solver is a numerical agent whose only allowed observations are matrix-vector products : it chooses which vectors (search directions) to multiply, and each product is one datum. This note sets up the problem, the “least-squares” optimisation view, the evaluation/action framework of iterative solvers, and the structural skeleton
LinSolve_Projectthat all later probabilistic solvers refine.
Overview
Linear algebra (solving systems, inverting and decomposing matrices) is the bedrock on which almost all heavyweight numerical computation is built. Part III makes a deliberate simplification: computations are assumed exact (arbitrary precision), so all questions of numerical stability are set aside. What remains is a pure question of epistemic uncertainty: given a computer that can form matrix-vector products, what is the most efficient way to extract information about the solution of a linear system?
The recurring thesis of the whole part: classical iterative solvers (in particular Conjugate Gradients) are the posterior-mean estimators of a Gaussian inference procedure — they are probabilistic numerical methods, and can be read as agents deciding which matrix-vector products to observe. This note builds the problem statement (Ch. 16) and the action–observation scaffold (Ch. 17) on which that reading rests.
A key warning from Ch. 14 (Key Points): despite the name “linear” algebra, matrix inversion is a nonlinear operation. Unlike integration — where the integral is a linear functional of the integrand, so latent and observable live in one joint Gaussian — here the latent quantity ( or ) is a nonlinear function of the observed matrix . This forces a conscious modelling choice (model , or model /) that structures the entire part.
Main Content
The problem
The spd linear problem ^def-problem
Given a symmetric positive-definite matrix (so and for all ) and a right-hand side , find solving
Because is spd it is invertible; its inverse is given a dedicated symbol
("" is historic convention for inverse Hessians). Solving for general means finding ; solving for one specific means finding the single vector .
Symbols: = dimension; = system matrix (spd); = right-hand side; = sought solution; = matrix inverse.
Least-squares / quadratic form ^def-quadratic
Equation (16.1) is equivalent to the unconstrained minimisation of the convex quadratic
whose unique minimiser is . Its gradient is the residual
and its Hessian is the constant matrix . The problem is solved iff . The terms “residual” and “gradient” are used interchangeably.
This dual view (linear system convex quadratic minimisation) is the bridge to Part IV: least-squares estimation underlies Gaussian process regression (§4.2), and estimating spd Hessians and their inverses reappears in nonlinear optimisation. Iterative linear solvers connect to eigen/singular-value decompositions through the Krylov sequence.
Why iterative, anytime solvers?
The “pedestrian” solution is Gaussian elimination (LU decomposition, ), applicable to any solvable system, numerically stabilised by pivoting. But it is not an “anytime” algorithm: it only yields a correct answer on completion. Stopped at step , its intermediate estimate error can actually grow, converging only suddenly at step (Hestenes & Stiefel, 1952).
Iterative solvers (prototype: Conjugate Gradients) instead continuously improve an initial guess , with cost per step, so they can be stopped at and already provide a good estimate. This “improve a point estimate over the run” behaviour is exactly what a probabilistic solver needs — it is what lets us assign uncertainty to an incompletely solved problem.
Conjugate Gradients (CG), basic form ^ex-cg-alg
CG(A(·), b, x₀)(Algorithm 16.1). Initialise , , . For :
- — compute direction
- — the one matrix-vector multiplication (the expensive step)
- — optimal step size
- — rescale step
- — rescale observation
- — update estimate
- — new gradient/residual
- — conjugate correction
The dominant cost is the single product ; every other line is or . Two control parameters: (how the observed projection updates ) and (which projection to take next). This split of “estimation” (, inference) from “action” (, policy) is the agent structure reused from the integration chapter — see The Numerical Agent.
Evaluation strategies: matrix-vector products as observations
A probabilistic linear solver mimicking CG’s structure proceeds by collecting observations of matrix-vector products for smartly chosen vectors (called search directions or projections). Collecting the as columns of and the as columns of , the whole observation set after steps is
After each step the solver holds a posterior , used both to form an estimate and to choose the next action .
Consistency of the estimator ^def-consistency
The minimal assumption on the (as-yet-abstract) inference scheme is that it is consistent with the observations: it puts zero measure on all matrices with . Consequently, any reasonable point estimators (for ) and (for ) must satisfy
The crucial policy question: how should the solver choose the next action ?
Direct methods choose a priori, independent of observations (e.g. random directions, or unit vectors giving sparse cheap projections z_i=A_ in linear time). Nyström approximation, inducing-point and spectral methods, and Gaussian/LU/Cholesky decompositions all fall here. Cost of steps is . Downside: they cannot adapt to the matrix’s structure, so a badly calibrated prior gives a bad estimate.
Iterative methods (the focus) use collected directions to converge to the exact solution; each step costs (one generic matrix-vector product), so steps cost .
Building the iterative skeleton
For any estimate , the update solves the problem exactly if is known. Since the solver only has an estimate , this suggests the estimation update rule
with inference on left abstract. The action rule chooses the next projection. A natural choice couples the two:
This lets the residual be updated in time without a second matrix-vector product:
Intuition (Fig. 17.1): the residual is the gradient of , i.e. the direction of maximal improvement — so following it (mapped through ) is sensible, provided does not destroy that property.
Optimal step size (symmetric )
Parametrising , the derivative of in is , which vanishes at
At this the new gradient is orthogonal to : . This costs one extra division using the already-computed .
LinSolve_Project— the structural skeleton (Algorithm 17.2)
LinSolve_Project(A(·), b, p(A)): initialise , . For :
- — direction
- — observe
- — optimal step
- ; 5. ; 6. ; 7.
- — estimate the inverse (placeholder)
This differs from CG (Algorithm 16.1) only in lines 5 and 12 — the inference step is left abstract. It is the skeleton for the rest of Part III: §19 fills in the
Inferstep with concrete Gaussian rules; §18 shows which choices reproduce classic solvers.
Examples
Residual bookkeeping trick
Because , an iterative solver needs only one matrix-vector product per step (to compute ) yet obtains both the new estimate and its exact residual. This is the “smart book-keeping” that makes linear algebra cheap: the observation simultaneously drives the estimate update, the step-size, and the next residual.
Why calibration is hard here (Ch. 14 key point)
A matrix is a big object: an matrix has degrees of freedom. After linearly-many matrix-vector projections, the solver identifies only of them, learning nothing about the other directions of the matrix. So while the point estimate converges quickly, honest uncertainty over the unexplored remainder is intricate — the subject of Uncertainty Calibration for Linear Solvers.
Connections
- Design trade-off (Ch. 14 wider point): a good computational prior balances constraints from knowledge (e.g. that is spd) against constraints from computation. Even known-true facts (like positive-definiteness) may be counter-productive to encode if doing so makes inference much more complex.
- The action/observation split mirrors The Numerical Agent and the active integration policies of Active Bayesian Quadrature and Bayesian Monte Carlo.
- The optimisation reading of (16.2)–(16.3) directly connects to The Local Optimisation Problem and second-order methods.
See Also
- Classic Linear Solvers - A Review — casts
LinSolve_Projectas projection / conjugate-direction / Krylov methods. - Probabilistic Linear Solvers - Algorithmic Scaffold — fills the abstract
Inferstep with Gaussian inference over //. - Conjugate Gradients as Probabilistic Inference — the equivalence theorem for the skeleton above.
- Gaussian Distributions and Algebra — the conditioning machinery used for
Infer. - The Numerical Agent — estimation-vs-action decomposition reused here.
- The Integration Problem — contrast: there latent and observable are jointly Gaussian; here inversion is nonlinear.