The Karhunen-Loève Expansion

The Optimal Basis for a Random Process

Given a random process X(t)X(t) on a finite interval [0,T][0, T], we want to represent it as a series X(t)=nZnϕn(t)X(t) = \sum_n Z_n \phi_n(t) for some basis functions {ϕn}\{\phi_n\} and random coefficients {Zn}\{Z_n\}. But which basis is best? The Fourier basis is convenient but not adapted to the process statistics. The point is that the Karhunen-Loève (KL) expansion chooses the basis that diagonalizes the autocorrelation operator — the eigenfunctions of rxxr_{xx}. This makes the coefficients uncorrelated (and independent for Gaussian processes), concentrates the maximum energy in the fewest terms, and provides the optimal finite-dimensional approximation in the mean-square sense. The KL expansion is the continuous-time analogue of principal component analysis (PCA).

,

Definition:

The Karhunen-Loève Expansion

Let X(t)X(t) be a zero-mean, finite-variance random process on [0,T][0, T] with autocorrelation RX(t,s)=E[X(t)X(s)]R_X(t, s) = \mathbb{E}[X(t)X^*(s)]. The Karhunen-Loève (KL) expansion of X(t)X(t) is X(t)=l.i.m.Nn=1NZnϕn(t),X(t) = \text{l.i.m.}_{N\to\infty} \sum_{n=1}^{N} Z_n \phi_n(t), where:

  1. The functions {ϕn(t)}\{\phi_n(t)\} are the orthonormal eigenfunctions of the autocorrelation kernel, satisfying the Fredholm integral equation 0TRX(t,s)ϕn(s)ds=λnϕn(t),t[0,T].\int_0^T R_X(t, s)\,\phi_n(s)\, ds = \lambda_n\,\phi_n(t), \quad t \in [0, T].
  2. The eigenvalues λ1λ20\lambda_1 \geq \lambda_2 \geq \cdots \geq 0 are real and non-negative.
  3. The random coefficients are Zn=0TX(t)ϕn(t)dtZ_n = \int_0^T X(t)\,\phi_n^*(t)\, dt.
  4. The {Zn}\{Z_n\} are uncorrelated: E[ZnZm]=λnδnm\mathbb{E}[Z_n Z_m^*] = \lambda_n\,\delta_{nm}.
  5. For Gaussian X(t)X(t), the {Zn}\{Z_n\} are independent: ZnN(0,λn)Z_n \sim \mathcal{N}(0, \lambda_n).

The convergence is in the mean-square sense: E ⁣[X(t)n=1NZnϕn(t)2]0\mathbb{E}\!\left[\left|X(t) - \sum_{n=1}^N Z_n\phi_n(t)\right|^2\right] \to 0 for each tt. For Gaussian processes, convergence also holds uniformly on [0,T][0, T] with probability one under mild regularity.

, ,

Karhunen-Loève Expansion

A series representation X(t)=nZnϕn(t)X(t) = \sum_n Z_n \phi_n(t) where {ϕn}\{\phi_n\} are eigenfunctions of the autocorrelation kernel and {Zn}\{Z_n\} are uncorrelated random coefficients with variance equal to the corresponding eigenvalues.

Related: Fredholm Integral Equation, Principal Component Analysis (PCA)

Fredholm Integral Equation

The eigenvalue problem 0TK(t,s)ϕ(s)ds=λϕ(t)\int_0^T K(t,s)\phi(s)\,ds = \lambda\phi(t) for an integral operator with kernel KK. In the KL expansion, the kernel is the autocorrelation function.

Related: Karhunen-Loève Expansion

Principal Component Analysis (PCA)

The discrete analogue of the KL expansion. For a random vector X\mathbf{X} with covariance Σ\boldsymbol{\Sigma}, PCA represents X\mathbf{X} in the eigenbasis of Σ\boldsymbol{\Sigma}, yielding uncorrelated components ordered by variance.

Related: Karhunen-Loève Expansion

Theorem: Optimality of the KL Expansion (Minimum Mean-Square Truncation Error)

Among all orthonormal expansions X(t)=n=1Znψn(t)X(t) = \sum_{n=1}^{\infty} Z_n \psi_n(t) with uncorrelated coefficients, the KL expansion minimizes the mean-square truncation error: εN=E ⁣[0TX(t)n=1NZnϕn(t)2dt].\varepsilon_N = \mathbb{E}\!\left[\int_0^T \left|X(t) - \sum_{n=1}^N Z_n \phi_n(t)\right|^2 dt\right].

