Symmetric Kernels and Mercer's Theorem

An integral operator KK smears a function against a two-variable kernel, (Kϕ)(x)=∫abK(x,y)ϕ(y) dy(K\phi)(x)=\int_a^b K(x,y)\phi(y)\,\mathrm{d}y. Read the kernel as an infinite continuous matrix indexed by (x,y)(x,y), and one symmetry towers over the rest: when K(y,x)=K(x,y)‾K(y,x)=\overline{K(x,y)} the operator is Hermitian — self-adjoint — on L2(a,b)L^2(a,b). Everything this article proves flows from that single algebraic fact, exactly as the spectral theory of Hermitian matrices flows from A=A†A=A^{\dagger}. Self-adjointness forces the eigenvalues real and the eigenfunctions orthogonal; square-integrability makes the operator compact, so the spectrum is discrete and can pile up only at zero; and the operator is then diagonalized by an orthonormal eigenbasis in which every integral equation decouples into scalar equations. Two theorems set the frame. The Hilbert–Schmidt theorem handles any square-integrable symmetric kernel and delivers the eigenexpansion K(x,y)∼∑nλnϕn(x)ϕn(y)‾K(x,y)\sim\sum_n\lambda_n\phi_n(x)\overline{\phi_n(y)} — but only in mean square, saying nothing about any particular point. Mercer's theorem asks the sharper question: when does that bilinear series converge everywhere, absolutely and uniformly, so that you may legally set x=yx=y? The answer needs two extra hypotheses — continuity on the compact square and positive semi-definiteness — and its reward is the trace identity ∑nλn=∫abK(x,x) dx\sum_n\lambda_n=\int_a^b K(x,x)\,\mathrm{d}x. This is the functional-analytic backbone of Sturm–Liouville Green's functions and Fredholm theory, and — in modern dress — of covariance operators, the Karhunen–Loève expansion, and the kernel machines of machine learning.

Key takeaways
  • A Hermitian kernel K(y,x)=K(x,y)‾K(y,x)=\overline{K(x,y)} makes the integral operator self-adjoint on L2(a,b)L^2(a,b), so its spectrum is real and eigenfunctions orthonormal — the continuous analogue of diagonalizing a Hermitian matrix.
  • Square-integrability ∬∣K∣2<∞\iint|K|^2<\infty makes the operator compact (Hilbert–Schmidt): the spectrum is discrete with ∑nλn2<∞\sum_n\lambda_n^2<\infty and λn→0\lambda_n\to0, and the kernel expansion converges in mean square.
  • Mercer's theorem adds continuity and positivity (λn≥0\lambda_n\ge0): then K(x,y)=∑nλnϕn(x)ϕn(y)‾K(x,y)=\sum_n\lambda_n\phi_n(x)\overline{\phi_n(y)} converges absolutely and uniformly, so it is safe to evaluate on the diagonal.
  • Diagonalizing turns the Fredholm equation (I−λK)ϕ=f(I-\lambda K)\phi=f into decoupled scalar equations, with resonances at the characteristic values λ=1/λn\lambda=1/\lambda_n where the Fredholm alternative decides solvability.
  • The trace formula ∑nλn=∫abK(x,x) dx\sum_n\lambda_n=\int_a^b K(x,x)\,\mathrm{d}x follows on the diagonal; for the Brownian kernel min⁡(x,y)\min(x,y) on [0,1][0,1] both sides equal exactly 1/21/2.
  • Key idea: a symmetric kernel makes the integral operator self-adjoint, compactness forces a discrete real spectrum with orthonormal eigenfunctions, and Mercer's continuity-plus-positivity upgrades the eigenexpansion of the kernel from L2L^2 convergence to absolute uniform convergence.
The core insight

A symmetric kernel makes the integral operator self-adjoint; compactness (square-integrability) then forces a discrete real spectrum with orthonormal eigenfunctions, and adding continuity plus positivity (Mercer) upgrades the eigenfunction expansion of the kernel from L2L^2 convergence to absolute uniform convergence.

Where this lives today

The kernel that Mercer certified is now the central object of a large slice of machine learning. A support-vector machine or kernel-PCA never touches its feature vectors directly; it works only with the Gram matrix Kij=K(xi,xj)K_{ij}=K(x_i,x_j), and the entire "kernel trick" is legitimate precisely because Mercer's theorem guarantees that a continuous positive-definite KK is the inner product ⟨Φ(xi),Φ(xj)⟩\langle\Phi(x_i),\Phi(x_j)\rangle of a feature map into a genuine Hilbert space, the eigenfunctions λnϕn\sqrt{\lambda_n}\phi_n being its coordinates. Gaussian-process regression uses the same theorem probabilistically — a covariance function is a Mercer kernel whose Karhunen–Loève modes are the principal directions of function-space uncertainty, with λn\lambda_n-decay setting the effective degrees of freedom — an idea that reaches deep learning through the neural tangent kernel. On the physics side the trace formula ∫G(x,x) dx=∑nμn−1\int G(x,x)\,\mathrm{d}x=\sum_n\mu_n^{-1} feeds spectral-zeta regularization of Casimir energies, and Karhunen–Loève truncation is the workhorse of reduced-order modeling for stochastic PDEs. A live open thread is spectral estimation: recovering an unknown kernel's eigenvalue decay from finitely many samples, which governs both the generalization of kernel machines and the convergence of stochastic-PDE solvers.

