Affine-weighted hat mass matrix Created 2026-10-06 Updated 2026-10-07
On a one-dimensional uniform finite element mesh of spacing , let be an affine function and the interior piecewise-linear hat functions. The weighted mass matrix has entriesand zero entries for nonadjacent indices. The diagonal product is symmetric about and integrates to ; the neighbouring product is symmetric about and integrates to . The odd part of an affine function integrates to zero around each centre, giving the formulas. This evaluates a variable reaction term exactly without substituting a constant coefficient or a quadrature approximation.
Finite element 2026-10-05
A finite element specifies a reference region, a finite-dimensional space of local trial functions, and degrees of freedom that uniquely determine each such function. Assembling compatible copies over a finite element mesh gives a global trial space. For a one-dimensional linear element, the region is an interval, the functions are affine functions, and the degrees of freedom are the endpoint values.
Finite element mesh Created 2026-10-05 Updated 2026-10-14
A finite element mesh partitions a domain into simple regions called elements, such as intervals, triangles or tetrahedra. In a conforming partition, distinct element interiors are disjoint, their closures cover the domain closure, and any nonempty intersection is a common face, edge or vertex of both elements. Chen's author notes give this compatibility condition for simplicial meshes.[ref]
https://webapps.math.uci.edu/~chenlong/226/Ch2FEM.pdf. Long Chen, Introduction to Finite Element Methods, §2.1, pp. 3–4; updated January 17, 2024
Local piecewise polynomial functions and local integrals are defined on these regions; compatible degrees of freedom join them into a global conforming finite element space. The assembled stiffness matrix and mass matrix then inherit the local overlap pattern.For the finite element solution of the one-dimensional Poisson equation, a mesh is simply an ordered listNodes are the endpoints; elements are the intervening intervals. Four equal elements have five nodes but only three unknown nodal values after imposing the zero Dirichlet boundary conditions. A nonuniform partition such as has element lengths and , so counting elements alone does not measure the largest unresolved scale.
Refining a finite element mesh replaces some or all elements by smaller ones. For continuous piecewise linear functions in one dimension, retaining all old nodes gives nested conforming finite element spaces when every interval is bisected. The old approximation remains available, and the new interior nodes allow additional changes of slope. With a symmetric coercive bilinear form and exact integration, best approximation from Galerkin orthogonality means that the energy norm error cannot increase under such nested refinement.
For the finite element solution of the one-dimensional Poisson equation, uniform refinement from four to eight elements increases the unknown count from three to seven. The exact formulas give maximum errors and , and energy norm errors approximately and . Refinement near a region of strong curvature can spend unknowns where the linear interpolation error matters most; convergence in a general problem still needs approximation and regularity assumptions such as those in the finite element interpolation estimate.
Finite element method Created 2026-09-28 Updated 2026-10-14
The finite element method replaces an infinite-dimensional weak formulation by finitely many unknowns attached to a finite element mesh. Simple local functions, often piecewise polynomial functions, join to form a global approximation. The attraction is that each finite element can be integrated separately, while the assembled equations enforce a global balance. A piecewise-linear hat function only meets its immediate neighbors, so a large problem can have a sparse matrix rather than a dense one. Gilbert Strang's MIT lecture develops this connection from the one-dimensional weak formulation through local hats to the stiffness matrix and load integrals.[ref]
https://ocw.mit.edu/courses/18-085-computational-science-and-engineering-i-fall-2008/676ba0a00eef45a6cb3823c4da61ee11_18-085F08-L18.pdf. Gilbert Strang, MIT 18.085, Lecture 18: Finite Elements in 1D, transcript pp. 2–8, 2008; accessed 2026-10-11
For the conforming Galerkin method, let be a real Hilbert space, a bounded coercive bilinear form, and a bounded linear functional. Given a conforming finite element space , the continuous and discrete problems areWriting in a basis of gives the linear systemHere is the stiffness matrix and is the vector of loads tested against the basis functions. The Galerkin method uses the same trial and test space in this construction. Finite element methods also use the Petrov-Galerkin method, with different trial and test spaces; testing against the trial space is therefore a property of this construction, rather than a definition of every finite element method.
The finite element solution of the one-dimensional Poisson equation below gives every entry explicitly. Refining the finite element mesh then improves the approximation by adding local degrees of freedom. For a symmetric coercive bilinear form, Galerkin orthogonality makes the discrete solution the best approximation in the energy norm; the geometry of orthogonal projection explains why this local construction yields a globally meaningful answer.
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.
For a conforming triangular finite element mesh, takeThis is the quadratic conforming finite element space. Across a common edge of a polygon, the restrictions from neighboring triangles are univariate quadratic polynomials. Their agreement at the two endpoints and the midpoint makes their difference a degree-at-most-two polynomial with three distinct roots of a polynomial, so it vanishes on the entire common edge of a polygon. Thus matching the local finite element degrees of freedom produces the required continuity. Similarly, setting the three nodal values on every boundary edge carrying the Dirichlet boundary condition to zero makes its entire restriction vanish.
Continuity across element interfaces means the piecewise gradients give the global weak gradient, with no jump contribution, so . There are finitely many local finite element degrees of freedom, hence is finite-dimensional. The Galerkin method seeksThe bounded bilinear form and coercive bilinear form estimates from part (b) remain valid on . Since a finite-dimensional subspace is closed, the Lax-Milgram theorem gives exactly one . Alternatively, the stiffness matrix plus the mass matrix is a positive-definite matrix in any basis of . The same existence and uniqueness conclusion holds for any finite-dimensional vector subspace of this full space.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 72 1 a Solution Created 2026-10-03 Updated 2026-10-14
Multiply by a test function vanishing at the endpoints and apply integration by parts. The positive operator is , so the forcing changes sign. The weak formulation of this forced Airy boundary-value problem is: find such thatHere is the zero-boundary Sobolev space and can be equipped with . The interval Poincaré inequality states , so this norm makes a Hilbert space and is equivalent to its usual Sobolev norm. The form is symmetric and satisfiesThe Lax-Milgram theorem says that a bounded coercive bilinear form on a Hilbert space and a bounded linear functional determine exactly one weak solution. All its hypotheses have just been verified. Moreover, gives on the interval; the right-hand side is then continuous, so this weak solution is the classical solution with the prescribed endpoint values.
Since the form is symmetric, the equivalent Ritz method minimizesIndeed, stationarity gives the weak equation andwith equality only at . This proves the minimization equivalence, including the sign of the linear term.
Restricting to a conforming finite element space gives a unique discrete solution and Galerkin orthogonality, for every . The Céa lemma states that if the continuity and coercivity constants are and , then . For this symmetric problem the exact best-approximation constant in the energy norm is one. The piecewise-linear finite element interpolation estimate on regular finite element meshes therefore gives convergence of a numerical method of the Ritz method, with first-order error in the energy norm.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 72 1 b Solution Created 2026-10-03 Updated 2026-10-14
Take a uniform finite element mesh , , , and interior piecewise-linear hat functions . Write . The Ritz method gives withThe derivative part has diagonal , neighboring entries and zero other entries. For the affine-weighted hat mass matrix, symmetry around givesOn , the product of the two hats is symmetric about the midpoint, integrates to , and therefore has weighted integralConsequently the explicit tridiagonal equations arefor , with . The reaction coefficient has been integrated exactly; replacing it by an unweighted constant mass matrix would give a different system. For a nonzero coefficient vector, the represented function is nonzero and , so the matrix is symmetric positive-definite and the algebraic solution is unique.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 341 6 Solution Created 2026-10-03 Updated 2026-10-14
The starting point of a conforming finite element method is a weak formulation in a Hilbert space . For example, a homogeneous Dirichlet boundary condition on a bounded Lipschitz domain gives . One seekswhere is a bounded bilinear form, , and is a bounded linear functional. A conforming finite element space is finite dimensional and is typically built from functions that are polynomial on each element of a finite element mesh. With a basis , the Galerkin method imposes the same identity only for , givingThe stiffness matrix is sparse when basis supports overlap only locally. Local element integrals assemble its entries; the mass matrix represents an term. This separates the choice of trial functions from the variational principle determining their coefficients.
The fundamental well-posedness theorem is the Lax-Milgram theorem: if for some , there is a unique solution for each , with . The same theorem on gives a unique discrete solution. The constants must be independent of the mesh for uniform stability of a numerical method. Boundary conditions are built into the trial space when they are essential constraints; flux conditions arise through boundary terms in integration by parts and are natural constraints in the weak formulation.
When is symmetric and a coercive bilinear form, the Ritz method minimizesover . Its first variation is exactly the Galerkin method, so Ritz minimization and Galerkin testing coincide for symmetric coercive problems. The energy norm turns the approximation into an orthogonal projection. Indeed, subtracting the exact and discrete weak equations gives Galerkin orthogonality, . For every the Pythagorean identity becomessoThis exact best-approximation property is the central advantage of the Ritz method.
Symmetry is unnecessary for the Galerkin method. For any bounded, coercive form, the Céa lemma givesTo prove it, put . Galerkin orthogonality yields , so coercivity and boundedness give . Divide when and take the infimum. Thus approximation capability plus uniform coercivity gives convergence. In contrast, minimizing for a nonsymmetric form differentiates its symmetric part and generally does not solve the original weak equation.
A concrete symmetric example is the one-dimensional reaction-diffusion problem from Question 5. Continuous piecewise-linear hat functions give the diffusion stiffness matrix with diagonal and neighbouring entries , and the mass matrix with diagonal and neighbouring entries . Therefore and . Its positive-definite matrix is the coordinate form of the continuous energy. The exact smooth solution makes this an explicit test of the method, not just an abstract existence result.
For a nonsymmetric example, take positive , constant real , andIts form is . Since , it has coercivity constant in the full norm, although it is not symmetric when . The Galerkin method remains well posed. On the uniform hat basis, , where , and . The skew-symmetric matrix cancels from , proving nonsingularity. A Ritz energy would omit precisely this advection contribution. Small may nevertheless make the approximation constant large and produce poorly resolved layers; algebraic solvability is not an accuracy guarantee.
Quantitative convergence uses a finite element interpolation estimate. On a shape-regular mesh, for piecewise-linear conforming elements and in the usual low-dimensional setting,The Céa lemma therefore gives an energy error. The Aubin–Nitsche duality argument improves the L2 norm error when the dual elliptic problem has regularity: solve and useConsequentlywith constants depending on the solution and regularity bounds. The second estimate is conditional on dual regularity; corners or insufficient data regularity can reduce the rate.
The same Galerkin method handles evolution equations. For the homogeneous heat equation, the semidiscrete finite element heat equation is . Because is a positive-definite matrix and is a positive semidefinite matrix,The decreasing quadratic form is exactly the L2 norm squared of the finite-element function. This separates spatial stability of a numerical method from the subsequent time integrator, just as in the Schrödinger equation example. Conformity, coercivity and approximation estimates together explain convergence.
Piecewise-linear hat function Created 2026-09-28 Updated 2026-10-14
A piecewise-linear hat function is a continuous piecewise linear function that selects one node of a finite element mesh: it is one there and zero at every other node. For an interior node , its exact formula on a possibly nonuniform mesh isIts support of a function is . It rises on the left interval and falls on the right, producing its hat-shaped graph. The interior hat functions form a basis of the continuous conforming finite element space with homogeneous Dirichlet boundary conditions. Chen's author notes define this nodal basis and illustrate it in one and two dimensions.[ref]
https://webapps.math.uci.edu/~chenlong/226/Ch2FEM.pdf. Chen, Introduction to Finite Element Methods, §3.1, pp. 5–6 and Figure 5: nodal hat basis
The nodal property makes the coefficients directly readable: if , then . Unlike the global Lagrange cardinal polynomials, each of these functions is confined to two neighboring elements.For example, with , the middle hat function is on , on , and zero elsewhere. Hence , while and . The finite element solution of the one-dimensional Poisson equation therefore has .
Local assembly makes this locality computational. On an element of length , the two local basis functions are and . For the Poisson equation with unit forcing, their local stiffness matrix and load vector areAdd these four matrix entries and two loads to the rows and columns belonging to the element's endpoints, then impose the prescribed boundary values. An interior node receives contributions from its two neighboring elements. Writing and giveswith off-diagonal entries included only for interior neighbors. On a uniform mesh these reduce to , and . Nonadjacent hat functions have no derivative overlap of positive length, so all distant entries vanish. This produces a sparse matrix with only three diagonals: the global coupling is built entirely from local two-node interactions.

