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]
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 are
Writing in a basis of gives the linear system
Here 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 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 spatial Galerkin method for the heat equation gives a mass matrix and a diffusion stiffness matrix . With zero forcing, . The quadratic form is the squared L2 norm of the represented finite-element function, proving an energy contraction. For nonzero forcing, the corresponding identity has the additional term , which can be estimated using the Cauchy-Schwarz inequality.
For a uniform piecewise-linear Galerkin heat discretization, the consistent mass matrix is and the stiffness matrix is . The generalized eigenvalues are . Applying Forward Euler method requires , giving the displayed uniform bound for . For intervals with Dirichlet endpoints the exact finite-grid upper bound is , which approaches . Replacing the consistent mass matrix by a lumped one changes the stability restriction.
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.
A conforming finite element space is a finite-dimensional vector subspace of the solution's variational space . For a second-order problem with homogeneous Dirichlet boundary conditions, continuous piecewise-polynomial functions vanishing on the boundary form such a subspace of the zero-boundary Sobolev space . Conformity allows exact Galerkin orthogonality and the Céa lemma.
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] 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 list
Nodes 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.
A family of simplicial meshes is shape-regular when the ratio of each element's diameter to its inscribed-ball radius stays uniformly bounded. This excludes degenerating shapes and makes finite element interpolation estimates uniform in the mesh size. The element sizes may still vary substantially across the domain.
On a shape-regular mesh in dimensions at most three, nodal piecewise-linear interpolation of satisfies
where is the largest element diameter and is independent of . For homogeneous Dirichlet boundary conditions, belongs to the conforming finite element space. Scaling each element to a reference element gives the estimate; shape regularity bounds the scaling constants, while subtraction of an affine function leaves an error controlled by the second derivatives.
The mass matrix is the Gram matrix of a finite element basis in the L2 inner product. Its coefficient quadratic form is the squared L2 norm of the represented trial function, so it is a positive-definite matrix for a linearly independent basis.
A mass eigenstate diagonalizes the Hermitian mass operator or mass matrix and has a definite mass. In a flavor basis with off-diagonal mass terms, it is a linear combination of flavor states. For unstable particles, decay propagation instead involves an effective complex matrix; its eigenvectors need not inherit the orthogonality of a Hermitian mass problem.
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 entries
and 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.
The stiffness matrix represents a variational bilinear form in a finite element basis. A symmetric coercive bilinear form gives a positive-definite matrix. Local support of the piecewise-linear hat functions produces a sparse matrix, allowing efficient numerical solution.
For with homogeneous Dirichlet boundary conditions, the conforming piecewise-linear hat functions on a uniform grid give a diffusion stiffness matrix and a mass matrix . Their nonzero entries are , , , and , with symmetric counterparts. The sum is a positive-definite matrix because its coefficient quadratic form is . For forcing , the load at is .
For periodic , the conforming Galerkin method has , with mass matrix and . Integration by parts and periodicity give . Therefore
The conserved quantity is the squared L2 norm of the finite element function. On a uniform one-dimensional mesh of spacing , the piecewise-linear hat functions give , , and .
A cubic Hermite finite element is piecewise cubic and joins with continuous first derivative. It is therefore conforming for fourth-order variational problems whose energy space lies in .
The Ritz method minimizes a quadratic energy over a finite-dimensional trial space. For basis functions and bilinear form , its linear system is with and .
For a self-adjoint Sturm-Liouville operator with common boundary conditions and an -normalized lowest eigenfunction of , evaluating the Rayleigh quotient on gives the displayed upper bound. More generally the lowest eigenvalue is the infimum of affine functions of , so it is concave in that parameter. The trial state must satisfy the boundary requirements of the variational domain; changing the operator without changing the trial function's normalization can still be legitimate when the weight is fixed.
For on with , , and , the Rayleigh quotient is . The trial gives numerator and denominator , hence . Every displayed obeys the same mixed boundary conditions; so does . Adding any of these to the trial space cannot worsen the optimized upper bound. Matrix elements and give a finite-dimensional generalized eigenvalue problem . The case repeats the original trial and adds no variational freedom.
For a bounded symmetric coercive bilinear form on a Hilbert space, a solution of minimizes . The displayed identity proves strict minimality and uniqueness. Restricting to a conforming finite element space makes the discrete Ritz method equivalent to the Galerkin method. Galerkin orthogonality gives exact best approximation in the energy norm; the Céa lemma translates it into a reference-norm estimate.
A continuous symmetric coercive bilinear form on a real Hilbert space and a continuous linear functional give a unique minimum of . The parallelogram identity makes any minimizing sequence Cauchy in the energy norm; coercivity and completeness give its limit. Differentiation gives , and proves uniqueness. A nonsymmetric operator instead differentiates to its symmetric part. Mere pointwise positivity without a lower bound in the chosen norm need not yield a minimizing vector.
A symmetric coercive bilinear form defines the energy norm . In this norm the Ritz method is an orthogonal projection onto its finite-dimensional trial space.
Let be a conforming finite element space. Suppose the exact solution satisfies for every and its Galerkin method approximation satisfies for every , using the same bilinear form and linear functional. Subtracting the two identities gives Galerkin orthogonality:
This identity itself does not require symmetry. Its interpretation as an orthogonal projection in an energy norm does require a bounded symmetric coercive bilinear form: then is an inner product, is perpendicular to every available discrete correction, and
Consequently is the unique closest point in in the energy norm. This Pythagorean theorem in a function space explains the beauty of the Galerkin method: integrated local equations compute a global best approximation. The Céa lemma supplies the corresponding estimate in a chosen reference norm.
For the finite element solution of the one-dimensional Poisson equation, and . Testing the error against the th piecewise-linear hat function on a uniform mesh gives
In this model vanishes at every node, so each of these integrals is individually zero, although is positive inside every element. Galerkin orthogonality controls the derivative-weighted balance; it does not say that the pointwise error vanishes.
The exact identity assumes conformity and exact evaluation of the continuous forms, including any numerical integration that is used. If assembly instead uses and , subtraction gives the consistency defect
Thus inexact numerical integration need not preserve the projection. In the Petrov-Galerkin method the error is tested against a different test space, and for a nonsymmetric bilinear form the displayed identity need not describe perpendicularity in any energy norm.
For a continuous coercive bilinear form with continuity constant and coercivity constant , a conforming finite-element solution satisfies
For a symmetric problem measured in its energy norm, the constant is one.
For any , Galerkin orthogonality gives , where . Coercivity and continuity yield . Divide by when it is nonzero and take the infimum. In the symmetric case, the Cauchy-Schwarz inequality in the energy norm gives the constant one.
For a symmetric elliptic variational problem with Galerkin orthogonality, let and solve the dual problem for every . If elliptic regularity gives , then a finite element interpolation estimate gives
Thus . Combining this with the Céa lemma and an energy norm error gives an L2 norm error. The additional order depends on the dual regularity assumption, which can fail on unsuitable domains.
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 is
Its 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] 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 are
Add 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 gives
with 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.
Figure 1.
Three interior hat functions on a four-interval mesh, with local stiffness and load contributions assembled into the three-unknown Poisson system
. Details.

Articles by others on the same topic (2)

The Finite Element Method (FEM) is a numerical technique used to find approximate solutions to complex engineering and mathematical problems, particularly those involving partial differential equations. It divides a large system into smaller, simpler parts called finite elements. Here’s a more detailed overview: ### Key Concepts: 1. **Discretization**: FEM begins by breaking down a complex shape or domain into smaller, simpler pieces called finite elements (e.g.
Finite element method by Ciro Santilli 40 Updated 2025-07-16
TODO understand, give intuition, justification of bounds and JavaScript demo.