The physical picture

Picture the kernel as an infinite continuous matrix Kxy=K(x,y)K_{xy}=K(x,y), indexed not by integers but by the points of [a,b][a,b]. Hermitian symmetry Kxy=Kyx‾K_{xy}=\overline{K_{yx}} is reflection across the main diagonal with a conjugate — the condition A=A†A=A^{\dagger} a physicist demands of any observable. The spectral theorem then promises a real ladder of eigenvalues and orthogonal eigenfunctions, and Mercer's expansion K(x,y)=∑nλnϕn(x)ϕn(y)‾K(x,y)=\sum_n\lambda_n\phi_n(x)\overline{\phi_n(y)} is just the outer-product decomposition A=∑nλn unun†A=\sum_n\lambda_n\,u_n u_n^{\dagger} with a continuous index. The first figure makes this "continuous matrix, diagonalized" the whole picture.

Figure
A Hermitian kernel is a continuous matrix symmetric across its diagonal; the spectral theorem resolves it into real eigenvalues λ_n with orthonormal eigenfunctions φ_n, and Mercer stacks the rank-one pieces λ_n φ_n(x) φ̄_n(y) back into K
K(y,x) = K̄(x,y) ⟺ K = K† ⇒ λ_n ∈ ℝ, ⟨φ_m,φ_n⟩ = δ_mn, λ_n → 0 K(x,y) a b a b symmetric kernel on the square [a,b]² Σ λ₁ φ₁(x)φ̄₁(y) λ₂ φ₂(x)φ̄₂(y) λ₃ φ₃(x)φ̄₃(y) ⋮ λ_n → 0 discrete real spectrum, orthonormal eigenfunctions

Square-integrability makes the operator compact — essentially finite-dimensional, approximable by chopping the eigenladder off after finitely many rungs. That is why the spectrum is discrete with only accumulation point 00: the bars in an eigenvalue chart must shrink to nothing, and the decay of λn\lambda_n measures the smoothness of KK. Positivity — Mercer's extra hypothesis, ⟨f,Kf⟩≥0\langle f,Kf\rangle\ge0 — recasts the kernel as a Gram matrix of feature vectors K(x,y)=⟨Φ(x),Φ(y)⟩K(x,y)=\langle\Phi(x),\Phi(y)\rangle, and it is precisely the ingredient that upgrades the diagonal series from mean-square to uniform convergence. The second figure shows a real spectrum: the Brownian covariance min⁡(x,y)\min(x,y) on [0,1][0,1], whose eigenvalues plunge like 1/n21/n^2 yet sum to exactly 1/21/2.

Figure
Eigenvalues of the Brownian kernel min(x,y) on the unit interval: λ_n = 1/((n−1/2)²π²) collapse from 0.405 toward zero, while their running total climbs to the Mercer trace Σλ_n = ∫₀¹ x dx = 1/2 exactly
min(x,y) on [0,1]: λ_n = 1/((n−½)²π²) → Σλ_n = ∫₀¹ x dx = ½ 0.5 0.4 0.3 0.2 0.1 trace = ½ λ₁=0.405 running total Σ_{n≤N} λ_n 1 2 3 4 5 6 mode index n (bars = λ_n, line = partial sum)

The core equations

An integral operator is built from a kernel as a matrix is built from its entries: the kernel supplies a "matrix element" K(x,y)K(x,y) for every pair of continuous indices, and integration replaces summation over a column.

(Kϕ)(x)=∫abK(x,y) ϕ(y) dy(1)(K\phi)(x)=\int_a^b K(x,y)\,\phi(y)\,\mathrm{d}y \qquad (1)

where: K(x,y)K(x,y) — the kernel, a function on [a,b]×[a,b][a,b]\times[a,b]; ϕ\phi — an element of L2(a,b)L^2(a,b) the operator acts on; KK — the induced linear operator on L2(a,b)L^2(a,b). Reading: acting with KK smears ϕ\phi against a yy-slice of the kernel to return a function of xx. The property that organizes the whole theory is that Hermitian symmetry of the kernel is identical to self-adjointness under the L2L^2 inner product ⟨f,g⟩=∫abf‾ g dx\langle f,g\rangle=\int_a^b\overline{f}\,g\,\mathrm{d}x. Derivation A proves it in one line of Fubini.

K(y,x)=K(x,y)‾⟺K=K†(2)K(y,x)=\overline{K(x,y)}\quad\Longleftrightarrow\quad K=K^{\dagger} \qquad (2)

where: (⋅)‾\overline{(\cdot)} — complex conjugation, dropped for real kernels where the condition is just K(x,y)=K(y,x)K(x,y)=K(y,x); K†K^{\dagger} — the adjoint. Reading: symmetry of the kernel across its diagonal is the continuous-index version of a Hermitian matrix. Self-adjointness dictates the entire structure of the spectrum. As for Hermitian matrices, the eigenvalues are real and eigenfunctions of different eigenvalues are orthogonal, so they can be normalized into an orthonormal system.

