Skip to main content

22  Linear Operators and the Poisson Equation

To approximate a differential equation numerically, we replace its unknown function by values on a grid. A local difference formula then relates each value to its neighbors and produces a sparse linear system. We derive this system for \(-u''=f\) with prescribed endpoint values, then relate its eigenvalues to those of the differential operator.

The boundary conditions affect both solvability and the spectrum. Keeping them in the derivation will explain why this matrix is positive definite and why its condition number grows when the grid is refined.

22.1 Differential Operators and Discretization

NoteDefinition: Linear Operator

A map \(\mathcal A:X\to Y\) between vector spaces is linear if \(\mathcal A(\alpha u+\beta v)=\alpha\mathcal A u+\beta\mathcal A v\) for all \(u,v\in X\) and scalars \(\alpha,\beta\). Here the vectors may be functions. Differentiation is a linear map from continuously differentiable functions to continuous functions. A matrix is the corresponding construction for finite lists of coordinates.

NoteDefinition: Dirichlet Poisson Problem

The one-dimensional Poisson problem with homogeneous Dirichlet boundary data is \[ \begin{align} -u''(x)=f(x),\qquad 0<x<1,\qquad u(0)=u(1)=0. \end{align} \] The boundary conditions are part of the problem data.

NoteDefinition: Grid Function

For \(n\) interior grid points, let \(h=1/(n+1)\) and \(x_i=ih\), \(i=1,...,n\). A grid function is the vector \[ \begin{align} \bu=(u_1,...,u_n)^T,\qquad u_i\approx u(x_i). \end{align} \] The boundary values are fixed separately by the boundary conditions.

NoteDefinition: Finite Difference Stencil

Approximating \(u''(x)\) on a grid with spacing \(h\): \[ \begin{align} u''(x_k) \approx \frac{u(x_{k-1}) - 2u(x_k) + u(x_{k+1})}{h^2}. \end{align} \] For \(u\in C^4\), Taylor expansion gives a truncation error bounded by \(h^2\|u^{(4)}\|_\infty/12\).

WarningExercise
  1. Taylor expand \(u(x+h)\) and \(u(x-h)\) about \(x\).

  2. Add the two expansions.

  3. Solve for \(u''(x)\).

  4. Identify the leading error term and prove the \(O(h^2)\) claim in the referenced result.

At an interior node, the difference formula gives \(-u_{i-1}+2u_i-u_{i+1}=h^2f(x_i)\). The endpoint values \(u_0=u_{n+1}=0\) are known, so only \(u_1,...,u_n\) are unknowns. Writing one such equation per interior node gives the matrix below.

WarningExercise

Write the three equations when there are three interior nodes. Next prescribe \(u(0)=\alpha\) and \(u(1)=\beta\). Show that the coefficient matrix stays the same and determine the changes in the first and last entries of the right-hand side.

NoteDefinition: 1-D Discrete Laplacian

Discretizing \(-d^2/dx^2\) on \([0,1]\) with \(u(0)=u(1)=0\) yields the tridiagonal system \(\bT \mathbf{u} = \mathbf{f}\): \[ \begin{align} \bT = \frac{1}{h^2} \text{tridiag}(-1, 2, -1) \in \fR^{n \times n}. \end{align} \]

TipRemark

(Sparsity) Each row of \(\bT\) uses only the grid point and its two neighbors. This locality is why finite difference matrices are sparse.

NoteTheorem: Spectrum Convergence

Eigenvalues of \(\bT\) are \(\lambda_k = \frac{4}{h^2} \sin^2(\frac{k\pi}{2(n+1)})\). As \(n \to \infty\), \(\lambda_k \to k^2 \pi^2\) (eigenvalues of continuous \(-d^2/dx^2\)).

WarningExercise
  1. Let \((\bv_k)_j=\sin(jk\pi h)\) with \(h=1/(n+1)\).

  2. Compute the \(j\)-th entry of \(\bT\bv_k\).

  3. Use \(\sin(A-B)+\sin(A+B)=2\sin A\cos B\).

  4. Use \(1-\cos\theta=2\sin^2(\theta/2)\).

  5. Derive the eigenvalue formula in the referenced result.

  6. Let \(h\to 0\) with fixed \(k\) and recover \(k^2\pi^2\).

NoteTheorem: Discrete Poisson Structure

The matrix \(\bT\) in the referenced result is sparse, symmetric positive definite, and has condition number \[ \begin{align} \kappa_2(\bT)=O(h^{-2}). \end{align} \]

Sparsity and symmetry follow directly from the tridiagonal stencil \(\bT = \frac{1}{h^2}\operatorname{tridiag}(-1, 2, -1)\). For any grid vector \(\bu \in \fR^n\) with boundary conditions \(u_0 = u_{n+1} = 0\), the quadratic form expands as a sum of squared forward differences: \[ \begin{align} \bu^T \bT \bu &= \frac{1}{h^2} \sum_{i=1}^n u_i (2u_i - u_{i-1} - u_{i+1}) \\ &= \frac{1}{h^2} \sum_{i=1}^n (u_i^2 - u_i u_{i-1} + u_i^2 - u_i u_{i+1}) \\ &= \frac{1}{h^2} \sum_{i=0}^n (u_{i+1} - u_i)^2. \end{align} \] In the sum of squared differences, each interior \(u_i^2\) occurs twice, and each neighbor product occurs with coefficient \(-2\). The endpoint squares vanish because both boundary values are zero. This reproduces exactly the expanded quadratic form and justifies the rearrangement.

