Kalman filter (linear-algebra view)
The Kalman filter estimates the hidden state of a moving system from noisy measurements, updating its best guess each time new data arrives. Think of tracking a plane on radar: you predict where it should be, see a noisy blip, and blend the two by how much you trust each. The whole dance is matrix arithmetic.
It carries two objects: the state estimate x_hat (your best guess) and the covariance P (how uncertain you are, as a matrix). The predict step pushes both forward through the dynamics A: x_hat -> A x_hat and P -> A P A^T + Q, adding process noise Q. The update step folds in a measurement z through the observation matrix H, weighting it by the Kalman gain K = P H^T (H P H^T + R)^-1, where R is measurement noise.
The deep point is that this is recursive least squares: each step solves a weighted least-squares blend of prediction and measurement, but instead of refitting all history it updates the running estimate and its covariance. The gain K is exactly the optimal trade-off; the covariance update P -> (I - K H) P is pure linear algebra and tracks how much the new data shrank the uncertainty ellipsoid.
Why it matters: the Kalman filter is everywhere motion meets sensors, from GPS and spacecraft navigation to robotics and finance. The caveats: it is provably optimal only for linear dynamics with Gaussian noise; real systems need extensions (extended or unscented Kalman filters), and the estimate is only as good as the noise covariances Q and R you supply.
Covariance and gain updates are pure linear algebra; the gain balances trust in model vs sensor.
The Kalman gain K is a precision-weighted average: it leans toward the measurement when sensors are accurate (small R) and toward the prediction when the model is trusted (small P). The covariance P never needs the actual data, so uncertainty can be precomputed.