Kϕn=λnϕn,λn∈R,⟨ϕm,ϕn⟩=δmn(3)K\phi_n=\lambda_n\phi_n,\qquad \lambda_n\in\mathbb{R},\qquad \langle\phi_m,\phi_n\rangle=\delta_{mn} \qquad (3)

where: λn\lambda_n — the nn-th eigenvalue, real by self-adjointness; ϕn\phi_n — the nn-th eigenfunction, unit L2L^2 norm; δmn\delta_{mn} — the Kronecker delta. Reading: the operator is diagonal in the basis {ϕn}\{\phi_n\}, the λn\lambda_n on the diagonal. Square-integrability is the analytic engine: it makes KK a Hilbert–Schmidt (hence compact) operator, and Parseval in the product space L2([a,b]2)L^2([a,b]^2) ties the kernel's total size to the sum of squared eigenvalues, forcing λn→0\lambda_n\to0.

∬[a,b]2∣K(x,y)∣2 dx dy=∑nλn2<∞,λn→0(4)\iint_{[a,b]^2}|K(x,y)|^2\,\mathrm{d}x\,\mathrm{d}y=\sum_n\lambda_n^2<\infty,\qquad \lambda_n\to0 \qquad (4)

where: ∑nλn2\sum_n\lambda_n^2 — the squared Hilbert–Schmidt (Frobenius) norm; λn→0\lambda_n\to0 — eigenvalues accumulate only at the origin. Reading: summable squares force a genuinely discrete spectrum. The crown jewel is Mercer's expansion. For a continuous, symmetric, positive semi-definite kernel the bilinear eigenseries does not merely approximate KK in mean — it equals KK everywhere, absolutely and uniformly, which licenses evaluation on the diagonal. Derivation B is the proof.

K(x,y)=∑nλn ϕn(x) ϕn(y)‾(absolutely and uniformly)(5)K(x,y)=\sum_n\lambda_n\,\phi_n(x)\,\overline{\phi_n(y)}\qquad(\text{absolutely and uniformly}) \qquad (5)

where: λn≥0\lambda_n\ge0 — the nonnegative eigenvalues of a positive semi-definite continuous kernel; ϕn\phi_n — the continuous orthonormal eigenfunctions. Reading: the kernel is literally rebuilt, point by point, from its own eigenmodes weighted by their eigenvalues. Setting y=xy=x in (5) and integrating along the diagonal — legal because the convergence is uniform — collapses the double sum into the trace identity, a useful spectral fingerprint.

Tr⁡K=∑nλn=∫abK(x,x) dx(6)\operatorname{Tr}K=\sum_n\lambda_n=\int_a^b K(x,x)\,\mathrm{d}x \qquad (6)

where: Tr⁡K\operatorname{Tr}K — the trace of the integral operator; K(x,x)K(x,x) — the kernel on its diagonal. Reading: summing the eigenvalues equals integrating the kernel along the diagonal, as the trace of a matrix sums its diagonal entries. Finally, diagonalization is what makes symmetric kernels indispensable in practice. In the eigenbasis a Fredholm equation of the second kind, (I−λK)ϕ=f(I-\lambda K)\phi=f, uncouples into one scalar equation per mode, and the resolvent is a diagonal sum with poles at the characteristic values.

(I−λK)ϕ=f ⟹ ϕ=f+λ∑nλn1−λλn ⟨ϕn,f⟩ ϕn(7)(I-\lambda K)\phi=f\ \Longrightarrow\ \phi=f+\lambda\sum_n\frac{\lambda_n}{1-\lambda\lambda_n}\,\langle\phi_n,f\rangle\,\phi_n \qquad (7)

where: λ\lambda — the spectral parameter; ⟨ϕn,f⟩\langle\phi_n,f\rangle — the nn-th coefficient of the data ff; 1/λn1/\lambda_n — the characteristic value where mode nn resonates. Reading: away from the characteristic values the equation inverts mode by mode; at λ=1/λn\lambda=1/\lambda_n that mode blows up and the Fredholm alternative takes over.

Derivation AFrom a Hermitian kernel to a real spectrum and orthogonal eigenfunctions

The goal is the algebraic foundation of the whole subject: that symmetry of the kernel is exactly self-adjointness of the operator, and that self-adjointness then forces real eigenvalues and orthogonal eigenfunctions, precisely as it does for a Hermitian matrix. We move the operator across the inner product using Fubini to identify the adjoint kernel, then run the classical eigenvalue sandwich for reality and orthogonality — the only analytic input being that the double integrals may be reordered, which square-integrability guarantees.

Step 1. Write out ⟨f,Kg⟩=∫abf(x)‾(∫abK(x,y)g(y) dy)dx\langle f,Kg\rangle=\int_a^b\overline{f(x)}\big(\int_a^b K(x,y)g(y)\,\mathrm{d}y\big)\mathrm{d}x and use Fubini to swap the order of integration, conjugating the inner xx-integral to expose an (⋅)‾ g\overline{(\cdot)}\,g structure: ⟨f,Kg⟩=∫ab(∫abK(x,y)‾f(x) dx)‾ g(y) dy=⟨K†f,g⟩\langle f,Kg\rangle=\int_a^b\overline{\big(\int_a^b\overline{K(x,y)}f(x)\,\mathrm{d}x\big)}\,g(y)\,\mathrm{d}y=\langle K^{\dagger}f,g\rangle with (K†f)(y)=∫abK(x,y)‾f(x) dx(K^{\dagger}f)(y)=\int_a^b\overline{K(x,y)}f(x)\,\mathrm{d}x. Why: the adjoint is defined by ⟨f,Kg⟩=⟨K†f,g⟩\langle f,Kg\rangle=\langle K^{\dagger}f,g\rangle, so reading off the kernel of K†K^{\dagger} reduces self-adjointness to a statement about the kernel alone.