Specifically, εN=n=N+1λn\varepsilon_N = \sum_{n=N+1}^{\infty} \lambda_n, and no other NN-term orthonormal expansion achieves a smaller error.

The KL basis concentrates the process energy into the first few coefficients by construction: the eigenvalues are ordered λ1λ2\lambda_1 \geq \lambda_2 \geq \cdots, so the first NN terms capture the maximum possible energy. Any other basis would "spread" energy more evenly across coefficients, requiring more terms for the same approximation quality.

, ,

Example: KL Expansion of the Wiener Process on [0,T][0, T]

Find the KL expansion of the Wiener process W(t)W(t) on [0,T][0, T], which has autocorrelation RW(t,s)=σ2min(t,s)R_W(t, s) = \sigma^2 \min(t, s).

,

Karhunen-Loève Expansion: Convergence vs. Number of Terms

Visualize the KL expansion of a Wiener process on [0,T][0, T]. As more eigenfunctions are included, the expansion approximates the true realization more closely. Observe how the eigenvalues λn\lambda_n decay (lower plot) and how the truncation error decreases.

Parameters
5
1
1
7

Karhunen-Loève Basis Functions Building Up a Random Realization

Watch the KL eigenfunctions ϕn(t)\phi_n(t) accumulate one by one to approximate a random process realization. The animation shows how each successive term adds finer detail, with the eigenvalue λn\lambda_n controlling the amplitude of each component.
Each frame adds one KL term Znϕn(t)Z_n \phi_n(t). The eigenvalues λn\lambda_n decay, so later terms contribute less energy.

The KL Expansion in Detection Theory

The KL expansion transforms the continuous-time detection problem "test H0:X(t)=W(t)H_0: X(t) = W(t) vs. H1:X(t)=s(t)+W(t)H_1: X(t) = s(t) + W(t) for t[0,T]t \in [0, T]" into an equivalent discrete problem in the KL coefficients. Under H0H_0, the KL coefficients are ZnN(0,λn)Z_n \sim \mathcal{N}(0, \lambda_n); under H1H_1, they are Zn+snN(sn,λn)Z_n + s_n \sim \mathcal{N}(s_n, \lambda_n) where sn=s(t)ϕn(t)dts_n = \int s(t)\phi_n^*(t)\, dt. Since the {Zn}\{Z_n\} are independent for Gaussian noise, the likelihood ratio factors, and we recover the matched filter as the sufficient statistic. This is the rigorous justification of the matched filter derived heuristically in Ch. 15.

,

KL Expansion vs. Fourier Series

The Fourier series and the KL expansion are both orthonormal expansions of a process on [0,T][0, T], but they differ in a crucial way:

  • The Fourier basis {ej2πnt/T}\{e^{j2\pi nt/T}\} is fixed and independent of the process. The coefficients are generally correlated unless X(t)X(t) is WSS with specific structure.
  • The KL basis {ϕn(t)}\{\phi_n(t)\} is adapted to the process statistics. The coefficients are always uncorrelated (by construction).

For a WSS process on a long interval, the KL eigenfunctions approach the Fourier exponentials, and the eigenvalues approach the PSD samples Px(n/T)P_x(n/T). This is the connection between the KL expansion and the Wiener-Khinchin theorem.

,

Definition:

Mercer's Theorem

If RX(t,s)R_X(t, s) is a continuous, positive semi-definite kernel on [0,T]×[0,T][0, T] \times [0, T], then it admits the eigenvalue expansion RX(t,s)=n=1λnϕn(t)ϕn(s),R_X(t, s) = \sum_{n=1}^{\infty} \lambda_n\,\phi_n(t)\,\phi_n^*(s), where convergence is absolute and uniform. In particular, 0TRX(t,t)dt=n=1λn,\int_0^T R_X(t, t)\, dt = \sum_{n=1}^{\infty} \lambda_n, so the total energy equals the sum of eigenvalues (the trace of the operator).

,

Definition:

KL Expansion of WSS Processes on Large Intervals

For a WSS process on [0,T][0, T] with TT large, the KL eigenfunctions are approximately complex exponentials ϕn(t)1Tej2πfnt\phi_n(t) \approx \frac{1}{\sqrt{T}} e^{j2\pi f_n t} with fn=n/Tf_n = n/T, and the eigenvalues are approximately PSD samples: λnPx(fn)Δf\lambda_n \approx P_x(f_n) \cdot \Delta f where Δf=1/T\Delta f = 1/T.

This means for large TT, the KL expansion coincides with the Fourier expansion, and the eigenvalue distribution converges to the PSD.

,

Karhunen-Loève vs. Fourier Expansion

