Bayesian Filtering and Belief States › Exact Filtering: The Kalman Filter
World Models HandbookAll chapters Bayesian Filtering and Belief States › Exact Filtering: The Kalman FilterOne section · Sections in this chapter4 / 11 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
The Bayes filter is exact but involves integrals over arbitrary distributions, which is why it is rarely computable as written. Rudolf Kálmán's 1960 insight was that an entire class of problems admits a closed-form solution: if the transition and observation models are linear, the process and observation noise are Gaussian, and the initial belief is Gaussian, the belief stays Gaussian forever. The recursion then reduces to updating a mean vector and a covariance matrix. This is a remarkable compression of the general problem. Instead of tracking a function over an infinite-dimensional space of distributions, the filter tracks finitely many numbers. Those numbers update through matrix operations that were feasible on 1960s hardware, although numerical stability required careful implementations. The filter was used in Apollo-era navigation within a decade of its publication.
Why Gaussians Close Under Linear Dynamics
Take a linear transition with additive Gaussian noise,
and a linear observation with Gaussian noise,
Assume that the initial belief, the full process-noise sequence, and the full observation-noise sequence are mutually independent, with fresh noise draws independent across time. If is Gaussian, then the prediction is a linear transformation of a Gaussian plus independent Gaussian noise, hence Gaussian, with mean and covariance propagated by matrix algebra. The correction step multiplies the predicted Gaussian density by the likelihood and normalizes the result. The product is proportional to a Gaussian. For a direct scalar observation its precision is the sum of the two scalar precisions; in the general linear case the likelihood contributes to state-space precision. This closure property does all the work. No integrals remain, only arithmetic on means and covariances.
It is worth spelling out the closure argument once, slowly, because the same pattern recurs whenever someone claims a filter is "exact." A distribution family is closed under an operation if applying the operation to members of the family yields another member. Linear maps take Gaussians to Gaussians, sums of independent Gaussians are Gaussian, and products of Gaussian densities are proportional to Gaussians, exactly Gaussian once normalized, which the correction step does. Since prediction uses linear maps plus sums, and correction uses normalized products, both steps stay inside the family. Nonlinearity breaks the first link, and non-Gaussianity breaks the second and third. The classical approximations below repair one of those broken links; the learned update later replaces the explicit recursion with a trained recurrent computation.
The Filter Equations
Start from an initial Gaussian belief . The mean and covariance are part of the filter specification: they encode what is known before the first measurement.
Predict:
Correct:
Here and are the posterior mean and covariance after absorbing the measurement; the subscript marks predicted values computed before it arrives. And is the innovation: the part of the measurement the model did not anticipate. Read the equations as a conversation between model and data. The predict step speaks first, asserting where the state should be and how confident the assertion is. The measurement replies, and the innovation records the disagreement. The gain decides how much the disagreement matters, and the final update moves the mean partway toward resolving it while shrinking the covariance to reflect the information gained. Every symbol plays a role in this dialogue, and none of them is decoration.
Reading the Gain
Everything interesting hides in the Kalman gain . Look at its structure. The denominator contains , the predicted uncertainty of the measurement, plus , the sensor noise. The numerator is the cross-covariance between the state and measurement. So the gain is essentially a ratio:
When the model is confident ( small) or the sensor is poor ( large), the gain shrinks and corrections barely move the estimate. When the model is uncertain or the sensor precise, the gain gives more weight to the measurement. The filter continuously re-weights trust between its own model and incoming evidence, and it does so optimally in the mean-squared-error sense for this problem class. This trust-balancing interpretation is the single most transferable idea in the chapter: every estimator, learned or analytic, faces the same question of how much to believe the internal model versus the latest evidence, and the Kalman gain is the optimal answer in the linear-Gaussian setting treated here.
For the scalar observation case plotted below, with , the gain reduces to , where is the predicted variance. In multiple dimensions is a matrix, so neither its entries nor its eigenvalues generally follow the scalar curve.

Each curve traces the scalar trade-off at a different sensor quality. With a precise sensor () the gain climbs quickly: even modest model uncertainty hands most of the correction weight to the measurement. The noisy-sensor curve () remains the lowest of the three throughout the plotted range, but it is not always below the half-trust line: it crosses at and reaches at the right edge. In this scalar case, each crossing with the dotted half-trust line occurs exactly where . For a general observation matrix, inspect the full matrix gain and innovation covariance instead of applying this scalar crossing rule componentwise.
Two further facts deepen the picture. First, the covariance update does not depend on the observed values, so with , , , , and fixed, the full sequence of gains can be precomputed offline. Second, for a time-invariant system the gain converges to a fixed matrix solving a discrete algebraic Riccati equation under the usual stabilizability and detectability conditions. This is the object that connects filtering to optimal control. For linear-quadratic-Gaussian problems, the separation principle permits independent estimator and controller design with no loss of optimality. That independence of design generally disappears in nonlinear and learned settings, where the controller changes the distribution of states on which the estimator operates.