Step 2. Compare kernels: K†=KK^{\dagger}=K holds if and only if K(x,y)‾=K(y,x)\overline{K(x,y)}=K(y,x). So a Hermitian kernel is a self-adjoint operator and conversely — equation (2), with no positivity or continuity assumed. Why: this is the hinge of the article; every spectral conclusion below is borrowed from the theory of self-adjoint operators.

Step 3. Take two eigenpairs Kϕm=λmϕmK\phi_m=\lambda_m\phi_m, Kϕn=λnϕnK\phi_n=\lambda_n\phi_n and sandwich: ⟨ϕm,Kϕn⟩=⟨Kϕm,ϕn⟩\langle\phi_m,K\phi_n\rangle=\langle K\phi_m,\phi_n\rangle becomes λn⟨ϕm,ϕn⟩=λm‾⟨ϕm,ϕn⟩\lambda_n\langle\phi_m,\phi_n\rangle=\overline{\lambda_m}\langle\phi_m,\phi_n\rangle (the left eigenvalue conjugates out of the first slot). Why: this one identity carries both reality and orthogonality, read with m=nm=n and then m≠nm\neq n.

Step 4. Set m=nm=n: since ∥ϕn∥2>0\|\phi_n\|^2>0, λn=λn‾\lambda_n=\overline{\lambda_n}, so every eigenvalue is real. Set m≠nm\neq n: now (λn−λm)⟨ϕm,ϕn⟩=0(\lambda_n-\lambda_m)\langle\phi_m,\phi_n\rangle=0, so distinct eigenvalues force ⟨ϕm,ϕn⟩=0\langle\phi_m,\phi_n\rangle=0; a degenerate eigenspace is finite-dimensional and orthonormalized by Gram–Schmidt. Why: this reproduces the finite-dimensional spectral theorem for the continuous index, delivering the orthonormal eigenbasis {ϕn}\{\phi_n\} that equations (3)–(7) rely on.

Go deeper · Derivation B · 1 minHow positivity upgrades mean-square convergence to uniform convergence
Derivation BHow positivity upgrades mean-square convergence to uniform convergence

The goal is Mercer's theorem proper: for a continuous, symmetric, positive semi-definite kernel the bilinear eigenseries (5) converges not just in L2L^2 but absolutely and uniformly, so the diagonal value K(x,x)K(x,x) and the trace formula (6) are legitimate. The strategy is a Dini argument — build a monotone increasing sequence of continuous diagonal partial sums bounded above by a continuous limit, make that convergence uniform by Dini's theorem, then bootstrap to the full off-diagonal series with Cauchy–Schwarz. Positivity is used twice and is indispensable.

Step 1. Let KN(x,y)=K(x,y)−∑n≤Nλnϕn(x)ϕn(y)‾K_N(x,y)=K(x,y)-\sum_{n\le N}\lambda_n\phi_n(x)\overline{\phi_n(y)} be the remainder after NN modes. Subtracting finitely many positive rank-one pieces λnϕn⊗ϕn‾\lambda_n\phi_n\otimes\overline{\phi_n} (each λn≥0\lambda_n\ge0) from a positive kernel leaves a continuous, symmetric, positive semi-definite kernel. Why: positivity of KNK_N pins its diagonal below that of KK; without λn≥0\lambda_n\ge0 the argument collapses.

Step 2. A continuous positive semi-definite kernel has a nonnegative diagonal, so KN(x,x)=K(x,x)−∑n≤Nλn∣ϕn(x)∣2≥0K_N(x,x)=K(x,x)-\sum_{n\le N}\lambda_n|\phi_n(x)|^2\ge0. Hence SN(x)=∑n≤Nλn∣ϕn(x)∣2S_N(x)=\sum_{n\le N}\lambda_n|\phi_n(x)|^2 increases in NN and is bounded above pointwise by K(x,x)K(x,x). Why: monotone-and-bounded is exactly the hypothesis Dini needs; the diagonal is where positivity buys the upper bound.

Step 3. SN(x)↗S(x)≤K(x,x)S_N(x)\nearrow S(x)\le K(x,x) pointwise, with SS continuous (it equals K(x,x)K(x,x)). Dini's theorem — monotone pointwise convergence of continuous functions to a continuous limit on a compact set is uniform — makes ∑nλn∣ϕn(x)∣2\sum_n\lambda_n|\phi_n(x)|^2 converge uniformly on [a,b][a,b]. Why: this is the one place compactness of the domain is spent; on a non-compact interval Dini can fail and Mercer's theorem is false.

