Bounded two-dimensional capacitor field model Created 2026-10-14 Updated 2026-10-31
The diagrams solve an explicitly bounded Dirichlet problem in a uniform charge-free medium of constant permittivity. Take a width scale and terminal electric potential difference . Two zero-thickness ideal plate segments occupy at , with electric potentials . Fix on the entire rectangle , . This boundary is an additional enclosing equipotential, rather than a condition at infinity. The model is invariant along the omitted third direction. The connection between the electric potential, its gradient, and the charge-free Laplace equation follows from electrostatics.[ref]
On a square mesh of spacing , the finite difference method imposesat free nodes, while plate and outer nodes retain their prescribed electric potentials. There are nodes. Each plotted gap aligns exactly with the mesh; the smallest gap has 16 mesh intervals. The generators solve the resulting linear system by the conjugate gradient method, stopping when the maximum dimensionless five-point residual is below , and use central finite differences to approximate away from plate nodes.
The discrete maximum principle keeps the computed electric potential between and . Reflection checks require evenness in and oddness in ; halving tests discretization effects, while enlarging the outer rectangle tests sensitivity to its artificial boundary conditions. These are different checks: a small residual only establishes that the discrete equations were solved. Differentiating near zero-thickness endpoints is especially sensitive to the mesh, so the plots do not report a converged edge peak. No total electric charge, exact open-domain three-dimensional capacitance, or measured material property is extracted from this model.
For a bounded numerical check, compare with the plotted at midplane positions . At , the largest change in is approximately , at ; the other five sampled changes are below . At , moving the outer rectangle from to while retaining changes these samples by at most approximately . These calculated sensitivities support the qualitative comparison and expose its limits; they are not experimental uncertainties or evidence that the artificial boundary has converged to infinity.
Conjugate gradient convergence bound Created 2026-10-25 Updated 2026-10-31
For a symmetric positive-definite matrix , the Conjugate gradient method minimizes the error in the induced weighted norm over its affine Krylov subspace. Writing the error as givesFor , choose the scaled Chebyshev polynomial . On the spectral interval its numerator has absolute value at most one. With , the denominator equals . This proves the displayed bound. If the two endpoints coincide, is a positive scalar multiple of the identity and one iteration solves the system exactly.
Finite termination of conjugate directions 2026-10-31
Let be conjugate directions for a symmetric positive-definite matrix . Starting from any , minimize successively along those full lines, stopping early if the linear-system residual vanishes. The quadratic minimization along a line uses and gives .
This makes . For , conjugacy preserves . By mathematical induction, is orthogonal to all preceding search vectors. The conjugate directions are linearly independent and hence form a basis, so . Thus the method reaches the unique solution of the linear system in at most steps in exact arithmetic. The conjugate gradient method generates such directions without storing a complete prescribed basis in advance.
Krylov subspace method 2026-10-31
A Krylov subspace method seeks approximations in spaces generated by repeated matrix applications to a starting vector. For a linear system with starting point and residual , the affine search space is . Choosing an optimality or orthogonality condition within it gives different algorithms. The conjugate gradient method minimizes the energy norm of the error for a symmetric positive-definite matrix; other methods use residual minimization or different projections. The growth of the Krylov subspace can stop early when an invariant subspace is reached.
Left preconditioning Created 2026-10-18 Updated 2026-10-31
Left preconditioning multiplies both sides of the linear system by the same invertible matrix . It leaves the unknown vector unchanged. The original linear-system residual is ; the transformed linear-system residual is . Applying the transformed linear map to first computes , then solves .
For symmetric positive-definite matrices and , is generally not a symmetric matrix in the Euclidean inner product. Its positive eigenvalues alone do not justify ordinary Euclidean conjugate gradient method recurrences. The remedy is symmetric positive-definite preconditioning, implemented through the Preconditioned conjugate gradient method.
Linear-system residual Created 2026-10-06 Updated 2026-10-31
The residual of an approximate solution of is . It is the unbalanced right-hand side, while the solution error is . The conjugate gradient method makes residuals orthogonal to successive Krylov subspaces.
Matrix preconditioning Created 2026-10-06 Updated 2026-10-31
Matrix preconditioning transforms a linear system using an inexpensive auxiliary solve to improve its eigenvalues. For symmetric positive-definite matrices, a symmetric positive-definite matrix produces , preserving the symmetric structure needed by the conjugate gradient method.
A useful matrix preconditioner combines a cheap solve with favorable transformed eigenvalues; neither property alone is enough.[ref]
The aim is to make each correction more effective without making it expensive. The example under diagonal scaling for a two-dimensional linear system turns thin ellipses into nearly circular ones and makes preconditioned steepest descent effective.
Optimal fixed step for quadratic gradient descent Created 2026-10-18 Updated 2026-10-31
For a fixed symmetric matrix and positive-definite matrix , what positive step size minimizes the largest coordinate error multiplier over all eigenvector directions? Let and . Since is a convex function of , its maximum over the eigenvalues occurs at an endpoint:Balance the two extremes by solving :Here is the Euclidean norm condition number of . This balance is optimal: for the endpoint exceeds , and for the endpoint exceeds . The optimal worst-case energy factor is , rather than . This optimizes a uniform one-step bound; a particular initial error supported on fewer eigenvectors can have a different best step size.
In the example , , so and . Both eigenvalue directions attain that energy factor, making the displayed history exact. The smaller step size instead givesIts first step reaches , below for , but subsequent progress is limited by the first direction's energy factor . By , the energies are approximately and , respectively; by , the iteration is ahead. A better first step need not yield a faster long-run history.
As the condition number grows, approaches one: stability in the direction of the largest eigenvalue forces small movement along the smallest-eigenvalue direction. This is a precise reason to improve scaling or use a method such as the conjugate gradient method, rather than merely increasing the step size. When , choosing eliminates every error component in one step.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 67 6 Solution Created 2026-10-03 Updated 2026-10-31
Consider on a rectangle, with prescribed Dirichlet boundary conditions, and assume initially that the solution is smooth up to the boundary. A finite difference method chooses grid values as unknowns, approximates the differential operator by a local stencil, incorporates the boundary data, and solves the resulting sparse linear system. Accuracy of a stencil by itself is insufficient: one also needs a well-posed discrete problem, a stability estimate uniform under refinement, and a sufficiently accurate algebraic solve.
For a square grid of spacing , centered second differences give the five-point LaplacianExpanding each opposite pair in a Taylor series givesThus the standard equation has second-order normalized local truncation error. Known boundary values move to the right-hand side; they are not iterated as independent unknowns. Nonrectangular geometry requires a consistent boundary approximation rather than silently retaining a full interior stencil outside the domain.
The negative interior operator has positive diagonal and nonpositive off-diagonal entries. For a grid vector extended by zero on the boundary,The edge sum includes links to the fixed boundary. Connectivity makes the matrix positive definite, proving uniqueness and providing an energy structure. The same sign pattern gives a discrete maximum principle: at a negative interior minimum, is nonpositive. If and the boundary is nonnegative, equality can only persist by propagating that minimum through all neighbors to the boundary, a contradiction. Therefore .
On the unit square, the barrier satisfies exactly. If has zero boundary values and , apply the maximum principle to to obtainThe bound is independent of , so the consistency error gives an nodal error. It also separates the algebraic residual from the discretization error: solving the linear system much less accurately than would spoil the spatial accuracy.
A direct higher-order design is possible. In one coordinate,has fourth-order accuracy. Adding the corresponding formula in the other coordinate gives a wider stencil. Its advantages must be balanced against boundary closures, more distant couplings, and the possible loss of monotonicity. Higher order does not automatically imply a stable or geometrically convenient scheme.
The Mehrstellen method takes a different route: it uses the Poisson equation to eliminate leading truncation derivatives while keeping a compact unknown stencil. Define the nine-point finite-difference stencilHere each sum has four terms. Equivalently . Expanding givesThe uncorrected nine-point operator is only second order for a general function. But implies . Moving this known leading defect to the source and approximating its Laplacian with givesIndeed , and multiplication by makes that replacement's error fourth order. In explicit compact form the right-hand side is . Only known source samples, not additional distant solution unknowns, enter this correction. The corresponding unscaled stencil residual is . If , the leading term already vanishes, which explains harmonic superconvergence of the nine-point stencil.
For zero boundary data, has axial link weights and diagonal link weights . Their energy sum proves positive definiteness, and their sign pattern again proves the discrete maximum principle. The same quadratic barrier is exact for , soFor smooth solutions and accurately imposed boundary values this proves fourth-order nodal convergence of the corrected scheme. Singular corners, rough sources or low-order boundary treatment can reduce the observed rate; a formal interior expansion is not a global regularity theorem.
More generally, compact high-order schemes choose a solution stencil and a source stencil together, match their Taylor expansions, and use differentiated forms of the PDE to remove derivatives that would otherwise need a wide solution stencil. Variable coefficients require their derivatives and mixed terms to be treated consistently; the constant-coefficient identity cannot be reused unchanged for a different elliptic operator. On irregular meshes, conservation and consistent fluxes may be more useful starting points than a symmetric Cartesian formula.
Finally, discretization and solution cost are coupled. The five-point Dirichlet matrix has eigenvalues proportional to sums of squared sine frequencies, so its smallest eigenvalue stays of order one while its largest is . Its condition number grows like ; simple relaxation therefore becomes slow. Sparse direct elimination, conjugate gradient method with appropriate matrix preconditioning, and the multigrid method are alternatives. A sound design combines local accuracy, boundary fidelity, mesh-independent stability, and an algebraic solver whose residual is small enough for the intended error tolerance.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 67 7 Solution Created 2026-10-03 Updated 2026-10-31
The multigrid method addresses a characteristic failure of single-grid relaxation: its cheapest updates rapidly remove oscillatory error but barely change smooth error. For example, the one-dimensional Poisson equation matrix has diagonal . The weighted Jacobi method with weight has Fourier error factorAt low physical frequency, and this factor is , requiring sweeps for a fixed error reduction. With , high grid frequencies are multiplied by at most in modulus. Smooth error on a fine mesh is well represented on a coarser mesh, where it is relatively more oscillatory and hence cheaper to remove. These two complementary mechanisms motivate smoothing and coarse-grid correction.
Write the discrete problem as . For an approximation , the residual is and the error satisfies . It is this error equation that is transferred to a coarse grid; restricting the approximate solution alone would not solve the missing error. With prolongation and restriction , solveFor nested Cartesian grids with , linear interpolation copies a coarse value at a coincident fine node and averages the two nearest coarse values at an intermediate node. Its two-dimensional counterpart is bilinear interpolation. Full-weighting restriction uses weights in one dimension andin two dimensions. With these choices in ordinary coordinate inner products. A Galerkin coarse-grid operator is ; alternatively one can rediscretize the PDE on the coarse mesh when that choice remains compatible with the transfers.
For a symmetric positive-definite fine operator and , the exact correction matrix isIt satisfies and . Thus it removes the coarse-space component of the error and is an orthogonal projection in the energy inner product. With pre- and post-smoothing matrices , the exact two-grid error matrix is . Effective smoothing on the complementary space and accurate coarse representation of smooth error are both needed for contraction.
A concrete harmonic calculation makes the mechanism quantitative. On the one-dimensional constant-coefficient problem, couple the two harmonics and , put and , and use the above transfers. Linear interpolation has harmonic weights , while the fine operator has diagonal symbol . Therefore its Galerkin correction on this pair isOne pre- and one post-sweep of weighted Jacobi with gives , . This rank-one matrix has eigenvalues zero andThe two-grid Poisson factor with weighted Jacobi is therefore mesh-independent in this model. A periodic constant nullspace must first be removed; a Dirichlet problem has no such nullspace. This is evidence for the design, not a claim that the same factor applies to every PDE or every smoother.
The geometric multigrid V-cycle replaces the exact coarse solve by one recursively defined coarse cycle. A complete implementation on level proceeds as follows:
- On the coarsest level, solve directly and return.
- Otherwise perform a fixed number of pre-smoothing sweeps, for example .
- Compute the current residual and restrict it: .
- Initialize the coarse error approximation at zero and apply one V-cycle to .
- Prolong and add the correction: .
- Perform post-smoothing sweeps and return the improved approximation.
Boundary values of the solution are imposed on the fine level; the error equation has homogeneous boundary conditions when those values were already imposed exactly. Residuals must be computed after pre-smoothing, not before. The zero initialization on each recursive error solve makes the cycle an error correction rather than an accidental addition of an old coarse solution. For an energy-symmetric cycle usable in conjugate gradient method, choose compatible adjoint transfers and symmetric smoothing, such as forward Gauss-Seidel before correction and its backward sweep afterward.
With bounded stencil size and fixed sweep counts, a sweep, residual calculation or transfer costs . Uniform coarsening gives , soIf the full V-cycle has an error reduction factor independent of mesh size, reducing an arbitrary initial algebraic error by a factor takes cycles and work. Linear work per cycle alone does not prove the mesh-independent factor; it rests on the smoothing and approximation properties just illustrated. Full multigrid starts on a coarse mesh, interpolates its solution to each successive finer mesh, and uses a few cycles per level. When the interpolation accuracy and cycle contraction match the discretization error, this reaches discretization-level accuracy in work.
Performance depends on the operator. Strong anisotropy can leave error oscillatory in one direction but weakly penalized by the differential operator, defeating point smoothing; line or plane relaxation and selective coarsening address this. Large coefficient jumps demand compatible coarse spaces. Nonrectangular meshes motivate algebraic rather than purely geometric coarsening. Nonlinear problems use a full-approximation formulation instead of the linear residual correction verbatim. Singular Neumann or periodic operators need right-hand-side compatibility and consistent nullspace treatment on every level. Multigrid is fast because its components address different error scales, not because coarsening alone guarantees a good solver.
Past exam of the mathematics course of the University of Cambridge 2015 ii Paper 4 37E b Solution Created 2026-09-24 Updated 2026-10-31
The linear-system residual at an approximate solution is . For symmetric positive definite , the conjugate gradient method has and minimizes the squared -norm of the error over that affine space; its residual is orthogonal to .
If has distinct eigenvalues, interpolate on them with a polynomial of degree at most . The finite-dimensional spectral theorem gives , so the exact correction lies in . The minimum possible error at step is therefore zero. Thus in exact arithmetic, possibly earlier if the initial residual has fewer eigencomponents. If , it terminates immediately.
A symmetric positive definite matrix preconditioner changes the system to , with ; practical preconditioned CG applies solves with . It can accelerate convergence by reducing the spectral condition number of a positive-definite matrix, which improves the usual bound involving , and by clustering eigenvalues, which allows low-degree residual polynomials small on the spectrum even when the extreme-eigenvalue bound is pessimistic.
Choosing makes the transformed matrix , so one step suffices. But applying already requires solving the original problem, and constructing an exact factorization generally incurs its original computational cost. It is therefore not a useful shortcut for a single unsolved system, though an available factorization can be reused for multiple right-hand sides. Effective matrix preconditioning balances spectral improvement against inexpensive application.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 2 40E b Solution Created 2026-09-24 Updated 2026-10-31
For an iterate , the conjugate gradient method residual isTwo fundamental properties are the Conjugate-gradient residual orthogonality conditionsEquivalently, the residuals generated before convergence are mutually orthogonal and span the successive Krylov spaces.
Since has only distinct eigenvalues, its minimal polynomial has degree at most . ConsequentlyThe two properties then put both inside and orthogonal to , so . Hence , and
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 3 40C a Solution Created 2026-09-24 Updated 2026-10-31
Forthe gradient is . The steepest descent method with exact line search for a positive-definite quadratic therefore uses
For and , the minimizer is . PutStarting from , direct substitution gives and, inductively,The Euclidean norm is unchanged by the alternating sign, soFor a positive-definite matrix, the spectral condition number of a positive-definite matrix isHere , and hence
The conjugate gradient method starts with and updatesBy finite termination of the conjugate gradient method, it reaches the exact solution in at most the number of distinct eigenvalues. This matrix has two, so at mostare required in exact arithmetic.
For a symmetric positive-definite matrix, the conjugate gradient method chooses the unique point in minimizing the energy norm of the error. Equivalently it minimizes on that affine space. Here and .
Choose the eigenbasis orthonormally, as the spectral theorem permits, and write . By part (a), every admissible error is , , . Orthogonality then givesThus the implicit CG polynomial minimizes exactly the displayed weighted sum. Strictly, the printed hypothesis that the eigenvectors are individually normalized must be supplemented by mutual orthogonality when eigenvalues repeat. Otherwise cross terms within a repeated-eigenvalue eigenspace need not vanish. An orthonormal eigenbasis always supplies the intended formulation.
If at most eigenvectors contribute to , a polynomial with one factor for each distinct contributing eigenvalue is admissible by step and makes that error zero. CG minimizes a nonnegative quantity, so .
For the last question, write with eigenvalues , . The first polynomial has the form . Differentiating its weighted objective givesIf the high-eigenvalue component is not exceptionally small, the -weighted terms dominate and , so : the first step mainly removes the high-eigenvalue error. This is the spectral weighting of conjugate gradient error. The expectation is conditional on the coefficients, not guaranteed by the two eigenvalues alone; if , the first step instead solves the low-eigenvalue component exactly.
The energy norm associated with this symmetric positive-definite matrix isIt is the norm induced by the inner product . The conjugate gradient method minimizes this error norm over its successive affine Krylov subspaces.
Past exam of the numerical linear algebra course of the University of Oxford 2025 3 b iii Solution 2026-10-25
The least-squares normal equations areThe full column rank of gives for nonzero , so is a symmetric positive-definite matrix. Apply the Conjugate gradient method to this linear system. To verify that its solution is the desired one, let solve the displayed equations. Then , and for any the Pythagorean identity givesThus is the unique minimizer of the linear least-squares problem.
One can apply without forming the Gram matrix: compute . More explicitly, initialize , , ; until the linear-system residual vanishes, use the Conjugate gradient method recurrenceEach dense application of this way costs operations. The condition number satisfies , where ; this is the conditioning cost of the least-squares normal equations.
Preconditioned steepest descent Created 2026-10-18 Updated 2026-10-31
For fixed symmetric positive-definite matrices and , preconditioned steepest descent minimizes along the direction supplied by the auxiliary solve. Given , form the linear-system residual . If , stop: . Otherwise solve and useThis is exact line search for a positive-definite quadratic along . Indeed,whose derivative vanishes at the displayed positive step size. Unlike the Preconditioned conjugate gradient method, it uses the fresh directly rather than combining it with a previous conjugate direction.
For diagonal scaling for a two-dimensional linear system, start at . Without matrix preconditioning, take : , , andWith the Jacobi preconditioner , , , andThe original linear-system residual becomes much smaller after this correction. Quantify progress in the same energy norm in both cases: and . Exact substitution givesIn this particular example the entire histories are and . To check that this is exact, the next step sizes are and , respectively, and their residual updates give and . Multiplying a linear-system residual by a nonzero scalar leaves the next step size unchanged; every pair of steps repeats the same directions at a smaller scale. The two first-step energy ratios then establish these formulas for all .
The curves come from exact rational updates of the specified linear system, converted to decimal values for plotting. The left panel counts iterations. The right panel declares one unit for applying and one unit for the auxiliary diagonal solve, charging one unit per unpreconditioned step and two per preconditioned step. It excludes setup and vector operations, so it compares a declared cost model rather than measured runtime. Scaling is advantageous even with that extra charge.
These curves compare steepest descent method iterations. On this two-dimensional linear system, both the conjugate gradient method and the Preconditioned conjugate gradient method terminate within two steps in exact arithmetic. The plot therefore establishes no CG iteration-count advantage for this example; the benefit of scaling for larger problems depends on their eigenvalues and auxiliary-solve costs.
For a symmetric positive-definite matrix, choose an orthonormal eigenbasis and write the exact solution as . Starting at zero, the conjugate gradient method chooses an admissible polynomial of degree at most the iteration count that minimizes the displayed error. The weights depend on both the eigenvalues and the solution coefficients. For two eigenvalues , the first polynomial is , with . Comparable nonzero coefficients and large give , so the high-eigenvalue error is removed first. A sufficiently tiny high-mode coefficient changes this behavior; the spectrum alone does not determine the first step.
Strict feasibility for conic duality Created 2026-10-14 Updated 2026-10-31
For a proper cone , suppose a point satisfies and is finite. This generalized Slater condition gives strong duality and attainment of the conic dual problem's optimum. It does not by itself assert primal attainment.[ref]
Convex Optimization by Stephen Boyd and Lieven Vandenberghe. §5.9.1, printed p. 265: generalized Slater condition, strong duality and dual attainment
The two worked examples have strict primal points: has slack in the interior of the nonnegative orthant, and has slack in the interior of the second-order cone. Both optima were already certified by explicit feasible pairs. Slater's condition explains why a matching optimal dual variable can be expected under these hypotheses; checking a supplied zero-gap pair needs only weak duality.
Changing cone geometry preserves the bound mechanism. For a positive semidefinite cone, the dual cone pairing is the Frobenius inner product of two matrices. This connects the same certificate idea to semidefinite programming, while the central path uses strictly interior primal and dual points to approach vanishing gap.
In 1995, Lieven Vandenberghe and Stephen Boyd presented a primal-dual interior-point method for convex optimization with matrix inequalities. Their algorithmic study included exploiting problem structure and allowing incomplete conjugate gradient method solves within an iteration. This illustrates how the primal-dual viewpoint guides computation as well as checking a final answer.[ref]
A Primal-Dual Potential Reduction Method for Problems Involving Matrix Inequalities by Lieven Vandenberghe and Stephen Boyd. Publication record and authored abstract: A Primal-Dual Potential Reduction Method for Problems Involving Matrix Inequalities, Mathematical Programming, Series B, 69(1), 205–236 (1995)
Symmetric positive-definite preconditioning Created 2026-10-18 Updated 2026-10-31
Let and be real symmetric positive-definite matrices. The principal square root of a positive semidefinite matrix construction gives an invertible matrix for each. SetThen is equivalent to . This is a matrix congruence, and is a symmetric positive-definite matrix: , and for every nonzero vector ,since . This short proof establishes both requirements for applying the conjugate gradient method to the transformed linear system.
The left transformed matrix has the same eigenvalues becauseIts correct geometry uses the weighted inner product : . Thus it is symmetric in this inner product, even when it is not a symmetric matrix in ordinary coordinates. The spectral condition number governing the transformed symmetric problem is , not generally .
The Preconditioned conjugate gradient method realizes this transformation using auxiliary solves , without constructing or its matrix inverse. With fixed , initialize and ; while , usethen solve and setStop at a zero linear-system residual before forming another ratio. Positive definiteness makes the denominators positive before termination.[ref]
Notes for Ma221 Lecture 15, Dec 1, 2023. Math 221, Matrix Computations, Fall 2023; Notes for Ma221 Lecture 15, Dec 1, 2023; PDF p. 1, equivalent symmetric system and Preconditioned CG algorithm
An invertible matrix alone is insufficient: with and , the left transformed matrix has eigenvalues , and has no real symmetric positive-definite matrix square root. Even a valid symmetric positive-definite matrix can worsen conditioning if its scaling is unsuitable, as the next worked example shows.
