Exercises — Kalman gain — minimizes trace of covariance
Before we start, here is the toolbox, all in one place, so no symbol appears unexplained.
Here, is our prediction and its uncertainty (variance); is the sensor reading; turns a state into what the sensor should read; is the sensor noise variance; is the gain, the dial in (in the scalar case) telling us how far to slide from prediction toward measurement.
The figure below makes the "slider" idea concrete using the numbers from Problem 2.2: a prediction at , a measurement at , and the fused estimate landing at because the gain is . Look at how the orange diamond sits between the two sources, pulled toward the measurement.

L1 — Recognition
Problem 1.1
In the scalar update, which of these is the innovation, and which is the innovation covariance? (a) (b) (c)
Recall Solution 1.1
WHAT: match names to formulas.
- (a) is the innovation : measurement minus what we expected to measure.
- (b) is the innovation covariance : the prior uncertainty pushed into measurement space, plus sensor noise.
- (c) is the gain — not asked, but good to recognise. WHY it matters: tells you how surprised you are; tells you how surprising a surprise of that size is. You always divide the first by the second (via ).
Problem 1.2
A scalar filter has , , (a perfect sensor). Without computing derivatives, what should be, and what does equal?
Recall Solution 1.2
WHAT: a perfect sensor () has zero noise, so we should trust it fully. . Then . With : . The estimate equals the measurement. ✅ WHY: means the slider is pushed all the way to the measurement.
L2 — Application
Problem 2.1
Scalar: , , . Compute , , and .
Recall Solution 2.1
Step 1 (build ): . Step 2 (gain): . Step 3 (posterior): at the optimum, . WHY the sanity check: is smaller than both and . Fusion beats either source alone — that is the entire point.
Problem 2.2
Same numbers as 2.1 (). The prediction was , the sensor reads . Find the corrected estimate .
Recall Solution 2.2
Step 1 (innovation): . Step 2 (correct): . WHY it lands where it does: the answer sits between prediction and measurement , closer to the sensor because means we trust the sensor more here. This is exactly the slider figure above.
Problem 2.3
Verify the Joseph form gives the same as the shortcut for the optimal in Problem 2.1.
Recall Solution 2.3
Joseph: . ✅ Shortcut: . ✅ They agree — because is optimal.
L3 — Analysis
Problem 3.1
For the scalar case with , , , write as a function of . Show it is a parabola, find its minimum by differentiating, and confirm you recover .
Recall Solution 3.1
Step 1 (expand): . WHAT this is: a parabola in opening upward (coefficient ), so it has a unique minimum — this is the "U-shaped valley" from the parent note. Step 2 (differentiate): . Set to zero: . ✅ Step 3 (value at minimum): . ✅ WHY differentiate here: minimizing the trace is setting the derivative of this parabola to zero — the general matrix derivation collapses to exactly this in the scalar case. The coefficient is the positive second derivative guaranteeing a minimum, not a maximum.
The figure below plots this exact parabola. Trace the violet curve: it bottoms out at the orange dot (, ), rises to at (over-trusting the model, navy dot) and back up to at (over-trusting the sensor, magenta dot). One valley, one optimum.

Problem 3.2
Suppose an engineer hard-codes (full trust in the sensor) even though , , . Compute the actual resulting using the Joseph form and compare with the optimal .
Recall Solution 3.2
Must use Joseph ( is not optimal): . Compare: optimal gave . So over-trusting the sensor gives — worse, because we swallowed all the sensor noise and threw away the prediction's help. WHY: at the parabola gives , past the bottom of the valley (magenta dot in the figure above). Extra gain now adds noise faster than it removes prediction error.
L4 — Synthesis
Problem 4.1
Two sensors read the same scalar state, independently: with variance and with variance . Starting from a "flat" prior (infinite , meaning no useful prediction), fuse them by applying the Kalman update twice in sequence and find the final variance. Then compare to the classic inverse-variance-weighting result .
Recall Solution 4.1
Step 1 — first measurement with an infinite prior. We must be careful: with the shortcut is the indeterminate form , so we use the Joseph form (valid for any , no cancellation assumed). The optimal gain is . Substitute: Now take : divide top and bottom by , giving . So after step 1, — the first measurement simply becomes the estimate, but the Joseph form got us there cleanly without any sleight of hand. Step 2 — fuse : now use , , . , , . Cross-check with inverse-variance weighting: . ✅ WHY this is beautiful: the Kalman filter, applied recursively, reproduces optimal least-squares / sensor fusion weighting. Each measurement is folded in one at a time, yet the answer matches processing them all at once.
Problem 4.2
A 2-state filter tracks position and velocity. The prior covariance and measurement model are Only position is measured (so is a single scalar here). Compute , the gain (a vector), and the posterior .
Recall Solution 4.2
Step 1 (): . Step 2 (): . Step 3 (): , so . Step 4 (): here is the identity. , so . . WHY velocity is untouched: the second entry of is , so velocity variance stays at . A position sensor cannot directly improve velocity when the two are uncorrelated in (off-diagonals are zero). Position variance drops . See Covariance Matrices and Uncertainty.
L5 — Mastery
Problem 5.1
Prove, for the scalar case, that the optimal (taking ) always satisfies for finite positive , and that . Interpret both facts.
Recall Solution 5.1
Bound on : with , . Since and , the numerator is positive and strictly less than the denominator, so . As , ; as , . The dial lives strictly inside — never over-trusts either source. ✅ Posterior: . This is the harmonic-style combination (product over sum). Because (multiply top and bottom insight: ) and symmetrically , we get . ✅ Interpretation: fusing two independent estimates is always strictly better than the best single one — the certainty adds like parallel resistors: .
Problem 5.2
Using , , confirm the parallel-resistor identity numerically, and state what this means for stacking many sensors.
Recall Solution 5.2
. So . ✅ Matches Problem 2.1's . Meaning: each new independent measurement adds its precision (called information). Stack identical sensors of noise and the fused precision is — uncertainty shrinks toward zero as grows. This "information adds" view underlies the EKF and all recursive fusion.
Recall Feynman recap of the whole ladder
L1: name the parts (, , ) so no symbol is a stranger. L2: plug numbers in and watch land between the two sources, pulled by the size of the gain. L3: see the trace of is a U-shaped parabola with exactly one bottom — the optimum is a balance, not an extreme. L4: fold measurements in one at a time and recover the classic inverse-variance (least-squares) weighting. L5: prove fusion is always a win because precisions (information) add like parallel resistors, so can only shrink. Same slider, five depths — from "spot the pieces" to "prove it can never hurt."
Connections
- Kalman gain — minimizes trace of covariance (parent)
- Kalman Filter — Update Step
- Kalman Filter — Predict Step
- Covariance Matrices and Uncertainty
- Least Squares Estimation
- Innovation and Residuals
- Joseph Form Covariance Update
- Extended Kalman Filter (EKF) in GNC
- Sensor Fusion in Navigation