Step 4. Control the off-diagonal tail by Cauchy–Schwarz with the nonnegative weights λn\lambda_n: ∣∑n>Nλnϕn(x)ϕn(y)‾∣2≤(∑n>Nλn∣ϕn(x)∣2)(∑n>Nλn∣ϕn(y)∣2)\big|\sum_{n>N}\lambda_n\phi_n(x)\overline{\phi_n(y)}\big|^2\le\big(\sum_{n>N}\lambda_n|\phi_n(x)|^2\big)\big(\sum_{n>N}\lambda_n|\phi_n(y)|^2\big). The right side is a product of diagonal tails, each uniformly small by Step 3, so the full bilinear series converges absolutely and uniformly to K(x,y)K(x,y); evaluating at y=xy=x and integrating term by term gives ∫abK(x,x) dx=∑nλn\int_a^b K(x,x)\,\mathrm{d}x=\sum_n\lambda_n. Why: this is the payoff — pointwise legitimacy of the expansion and the trace formula, which bare Hilbert–Schmidt cannot supply.

Go deeper · Derivation C · 1 minThe Green's function of a Sturm–Liouville operator is a Mercer kernel
Derivation CThe Green's function of a Sturm–Liouville operator is a Mercer kernel

The goal is to show that the abstract machinery lands exactly on the eigenfunction expansions physicists already use: the Green's function of a positive self-adjoint Sturm–Liouville operator is a continuous symmetric positive-definite kernel, so Mercer's theorem hands back its bilinear eigenexpansion and a finite trace. Take L=−ddx(p(x)ddx)+q(x)L=-\frac{\mathrm{d}}{\mathrm{d}x}\big(p(x)\frac{\mathrm{d}}{\mathrm{d}x}\big)+q(x) self-adjoint on [a,b][a,b] with separated homogeneous boundary conditions and L>0L>0, eigenpairs Lun=μnunLu_n=\mu_n u_n, μn>0\mu_n>0. We identify GG as the inverse operator, transfer eigenfunctions, check the Mercer hypotheses, and read off the trace.

Step 1. The Green's function solves LxG(x,y)=δ(x−y)L_x G(x,y)=\delta(x-y) with the same boundary conditions; self-adjointness of LL makes it symmetric, G(y,x)=G(x,y)G(y,x)=G(x,y), and continuous on [a,b]2[a,b]^2 with only a derivative kink across the diagonal. Why: continuity and symmetry are two of Mercer's three hypotheses, both automatic from self-adjointness of a second-order operator.

Step 2. As an integral operator G=L−1G=L^{-1}, so it shares eigenfunctions with LL but inverts the eigenvalues: Gun=μn−1un=λnunGu_n=\mu_n^{-1}u_n=\lambda_n u_n with λn=1/μn\lambda_n=1/\mu_n. Why: this converts the differential eigenproblem, whose eigenvalues run to infinity, into an integral one whose eigenvalues collapse to zero — the compact setting Mercer needs.

Step 3. Positivity of LL makes every μn>0\mu_n>0, hence every λn=μn−1>0\lambda_n=\mu_n^{-1}>0: the third Mercer hypothesis. Weyl's asymptotics give μn∼(nπ/(b−a))2\mu_n\sim(n\pi/(b-a))^2, so λn→0\lambda_n\to0 and ∑nλn\sum_n\lambda_n converges. Why: positivity plus square-summable eigenvalues promote the L2L^2 expansion to a uniform one.

Step 4. Mercer now yields the uniformly convergent expansion G(x,y)=∑nμn−1un(x)un(y)G(x,y)=\sum_n\mu_n^{-1}u_n(x)u_n(y), whose diagonal gives the trace ∫abG(x,x) dx=∑nμn−1=ζL(1)\int_a^b G(x,x)\,\mathrm{d}x=\sum_n\mu_n^{-1}=\zeta_L(1), a spectral zeta value. For −u′′-u'' on [0,π][0,\pi] with Dirichlet data, μn=n2\mu_n=n^2 and the trace is ∑nn−2=π2/6\sum_n n^{-2}=\pi^2/6. Why: this is the familiar Green's-function series of physics, now certified pointwise, its trace a finite invariant that reappears as a Casimir energy after regularization.

Limiting cases

The conclusions sharpen, hypothesis by hypothesis, as one climbs from a bare square-integrable kernel to a full Mercer kernel — and weaken again the moment positivity is dropped.

CaseResultMeaning
Square-integrable only (Hilbert–Schmidt)∬∣K∣2<∞⇒∑nλn2<∞\iint|K|^2<\infty\Rightarrow\sum_n\lambda_n^2<\inftydiscrete real spectrum, λn→0\lambda_n\to0; the kernel series converges in L2L^2, but pointwise values are not controlled
Continuous + positive (Mercer)K(x,y)=∑nλnϕn(x)ϕn(y)‾K(x,y)=\sum_n\lambda_n\phi_n(x)\overline{\phi_n(y)}absolute, uniform convergence; continuous eigenfunctions; finite trace ∑nλn=∫abK(x,x) dx\sum_n\lambda_n=\int_a^b K(x,x)\,\mathrm{d}x
Degenerate / separable kernelK(x,y)=∑j=1Naj(x)bj(y)‾K(x,y)=\sum_{j=1}^{N}a_j(x)\overline{b_j(y)}finite rank: only NN nonzero eigenvalues; the Fredholm equation collapses to exact N×NN\times N linear algebra
Indefinite continuous kernelλn\lambda_n of both signsHilbert–Schmidt still holds, but Mercer fails: the diagonal series need not converge uniformly and ∑n∣λn∣\sum_n|\lambda_n| may diverge

