Cholesky Decomposition Webtool

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.

1 · Matrix size

Recommended: 2×2 to 4×4 for clearer step-by-step derivations.

2 · Enter matrix A
Matrix must be symmetric and positive definite.
A = LLT
3 · Resulting L matrix

Index reference for L (lower triangular):

4 · Detailed calculation

Each element of L is computed using the classic Cholesky formulas for diagonal terms Lii and sub-diagonal terms Lij, i > j.

Verification: Check that A = LLT

This section computes L·LT and compares it with your input matrix A, showing both the reconstructed matrix and the element-wise differences.

Formulas used in the algorithm

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.

General element-wise formulas

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.

Algorithmic pseudocode (row-wise construction)

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.