PropertyKL ExpansionFourier Series
Basis functionsEigenfunctions of RX(t,s)R_X(t,s) — adapted to the processComplex exponentials ej2πnt/Te^{j2\pi nt/T} — fixed
CoefficientsAlways uncorrelated (independent for Gaussian)Generally correlated
OptimalityMinimizes NN-term m.s. truncation errorNot optimal in general
ComputationRequires solving a Fredholm integral equationFFT — fast and simple
Large TT limitApproaches Fourier for WSS processesApproaches Fourier (tautologically)
Non-stationary processesHandles naturallyNot adapted — poor convergence

Historical Note: Karhunen and Loève

1947-1960s

Kari Karhunen (1947, Finland) and Michel Loève (1948, France) independently discovered the expansion that bears their names. Karhunen was a student of Rolf Nevanlinna at the University of Helsinki, and his original paper was in Finnish — one reason the result was initially less known in the West. Loève, working in France and later at UC Berkeley, developed the expansion within his comprehensive theory of second-order processes. The KL expansion became central to communication theory through the work of David Slepian at Bell Labs, who in the 1960s computed the KL eigenfunctions for bandlimited processes (the prolate spheroidal wave functions), establishing the mathematical theory of time-frequency concentration.

,
🎓CommIT Contribution(2014)

Karhunen-Loève Channel Representation for Massive MIMO

A. Adhikary, J. Nam, G. CaireIEEE Trans. Inf. Theory

The CommIT group used KL-type decompositions of the spatial channel covariance matrix to develop the Joint Spatial Division and Multiplexing (JSDM) framework for massive MIMO. The idea is to group users by their channel covariance eigenspaces — effectively by their KL bases — and serve each group with a pre-beamformer that projects onto the dominant eigenmodes. This two-stage beamforming approach (statistical pre-beamformer + instantaneous beamformer) achieves near-optimal massive MIMO capacity with only reduced-dimension CSI feedback. The covariance eigenmodes are precisely the spatial KL basis functions, and the eigenvalues determine how many spatial degrees of freedom each user group occupies. The JSDM framework demonstrates that the KL expansion is not merely a theoretical tool but a practical architecture for next-generation wireless systems.

KL expansionmassive MIMOJSDMcovariance eigenspaceView Paper →
🔧Engineering Note

Practical KL Truncation for Signal Compression

In practice, one truncates the KL expansion to NN terms, discarding eigenmodes with λn\lambda_n below a threshold. The fraction of energy captured is ηN=n=1Nλn/n=1λn\eta_N = \sum_{n=1}^N \lambda_n / \sum_{n=1}^{\infty} \lambda_n. For many processes of interest (exponential autocorrelation, bandlimited processes), the eigenvalues decay rapidly, so ηN>0.99\eta_N > 0.99 with NN \ll the nominal dimension 2WT2WT. This is the principle behind transform coding, PCA-based compression, and reduced-rank signal processing. In massive MIMO, the rapid decay of spatial covariance eigenvalues means that only rNtr \ll N_t beams are needed to capture most of the channel energy.

Practical Constraints
  • Eigenvalue computation for large correlation matrices is O(N3)O(N^3) — Krylov methods help

  • Non-stationary processes require recomputing eigenfunctions over time

,

Quick Check

In the KL expansion of a Gaussian process, the coefficients ZnZ_n are:

Independent Gaussian random variables with ZnN(0,λn)Z_n \sim \mathcal{N}(0, \lambda_n).

Uncorrelated but not necessarily independent.

i.i.d. Gaussian random variables.

Common Mistake: The KL Expansion Is Not Limited to WSS Processes

Mistake:

Assuming the KL expansion applies only to wide-sense stationary processes.

Correction:

The KL expansion applies to any finite-variance process on a bounded interval [0,T][0, T], whether stationary or not. The autocorrelation kernel RX(t,s)R_X(t, s) need not be a function of tst - s alone. For non-stationary processes, the eigenfunctions are not sinusoids but adapted to the specific correlation structure. The WSS case is special only in that the eigenfunctions approximate Fourier exponentials for large TT.

Key Takeaway

The Karhunen-Loève expansion provides the optimal orthonormal representation of a random process: it diagonalizes the autocorrelation operator, yielding uncorrelated (independent for Gaussian) coefficients ordered by decreasing variance. The NN-term KL approximation minimizes the mean-square truncation error among all NN-dimensional projections — this is PCA for random processes. For WSS processes on large intervals, the KL basis converges to the Fourier basis and the eigenvalues converge to the PSD, unifying the spectral and KL viewpoints.