The Cholesky decomposition decomposes a symmetric positive-definite (SPD) matrix into a product of a lower triangular matrix and its transpose:

If matrix is positive semi-definite, then the diagonal entries of L are allowed to be zero.

Cholesky Decomposition Algorithm

Diagonal elements of :

Off-diagonal elements of :

Applications

The Cholesky decomposition enhances numerical stability when dealing with symmetric positive-definite matrices in solving linear systems or inverting matrices.

  • SPD matrices: No pivoting required to maintain numerical stability, because the positive-definite condition (remember that Cholesky is specifically for SPD matrices!) ensures that all pivot elements are positive and significantly reduces the risk of encountering very small (near-zero) pivot values that can lead to numerical instability.
  • Straightforward forward and backward substitution without the numerical difficulties associated with general matrices. This ensures more stable computations, especially in iterative algorithms where errors can accumulate.
  • Simplifies these operations by reducing the problem to two simpler systems of equations through forward and backward substitution.

Kalman Filter

For example, the Cholesky can be useful for Kalman Filter, where you have to solve for the Kalman gain by finding:

Specifically, calculating is equivalent to solving a linear system of equations ( is the same as ). This matrix is SPD by construction:

Symmetry:

  • (predicted state covariance) is symmetric by definition
  • When multiplied by on the left and on the right, it remains symmetric
  • (measurement noise covariance matrix) is also symmetric by definition maintains the symmetry

Positive-Definiteness

  • For a matrix to be positive-definite, it must satisfy the condition that for any non-zero vector , . In our case, is .
  • is positive definite to reflect the uncertainty in the system’s state estimation
  • is positive definite to reflect the uncertainty in measurements
  • Combination should still be positive definite

The primary scenario where might not be positive-definite (and thus not suitable for Cholesky decomposition) involves numerical inaccuracies or improper initialization, like floating-point arithmetic errors, or incorrect initialization.

Cholesky is also useful in calculating Unscented Kalman Filters.