Intuition The one idea behind everything
A Kalman filter keeps two numbers about a hidden quantity: its best guess and how unsure it is about that guess. Every symbol on the parent page is just bookkeeping for those two things — the guess and the doubt — as they get pushed through physics and corrected by sensors.
This page assumes you know nothing . Before you touch the predict/update equations in the parent topic , you must be fluent in a small pile of symbols. We build them one at a time, each from a picture, each earning the next.
Everything is about a bump. A "guess with doubt" is drawn as a bell curve : the peak sits at your best guess, and the width says how unsure you are. Narrow bump = confident. Wide bump = clueless.
Definition What a number, a vector, and a matrix each
are
A scalar is a plain single number: 10 , − 3.2 , σ 2 . Picture: a point on a line.
A vector is a stack of numbers describing several things at once. Picture: an arrow, or a labelled column.
A matrix is a grid of numbers that transforms one vector into another. Picture: a machine with an arrow going in and a (possibly rotated/stretched) arrow coming out.
The hidden thing we care about is the state x . In GNC it usually bundles several physical quantities:
x = [ p v ] ⟸ position p and velocity v , stacked
vector , not just one number?
A spacecraft's state is not one fact — it is position and velocity and attitude all at once, and they influence each other. A vector lets us carry them together and a matrix lets us describe how one affects another. That coupling is the whole reason a Kalman filter is more than a running average.
x k means "the state at time step k ". The little k is a clock tick: k − 1 is the previous instant, k is now, k + 1 is next. We build State-space representation out of exactly this indexing.
Definition Truth vs. estimate
x (no hat) = the true state . Real, but hidden — you never get to read it directly.
x ^ (with a hat) = your estimate of it — the peak of your bump.
Read x ^ aloud as "x-hat". The hat always means "my best guess of" , never "the truth" .
This distinction is the most-missed idea in the whole subject. Every time you see a hat, remind yourself: this is a belief, not a fact.
Definition Variance = squared width of doubt
Variance , written σ 2 , is a number measuring how spread-out the bump is. Big σ 2 = wide bump = very unsure. Small σ 2 = narrow bump = confident.
The plain width σ (no square) is the standard deviation — a typical distance from the peak. We square it because, as you'll see, doubts combine cleanly when squared.
inverse variance matters
The parent note fuses two guesses by weighting each by 1/ σ 2 . That quantity — one over variance — is called precision . Precision is "how sharp is my knowledge". The key fact: precisions add when you combine independent information. Two blurry photos of the same scene stacked give a sharper one; that is precision adding.
One number (σ 2 ) captures doubt about one quantity. But x is a vector, so we need doubt about each entry and how their doubts are linked . That bookkeeping is the matrix P .
Definition Covariance matrix
P
P = E [ ( x − x ^ ) ( x − x ^ ) ⊤ ]
The diagonal entries are the variances of each state component (doubt in position, doubt in velocity).
The off-diagonal entries are covariances : how a wrongness in one component travels into another.
Picture: instead of a 1-D bump, a tilted ellipse of "likely places the truth could be". Diagonal = size along each axis; off-diagonal = tilt.
Intuition Why the ellipse tilts (Example 2 on the parent)
When the parent gets P − = [ 2 1 1 1 ] , that off-diagonal 1 means a velocity error leaks into a future position error — the two doubts are correlated. The ellipse tilts. Read Covariance matrices and Gaussian distributions alongside this for the full geometry.
The symbol E [ ⋅ ] means expectation — the long-run average if you repeated the experiment forever. Picture: run the noisy world a million times, average the result. That is all E ever means.
The superscript ⊤ (as in A ⊤ ) is transpose : flip a matrix over its diagonal, turning rows into columns. Picture: a grid reflected across its top-left-to-bottom-right line. We need it because a column times a row builds a whole grid — exactly the outer product inside P .
w ∼ N ( 0 , Q )
N names the Gaussian (bell-curve) distribution.
The first slot is the mean (where the peak sits): here 0 , meaning the noise has no built-in bias.
The second slot is the covariance (the width): here Q .
∼ reads "is distributed as" — "w is drawn from this bell curve".
Two noises appear on the parent:
w k ∼ N ( 0 , Q ) — process noise . Picture: little random shoves the physics model fails to predict (wind gusts, unmodelled forces). Q = how big those shoves are.
v k ∼ N ( 0 , R ) — measurement noise . Picture: the jitter on a sensor reading. R = how shaky the sensor is.
Q and R are the same kind of thing."
Why it feels right: both are "noise covariances", both blur the bump.
The fix: Q blurs your model (used in predict), R blurs your sensor (used in update). Mixing them up swaps which side of the fusion you distrust.
These three matrices are the "machines" that connect states, controls, and measurements.
Definition The three machines
F = state-transition matrix : takes the old state and rolls physics forward one tick. Picture: "where will I be next, if nothing surprises me?" For constant velocity, F = [ 1 0 1 1 ] says new position = old position + old velocity·Δ t .
B u k = the known control input : what you deliberately did (fired a thruster). B maps the command u k into its effect on the state.
H = observation matrix : takes a state and predicts what the sensor should read. Picture: a translator from "true world" units into "sensor" units. If the sensor reads position directly, H = [ 1 0 ] .
H at all
Sensors rarely measure the state directly. A GPS gives position but not velocity; a rate gyro gives angular rate but not angle. H is the bridge that lets us compare a full state estimate against a partial, unit-mismatched reading. Without H , "measurement minus prediction" would be nonsense subtraction. See IMU and GPS sensor fusion .
Definition The three update characters
z k = the actual number the sensor spat out this tick (the measurement ).
y k = z k − H x ^ k − = the innovation , or "surprise": measurement minus what we predicted the sensor would say . Picture: the gap between the arrow you expected and the dot the sensor gave.
K k = the Kalman gain : a number (or matrix) between "ignore the sensor" and "trust it fully", saying how much of the surprise to believe .
Intuition Why "surprise", not "error"
You cannot compute measurement minus truth — truth is hidden. The only thing you can actually subtract is measurement minus your prediction . That computable gap is the innovation, and it is the only correction signal the filter ever sees.
The superscript minus, as in x ^ k − and P k − , marks a prior — before the measurement is folded in ("predicted, not yet corrected"). No minus = posterior , after correction. Picture: minus = "coasting", no-minus = "just snapped to the sensor".
The parent finds the best gain by minimising doubt. Two tools do that:
Definition Derivative — the slope tool
The derivative d x d measures the slope of a curve at a point. Picture: the steepness of a hill under your foot. At the bottom of a valley the slope is flat — zero. That is why "differentiate and set to zero" finds a minimum.
Intuition Why calculus enters the gain derivation
"Best estimate" means "least doubt". Doubt is a curve as a function of the gain K . The lowest point of that curve is where its slope is zero — so we take the derivative with respect to K , set it to 0 , and solve. That single move produces the Kalman gain formula. This is the same optimisation spirit as Recursive Least Squares .
Definition Trace — turning a matrix of doubt into one number
To minimise a matrix P we need a single number to shrink. The trace tr ( P ) is the sum of the diagonal — the total variance across all state components. Picture: add up the squared axis-lengths of the doubt-ellipse. Shrinking the trace shrinks overall doubt.
hat x-hat estimate vs truth
measurement z, innovation y
Once these foundations are solid, the two big steps (predict, update) are just this machinery applied twice: push the bump forward with F (widen by Q ), then squeeze it toward the sensor with K . From here you can also climb to the Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF) for nonlinear worlds, all resting on Bayesian inference .
Test yourself — cover the right side and answer:
What does a hat, as in x ^ , always mean? My best estimate of a quantity, never the true value.
What does variance σ 2 measure, as a picture? The squared width of the belief bump — big means unsure.
What is precision and what special property does it have? 1/ σ 2 ; precisions of independent estimates add .
What lives on the diagonal of P vs. the off-diagonal? Diagonal = variance of each component; off-diagonal = how their doubts are correlated (the ellipse's tilt).
Read w k ∼ N ( 0 , Q ) in plain words. w k is drawn from a bell curve centred at zero with covariance (width) Q .
What is the difference between Q and R ? Q is model/process noise (predict step); R is sensor/measurement noise (update step).
What does the matrix F do? Rolls the state forward one time step using the physics model.
Why do we need H ? It translates a state into the units/subset the sensor actually reports, so measurement and prediction can be compared.
What is the innovation y k , exactly? Measurement minus predicted measurement, z k − H x ^ k − — the computable surprise.
What does a superscript minus (as in P k − ) signify? A prior — value before the measurement is folded in.
Why does the gain derivation use a derivative set to zero? To find the K that minimises total doubt; the minimum of a curve is where its slope is zero.
What does tr ( P ) represent? Total variance across all state components — the single number we minimise.