Propagation with the Covariance Matrix
Statement
Given a random input vector x ∈ ℝn with mean μ and covariance matrix Σx, and a differentiable vector-valued map y = f(x) with f: ℝn → ℝm, the covariance of the output to first order is Σy = J Σx JT, where J is the m×n Jacobian Jij = ∂fi/∂xj evaluated at μ.
Why it matters
Every measured quantity carries uncertainty, and real experiments almost never measure the final quantity of interest directly — they measure several correlated inputs and combine them. The covariance matrix is the complete second-order description of that joint uncertainty, and the Jacobian law tells you exactly how it transforms when you push the inputs through any smooth function. It is the workhorse of least-squares fitting, Kalman filtering, GPS trilateration, particle-physics track reconstruction, and any calibration chain.
Crucially, it handles correlations. Naive scalar error propagation, applied component-by-component, silently assumes the inputs are independent and the outputs are uncorrelated. Both assumptions are usually false, and both can move an error bar by a large factor. The matrix form is the honest bookkeeping that keeps off-diagonal terms where they belong.
Assumptions
Derivation
Result
Reading. The output covariance is a two-sided congruence of the input covariance by the Jacobian: J maps the “shape” of the input uncertainty ellipsoid into output space, and the transpose on the right guarantees the result is again a symmetric, positive-semidefinite matrix. Diagonal entries of Σy are the variances of each yi; off-diagonal entries are the induced covariances — even if the inputs were uncorrelated, sharing input variables through J makes the outputs correlated.
Units check. Each Jacobian entry Jij has units [yi]/[xj]. A Σx entry has units [xj][xk]. The product (JΣxJT)il = ∑jk Jij (Σx)jk Jlk carries units ([yi]/[xj])·[xj][xk]·([yl]/[xk]) = [yi][yl], exactly a covariance of outputs.
Limiting cases
- Scalar output (m = 1): J is a row vector gT = (∂f/∂x1, …) and the formula collapses to σy2 = gTΣxg = ∑jk (∂f/∂xj)(∂f/∂xk)(Σx)jk, the standard scalar propagation law with covariance terms.
- Uncorrelated inputs: Σx = diag(σ12, …, σn2) and the scalar case reduces further to σy2 = ∑j (∂f/∂xj)2σj2, the familiar “add in quadrature” rule.
- Linear map f(x) = A x + b: the Jacobian is exactly A everywhere, so Σy = A Σx AT holds without any approximation and for any input distribution.
- Change of coordinates / rotation: if J = R is orthogonal (RTR = I), the transformation is a similarity that rotates the uncertainty ellipsoid; its eigenvalues (variances along principal axes) are preserved.
- Single input, single output: J = f′(μ) and σy = |f′(μ)| σx, the elementary one-variable rule.
Breaks when
- Strong nonlinearity over the input spread. If f curves appreciably across ±σ, the neglected second-order term is not small: the mean picks up a bias ½∑jk (∂2fi/∂xj∂xk)(Σx)jk, and the propagated variance can be wrong by tens of percent. Example: y = 1/x when σx/μx is not « 1.
- Singular or ill-conditioned Jacobian. Near a stationary point (∂f/∂xj → 0) the leading term vanishes and the variance is dominated by the discarded quadratic term; the linear estimate underpredicts — often catastrophically — the true spread. Classic case: an extremum, where y is quadratic in the deviation.
- Heavy-tailed or undefined-moment inputs. If Σx does not exist (Cauchy, some power-law tails), there is nothing to propagate; sample estimates of variance will not converge and the output error bar is meaningless.
- Discontinuous or non-smooth f. Thresholds, absolute values, rounding, or clamping have no Jacobian at the break point; the local linearisation is undefined and the formula cannot be applied there.
Failure modes
- Dropping the off-diagonal terms of Σx. Treating correlated inputs as independent and adding in quadrature; for strongly anti-correlated inputs this can overestimate the true error by a large factor (a difference of two positively correlated quantities is less uncertain than quadrature suggests).
- Forgetting the induced output correlations. Reporting only the diagonal of Σy and then feeding those “independent” variances into a further calculation, discarding the off-diagonal information that the shared inputs created.
- Evaluating J at the wrong point. Using the measured sample value instead of the best estimate of the mean, or (worse) leaving J symbolic and never numerically evaluating it at μ.
- Transpose slip. Writing JTΣxJ (which has the wrong dimensions n×n when m ≠ n) instead of JΣxJT.
- Mixing standard deviations and variances. Placing σ rather than σ2 on the diagonal of Σx, or reporting √(diag Σy) as a variance.
- Unit inconsistency in J. Building the Jacobian from a formula written in one unit system while Σx is expressed in another (degrees vs radians is the perennial offender in angle derivatives).
Discussion
The formula is a statement about how quadratic forms transform under linear maps. The input uncertainty is geometrically an ellipsoid δxTΣx−1δx = const in input space; the Jacobian maps that ellipsoid, to first order, onto a new ellipsoid in output space, and JΣxJT is precisely the covariance whose inverse defines the image. That is why the construction always returns a symmetric positive-semidefinite matrix: for any vector v, vT(JΣxJT)v = (JTv)TΣx(JTv) ≥ 0 because Σx is itself positive-semidefinite. Positive-semidefiniteness (not strict positivity) is important: if J has a nontrivial null space — fewer effective outputs than inputs — some directions in output space carry zero variance, and Σy is genuinely singular.
The result generalises two prior results into one object. The scalar first-order error-propagation formula and the variance-of-linear-combinations rule are both special cases: the former is the single-output projection, the latter is the exact statement for the linear map f = A x. Seeing them as diagonal-and-scalar shadows of the matrix law is the conceptual payoff — you stop memorising three formulas and carry one.
Connections run deep in applied statistics. In linear least squares, the fitted parameters are θ̂ = (ATW A)−1ATW y, a linear map of the data, so their covariance Σθ = (ATW A)−1 (with W = Σy−1) is exactly this law applied to the design matrix. In the Kalman filter, the predict step is P− = F P FT + Q — the same congruence by the state-transition Jacobian, with process noise added. The extended Kalman filter is nothing more than this formula with F the Jacobian of a nonlinear dynamics evaluated at the current estimate, which is also where its well-known divergence under strong nonlinearity comes from.
A subtle and important point is that JΣxJT propagates only the second moment, and for a nonlinear f the output mean is not simply f(μ). The next term in the expansion contributes a deterministic bias E[yi] ≈ fi(μ) + ½ tr(Hi Σx), where Hi is the Hessian of the i-th component. Practitioners who need the mean to matching order, or who face appreciable curvature, abandon the linearisation for the unscented transform (propagate a deterministic set of sigma points and reconstruct mean and covariance) or Monte Carlo. These methods reproduce JΣxJT in the small-fluctuation limit but remain correct when it fails, which is exactly why they exist.
Common misconceptions. The formula does not require the inputs to be Gaussian — it is a statement about second moments alone and holds for any distribution with a finite covariance. What Gaussianity buys you is that, for a linear map, the output is again exactly Gaussian and so Σy is the complete description; for a nonlinear map even Gaussian inputs give non-Gaussian outputs. A second misconception is that uncorrelated inputs give uncorrelated outputs: sharing input variables through the rows of J generically produces off-diagonal terms in Σy.
Worked examples
Example 1 — Polar to Cartesian with correlated-looking output. A radar returns range r and bearing θ. Convert to Cartesian (x, y) = (r cosθ, r sinθ) and propagate the covariance. Take r = 100 m with σr = 2 m, θ = 30° with σθ = 0.02 rad, uncorrelated inputs.
Reading. The Cartesian position uncertainty is 2.0 m in each axis and, for this particular geometry, uncorrelated. The output correlation is a coincidence of these numbers, not a general feature — at other bearings Cov(x,y) ≠ 0 even though the inputs stay independent.
Example 2 — Sum and difference of two correlated measurements. Two voltmeters read V1 = 5.00 V and V2 = 3.00 V, each with σ = 0.10 V, but they share a common reference so their readings are positively correlated with correlation coefficient ρ = 0.6. Compute the covariance of the sum s = V1 + V2 and difference d = V1 − V2.
Reading. Ignoring the correlation (setting Cov = 0) would give σs = σd = 0.141 V for both. The shared reference makes the sum more uncertain (0.179 V) and the difference less uncertain (0.089 V). Ratios and differences of correlated quantities routinely beat the quadrature estimate — this is the whole reason to keep off-diagonal terms.
Problems
- (Warm-up) For y = x1x2 with x1 = 4.0 ± 0.2, x2 = 5.0 ± 0.3 (uncorrelated), find σy using the Jacobian law.
Solution
J = (∂y/∂x1, ∂y/∂x2) = (x2, x1) = (5.0, 4.0). With Σx = diag(0.04, 0.09): σy2 = (5.0)2(0.04) + (4.0)2(0.09) = 1.00 + 1.44 = 2.44, so σy = 1.56. Since y = 20.0, the relative error 1.56/20.0 = 7.8% equals √((0.2/4)2 + (0.3/5)2) = √(0.0025+0.0036) as expected for a product. - (Correlation matters) Repeat problem 1 but now with correlation ρ = −0.5 between x1 and x2. Does σy rise or fall?
Solution
Cov = ρσ1σ2 = (−0.5)(0.2)(0.3) = −0.030. The scalar law gains a cross term 2J1J2Cov = 2(5.0)(4.0)(−0.030) = −1.20. So σy2 = 2.44 − 1.20 = 1.24, σy = 1.11. Negative correlation reduces the product's uncertainty from 1.56 to 1.11. - (Two outputs) Let (u, v) = (x + y, x2) with x = 2.0, y = 1.0, σx = 0.1, σy = 0.2, uncorrelated. Find the full 2×2 output covariance, including Cov(u,v).
Solution
J = ( 1 1 ; 2x 0 ) = ( 1 1 ; 4 0 ). Σx = diag(0.01, 0.04). Var(u) = 1·0.01 + 1·0.04 = 0.05. Var(v) = 42·0.01 + 0 = 0.16. Cov(u,v) = (1)(4)(0.01) + (1)(0)(0.04) = 0.04. So Σy = ( 0.05 0.04 ; 0.04 0.16 ). Note the outputs are correlated (through the shared variable x) despite independent inputs; correlation coefficient = 0.04/√(0.05·0.16) = 0.45. - (Rotation preserves area) An uncertainty ellipse has Σx = diag(9, 1) (units cm2). Apply a 45° rotation R = (1/√2)( 1 −1 ; 1 1 ). Find Σy and verify its determinant (and hence the ellipse area) is unchanged.
Solution
Σy = RΣxRT. Compute RΣx = (1/√2)( 9 −1 ; 9 1 ); then times RT = (1/√2)( 1 1 ; −1 1 ): Σy = ½( 9+1 9−1 ; 9−1 9+1 ) = ( 5 4 ; 4 5 ). det Σy = 25 − 16 = 9 = det Σx (9·1). Rotation preserves the determinant because det R = 1, so det(RΣxRT) = det Σx; the ellipse area π√det is invariant. - (Where it breaks) For y = x2 with x = 0.0 ± 0.5, the Jacobian law predicts σy = 0. Explain why, and compute the true standard deviation of y assuming x is Gaussian.
Solution
J = 2x = 0 at x = 0, so the first-order estimate gives σy = |2x|σx = 0 — a singular Jacobian (stationary point), a documented failure regime. The true spread lives entirely in the discarded quadratic term. For x ~ N(0, σ2) with σ = 0.5: E[y] = E[x2] = σ2 = 0.25; E[y2] = E[x4] = 3σ4 = 3(0.0625) = 0.1875; Var(y) = 0.1875 − 0.0625 = 0.125, so σy = 0.354 (= √2 σ2), definitely not zero. The lesson: at a stationary point of f, propagate with the second-order term or by direct computation.