Worked examples

1 · The Brownian kernel min(x,y) — a fully worked Mercer expansion

The covariance of standard Brownian motion is K(x,y)=min⁡(x,y)K(x,y)=\min(x,y) on [0,1][0,1]. Find its eigenvalues and eigenfunctions, verify the trace formula, and write the Karhunen–Loève expansion of the process.

Step 1. Recognize the kernel as a Green's function: min⁡(x,y)\min(x,y) equals xx for x<yx<y and yy for x>yx>y, which is exactly the Green's function of −d2/dx2-\mathrm{d}^2/\mathrm{d}x^2 with u(0)=0u(0)=0, u′(1)=0u'(1)=0. So the eigenproblem ∫01min⁡(x,y)ϕ(y) dy=λϕ(x)\int_0^1\min(x,y)\phi(y)\,\mathrm{d}y=\lambda\phi(x) becomes the ODE −ϕ′′=μϕ-\phi''=\mu\phi with μ=1/λ\mu=1/\lambda under those boundary conditions.

Step 2. Solve the ODE. ϕ(x)=sin⁡(μ x)\phi(x)=\sin(\sqrt{\mu}\,x) satisfies ϕ(0)=0\phi(0)=0; then ϕ′(1)=μcos⁡μ=0\phi'(1)=\sqrt{\mu}\cos\sqrt{\mu}=0 forces μ=(n−12)π\sqrt{\mu}=(n-\tfrac12)\pi. Hence μn=(n−12)2π2\mu_n=(n-\tfrac12)^2\pi^2 and the operator eigenvalues are λn=1/((n−12)2π2)\lambda_n=1/((n-\tfrac12)^2\pi^2), with normalized eigenfunctions ϕn(x)=2 sin⁡ ⁣((n−12)πx)\phi_n(x)=\sqrt2\,\sin\!\big((n-\tfrac12)\pi x\big).

Step 3. Check the numbers. The largest eigenvalue is λ1=1/((0.5)2π2)=0.4053\lambda_1=1/((0.5)^2\pi^2)=\mathbf{0.4053}, then λ2=0.0450\lambda_2=0.0450, λ3=0.0162\lambda_3=0.0162 — the plunge plotted in the second figure. The trace formula demands ∑nλn=∫01x dx=12\sum_n\lambda_n=\int_0^1 x\,\mathrm{d}x=\tfrac12; independently ∑nλn=1π2∑n≥1(n−12)−2=1π2⋅π22=12\sum_n\lambda_n=\frac{1}{\pi^2}\sum_{n\ge1}(n-\tfrac12)^{-2}=\frac{1}{\pi^2}\cdot\frac{\pi^2}{2}=\mathbf{\tfrac12}. The two routes agree exactly — a clean confirmation of Mercer's trace identity.

Step 4. Assemble the Karhunen–Loève expansion. With uncorrelated standard-normal ξn\xi_n, B(x)=∑nλn ξn ϕn(x)=∑n≥12 ξn(n−12)πsin⁡ ⁣((n−12)πx)B(x)=\sum_n\sqrt{\lambda_n}\,\xi_n\,\phi_n(x)=\sum_{n\ge1}\frac{\sqrt2\,\xi_n}{(n-\tfrac12)\pi}\sin\!\big((n-\tfrac12)\pi x\big). This is the optimal, variance-minimizing representation of Brownian motion; its coefficients decay only like 1/n1/n, reflecting the roughness of the paths. Truncating at NN modes keeps a fraction ∑n≤Nλn/12\sum_{n\le N}\lambda_n/\tfrac12 of the variance — five modes already retain 0.4798/0.5=96%0.4798/0.5=96\%.

2 · A degenerate kernel and the Fredholm alternative

Solve the Fredholm equation of the second kind ϕ(x)−μ∫01xy ϕ(y) dy=f(x)\phi(x)-\mu\int_0^1 xy\,\phi(y)\,\mathrm{d}y=f(x) on [0,1][0,1], and find the value of μ\mu at which solvability fails.

Step 1. The kernel K(x,y)=xyK(x,y)=xy is separable and rank one, so it has a single nonzero eigenvalue. Testing ϕ(x)=x\phi(x)=x in Kϕ=x∫01yϕ(y) dyK\phi=x\int_0^1 y\phi(y)\,\mathrm{d}y gives Kx=x∫01y2 dy=13xKx=x\int_0^1 y^2\,\mathrm{d}y=\tfrac13 x, so λ1=13\lambda_1=\tfrac13 with eigenfunction ϕ1(x)=3 x\phi_1(x)=\sqrt3\,x; every function orthogonal to xx is in the null space. The characteristic value is 1/λ1=31/\lambda_1=\mathbf{3}.