Because \(u_0 = 0\), if \(\bu^T\bT\bu = 0\), then \(u_{i+1} - u_i = 0\) for all \(i\), forcing \(u_1 = ... = u_n = 0\). Hence \(\bu^T\bT\bu > 0\) for all \(\bu \neq \bzero\), proving that \(\bT\) is SPD.

By the referenced result, the extremal eigenvalues are \[ \begin{align} \lambda_{\min} &= \lambda_1 = \frac{4}{h^2}\sin^2\left(\frac{\pi h}{2}\right) = \frac{4}{h^2}\left(\frac{\pi h}{2} + O(h^3)\right)^2 = \pi^2 + O(h^2), \\ \lambda_{\max} &= \lambda_n = \frac{4}{h^2}\sin^2\left(\frac{n\pi h}{2}\right) = \frac{4}{h^2}\cos^2\left(\frac{\pi h}{2}\right) = \frac{4}{h^2}(1 - O(h^2)). \end{align} \] The largest-mode identity uses \(n\pi h=\pi-\pi h\), so \(\sin(n\pi h/2)=\cos(\pi h/2)\). The smallest mode instead has angle tending to zero, where \(\sin z=z+O(z^3)\). These two different limits explain why one eigenvalue stays of constant size while the other grows like \(h^{-2}\).

The 2-norm condition number is therefore \[ \begin{align} \kappa_2(\bT) = \frac{\lambda_{\max}}{\lambda_{\min}} = \frac{4/h^2 + O(1)}{\pi^2 + O(h^2)} = \frac{4}{\pi^2 h^2} + O(1) = O(h^{-2}). \end{align} \]

WarningExercise

Count the nonzero entries of \(\bT\). Then replace the Dirichlet boundary conditions by periodic conditions and form the analogous matrix for \(n\geq3\). Find a nonzero vector in its null space. Which step in the positive-definiteness proof fails, and what compatibility condition must the right-hand side satisfy?

22.2 Operator Norms and Conditioning

NoteDefinition: Boundedness

An operator is bounded if \(\|\mathcal{A}u\|_Y \leq C \|u\|_X\) for some \(C < \infty\).

  • Matrices are always bounded.

  • Boundedness of a differential operator depends on the domain and the norms. For a function on \([0,1]\), the \(L^2\) norm is \(\|u\|_{L^2}=(\int_0^1|u(x)|^2\,dx)^{1/2}\). The functions \(u_k(x)=\sin(2\pi kx)\) all have norm \(1/\sqrt2\), whereas their derivatives have norm \(2\pi k/\sqrt2\). Thus no fixed constant \(C\) can bound \(\|u_k'\|_{L^2}\) by \(C\|u_k\|_{L^2}\) for every \(k\).

      If instead we measure the input by $\|u\|_{H^1}=(\|u\|_{L^2}^2+\|u'\|_{L^2}^2)^{1/2}$, then $\|u'\|_{L^2}\leq\|u\|_{H^1}$ directly. The space $H^1$ consists of square-integrable functions whose weak first derivative is also square-integrable. For the smooth functions considered here, that derivative is the ordinary derivative. Including it in the input norm makes differentiation bounded.
TipRemark

The condition-number estimate uses two separate facts: the smallest eigenvalue approaches the positive constant \(\pi^2\), whereas the largest grows like \(4h^{-2}\). Thus halving \(h\) approximately quadruples the condition number. This is consistent with the unboundedness of the differential operator in the \(L^2\) norm, but unboundedness alone is not a proof of the estimate for a discretization.

TipRemark

(Solver consequence) Dense Gaussian elimination ignores sparsity. For Poisson matrices, sparse Cholesky, CG with preconditioning, multigrid, or FFT-based solvers are the natural algorithms, depending on geometry and boundary conditions.

22.3 Further Exercises

WarningExercise

Build \(\bT\) for \(n=50\) and plot its eigenvalues vs. \(k^2 \pi^2\) using the referenced result.

WarningExercise

Show that \(\kappa(\bT) \to \infty\) as \(n \to \infty\) using the referenced result.

WarningExercise

Assemble the two-dimensional Poisson matrix on an \(m\times m\) interior grid, with \(N=m^2\) unknowns. Compare sparse direct solves under natural and fill-reducing orderings. Relate the factorization times and factor nonzero counts to the estimates in the sparse Cholesky section; explain why timings alone cannot prove an asymptotic bound.

WarningExercise

Prove the differentiation operator is unbounded on \(L^2[0,1]\) using \(u_k(x) = \sin(k\pi x)\).

NoteFurther reading

LeVeque develops finite differences with close attention to consistency, stability, and boundary conditions (LeVeque 2007). Strang connects the same model problems to broader ideas in applied mathematics and computation (Strang 2007).