Compute the Cholesky factorization of a symmetric positive definite matrix A, such that A = LLT, and view the detailed step-by-step calculations and formulas used.
Recommended: 2×2 to 4×4 for clearer step-by-step derivations.
Index reference for L (lower triangular):
Each element of L is computed using the classic Cholesky formulas for diagonal terms Lii and sub-diagonal terms Lij, i > j.
This section computes L·LT and compares it with your input matrix A, showing both the reconstructed matrix and the element-wise differences.
For a symmetric positive definite matrix A ∈ ℝn×n, the Cholesky factorization writes A = LLT, where L is a lower triangular matrix with positive diagonal entries.
We construct L row by row. For indices in 1-based notation:
If, for some i, the quantity under the square root becomes non-positive, the matrix is not positive definite and the Cholesky factorization fails.
For i = 1 to n
for j = 1 to i
sum = Σ (from k = 1 to j−1) L[i, k] · L[j, k]
if i = j then
L[i, j] = sqrt( A[i, i] − sum ) # diagonal
else
L[i, j] = ( A[i, j] − sum ) / L[j, j] # below diagonal
end if
end for
end for
The webtool above implements exactly this scheme and shows each numerical step used to compute L from your input matrix A.
© 2025 RHCepeda Engineering Services. All rights reserved.