Step 2. Use the rank-one structure: any solution has the form ϕ(x)=f(x)+μx c\phi(x)=f(x)+\mu x\,c with c=∫01yϕ(y) dyc=\int_0^1 y\phi(y)\,\mathrm{d}y one unknown constant. Substituting back, c=F+μ3cc=F+\tfrac{\mu}{3}c with F=∫01yf(y) dyF=\int_0^1 yf(y)\,\mathrm{d}y, giving c=3F3−μc=\dfrac{3F}{3-\mu}.

Step 3. Read off the solution and its resonance. The full solution ϕ(x)=f(x)+3μF3−μ x\phi(x)=f(x)+\dfrac{3\mu F}{3-\mu}\,x is valid for all μ≠3\mu\neq3; at μ=3=1/λ1\mu=3=1/\lambda_1 the denominator vanishes, the resonance the resolvent (7) predicts. At μ=3\mu=3 a solution exists only if F=∫01yf(y) dy=0F=\int_0^1 yf(y)\,\mathrm{d}y=0, i.e. the data is orthogonal to the eigenfunction xx — precisely the Fredholm alternative. For f(x)=xf(x)=x, F=13F=\tfrac13 and the solution is ϕ(x)=3x3−μ\phi(x)=\dfrac{3x}{3-\mu}, which diverges as μ→3\mu\to3.

Physics of the portrait

Mercer's theorem sits where two currents meet: Hilbert's spectral theory of integral equations, and the classical question of when an eigenfunction series may be summed pointwise. The man who answered it did so in a single 1909 paper, and gave positive-definite kernels their name.

Origins · 1 minJames Mercer and how this was discovered
JM
James Mercer
1883–1932 · integral equations and positive-definite kernels

James Mercer was a British mathematician whose name is attached to one of the load-bearing theorems of functional analysis, though he published relatively little. Born in Bootle, Lancashire, he studied at Manchester and then Trinity College, Cambridge, where he became a Fellow and worked in the orbit of the ideas David Hilbert and Erhard Schmidt were then developing in Göttingen. His decisive contribution was the 1909 memoir "Functions of positive and negative type and their connection with the theory of integral equations", which introduced the kernel of positive type — what we now call positive semi-definite — and proved that a continuous kernel of positive type on a compact interval has an eigenfunction expansion converging absolutely and uniformly. That single theorem separates a merely mean-square eigenexpansion from one you may evaluate at a point, and it is why his name survives in fields he never saw: the Karhunen–Loève expansion, reproducing-kernel Hilbert spaces, and the "Mercer kernels" at the heart of support-vector machines and Gaussian-process learning. Mercer served in the Royal Navy during the First World War; his health declined afterward, and he died in London in 1932 at forty-nine, a Fellow of the Royal Society since 1922.

History
1904
— Hilbert launches the spectral theory of symmetric integral kernels
1907
— Schmidt recasts it through the eigenfunction (Hilbert–Schmidt) expansion
1909
— Mercer proves uniform convergence for continuous positive-definite kernels
1918
— the Fredholm–Riesz theory of compact operators reaches maturity
1947
— Karhunen and Loève build the covariance expansion of random processes on Mercer's theorem

Going further

Texts. Stone & Goldbart, Mathematics for Physics, chapter on integral equations and Hilbert–Schmidt theory · Arfken & Weber, Mathematical Methods for Physicists, chapter on integral equations · Hassani, Mathematical Physics, chapters on compact and Sturm–Liouville operators · Byron & Fuller, Mathematics of Classical and Quantum Physics, chapter on operators in Hilbert space · Courant & Hilbert, Methods of Mathematical Physics, Vol. I, ch. III (eigenfunction theory and Mercer's theorem) · Reed & Simon, Methods of Modern Mathematical Physics I: Functional Analysis (compact self-adjoint operators, spectral theorem) · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, integral-equations chapter.

Provenance. Theorem statements follow Stone & Goldbart, Courant & Hilbert Vol. I ch. III, and Reed & Simon Vol. I; the Sturm–Liouville application follows Arfken & Weber and Riley–Hobson–Bence. A verifier should re-derive: (i) self-adjointness ⇔ Hermitian kernel via Fubini; (ii) reality and orthogonality of eigenpairs; (iii) the Parseval identity ∬∣K∣2=∑nλn2\iint|K|^2=\sum_n\lambda_n^2; (iv) the Dini argument for Mercer's uniform convergence; (v) the min⁡(x,y)\min(x,y) example — eigenfunctions 2sin⁡((n−12)πx)\sqrt2\sin((n-\tfrac12)\pi x), eigenvalues ((n−12)π)−2((n-\tfrac12)\pi)^{-2}, trace ∑n(n−12)−2=π2/2\sum_n(n-\tfrac12)^{-2}=\pi^2/2 against ∫01x dx=1/2\int_0^1 x\,\mathrm{d}x=1/2; (vi) the xyxy kernel with characteristic value 33 and condition ∫01yf(y) dy=0\int_0^1 yf(y)\,\mathrm{d}y=0. Anchor numbers: ∑1/n2=π2/6\sum 1/n^2=\pi^2/6, ∑(n−12)−2=π2/2\sum(n-\tfrac12)^{-2}=\pi^2/2, λ1(min⁡)=0.4053\lambda_1(\min)=0.4053.

Prerequisites. Hilbert spaces and L2L^2 · Self-adjoint and compact operators · Spectral theorem (finite-dimensional) · Fredholm Integral Equations. Leads to. Green's functions of Sturm–Liouville problems · WKB Approximation · Karhunen–Loève and Reproducing-Kernel Hilbert Spaces.

Ask the tutor: Ask me to walk through the Dini argument for Mercer's theorem, or to work the Karhunen–Loève expansion of any covariance kernel you name.

Why is a symmetric kernel such a big deal — what breaks without symmetry?

Without symmetry the operator is not self-adjoint, and almost every convenience disappears. Eigenvalues can be complex, eigenfunctions need not be orthogonal, and they may not even form a complete set — a non-symmetric compact operator can fail to be diagonalizable, requiring the singular-value decomposition instead. Symmetry is what buys the real spectrum, the orthonormal eigenbasis, and the clean diagonalization in which integral equations decouple mode by mode. It is the continuous-index version of the fact that only Hermitian matrices are guaranteed a real orthonormal eigenbasis — which is why symmetric kernels are the ones physicists can actually solve.

What is the difference between the Hilbert–Schmidt theorem and Mercer's theorem?

They answer two questions about the same series ∑nλnϕn(x)ϕn(y)‾\sum_n\lambda_n\phi_n(x)\overline{\phi_n(y)}. Hilbert–Schmidt needs only square-integrability and gives convergence to KK in mean square — an L2L^2 statement that says nothing about any point. Mercer adds continuity on a compact square and positive semi-definiteness, and concludes absolute, uniform convergence, hence pointwise everywhere. The upshot is the diagonal: only Mercer lets you set x=yx=y, write K(x,x)=∑nλn∣ϕn(x)∣2K(x,x)=\sum_n\lambda_n|\phi_n(x)|^2, and integrate to the trace formula. Hilbert–Schmidt gives existence of the expansion; Mercer gives its pointwise legitimacy.

Why must the eigenvalues accumulate only at zero?

Because a Hilbert–Schmidt kernel makes KK compact, and compactness forces the eigenvalues to pile up only at the origin. Square-integrability gives ∑nλn2<∞\sum_n\lambda_n^2<\infty, so only finitely many eigenvalues can exceed any fixed threshold — if infinitely many stayed bounded away from zero, their squares could not sum. Physically, a smooth kernel cannot resolve arbitrarily fine high-frequency eigenfunctions, so it assigns them vanishingly small eigenvalues. This is also why an integral operator, unlike its inverse differential operator, has a spectrum that collapses toward zero rather than running to infinity — the Green's-function derivation makes the inverse relation explicit.

Does Mercer's theorem require the kernel to be strictly positive, or is semi-definite enough?

Positive semi-definite is enough: the hypothesis is ⟨f,Kf⟩≥0\langle f,Kf\rangle\ge0 for all ff, equivalently every eigenvalue λn≥0\lambda_n\ge0, and zero eigenvalues are allowed. Eigenfunctions with λn=0\lambda_n=0 simply drop out of the expansion, so the sum runs effectively over the strictly positive eigenvalues. What is not allowed is a negative eigenvalue: a single one breaks the Dini monotonicity argument, because the diagonal partial sums stop increasing, and uniform convergence can genuinely fail. So "positive type" in Mercer's original phrase means "no negative eigenvalues", not "no zero eigenvalues".

How does the smoothness of the kernel show up in its eigenvalues?

As the decay rate. A merely continuous kernel has λn→0\lambda_n\to0 with ∑nλn2<∞\sum_n\lambda_n^2<\infty; adding derivatives speeds the decay, a CkC^k kernel typically giving λn∼n−(k+1)\lambda_n\sim n^{-(k+1)} and an analytic kernel exponentially. A smooth kernel averages out fine detail, barely responding to highly oscillatory eigenfunctions and assigning them tiny eigenvalues. This is why the Brownian kernel min⁡(x,y)\min(x,y), only Lipschitz (its diagonal derivative jumps), has the slow decay λn∼n−2\lambda_n\sim n^{-2} matching the roughness of Brownian paths — and why smoother covariance kernels give Gaussian processes with smoother sample functions.

Where does the Karhunen–Loève expansion come from, and why is it "optimal"?

It is Mercer's theorem applied to a covariance kernel. A random field's covariance C(x,y)=E[X(x)X(y)]C(x,y)=\mathbb{E}[X(x)X(y)] is symmetric and positive semi-definite (since ⟨f,Cf⟩=E[∣∫fX∣2]≥0\langle f,Cf\rangle=\mathbb{E}[|\int f X|^2]\ge0); if continuous, Mercer gives C=∑nλnϕn⊗ϕnC=\sum_n\lambda_n\phi_n\otimes\phi_n. Expanding the field in the same eigenbasis, X(x)=∑nλn ξnϕn(x)X(x)=\sum_n\sqrt{\lambda_n}\,\xi_n\phi_n(x), yields uncorrelated unit-variance coefficients ξn\xi_n. It is optimal in mean square: truncating at the NN largest eigenvalues captures the most variance of any NN-term linear expansion, because the eigenfunctions are the principal axes of the covariance — PCA lifted from vectors to functions.

Before this

Where this leads