Calculator inputs
Choose the matrix order, enter a symmetric positive definite matrix, and optionally solve Ax = b.
Example data table
This worked example uses a classic symmetric positive definite matrix and a right-hand side vector that returns x = [1, 1, 1].
| Row | A row values | b value |
|---|---|---|
| 1 | 25, 15, -5 | 35 |
| 2 | 15, 18, 0 | 33 |
| 3 | -5, 0, 11 | 6 |
Expected lower triangular factor: [[5, 0, 0], [3, 3, 0], [-1, 1, 3]].
Formula used
Core factorization: A = LLT, where L is lower triangular.
Diagonal entry: Lii = √(aii - Σ Lik2) for k = 1 ... i-1.
Off-diagonal entry: Lij = (aij - Σ LikLjk) / Ljj for i > j.
Determinant: det(A) = (Π Lii)².
System solve: first solve Ly = b, then solve LTx = y.
Residual check: use the Frobenius norm ||A - LLT||F to verify reconstruction quality.
How to use this calculator
- Choose a matrix order from 2 × 2 up to 6 × 6.
- Enter a symmetric matrix. Keep symmetry assist enabled for faster entry.
- Adjust display precision and tolerance if you need stricter checks.
- Leave vector solving enabled if you also want a solution for Ax = b.
- Press Compute decomposition to show results above the form.
- Review L, LT, reconstruction, pivots, minors, and substitution steps.
- Use the export buttons to save the result summary as CSV or PDF.
Why Cholesky helps
Cholesky decomposition is faster and more stable than general LU methods when the matrix is symmetric positive definite.
- Reduces computation for structured matrices.
- Provides an efficient route to determinant evaluation.
- Makes repeated solves with different vectors easier.
- Supports error checking with reconstruction residuals.
FAQs
1) What kind of matrix works with Cholesky decomposition?
It works for symmetric positive definite matrices. The matrix must equal its transpose, and every leading principal minor must be positive. If those conditions fail, the factorization stops.
2) Why does the calculator test symmetry first?
Symmetry is required because Cholesky writes the matrix as LLT. Even small asymmetry can change the factorization path, so the calculator reports the maximum symmetry deviation before trusting the result.
3) What does a non-positive pivot mean?
A non-positive pivot means a diagonal square-root term became zero or negative. That indicates the matrix is not positive definite, or the chosen tolerance is too strict for the entered values.
4) Why is the determinant computed from diagonal pivots?
For A = LLT, the determinant of A equals det(L) multiplied by itself. Since det(L) is the product of its diagonal entries, det(A) becomes the square of that product.
5) What does the residual norm show?
The residual norm measures how close LLT is to the original matrix. Smaller values mean the reconstruction is accurate. Large values suggest entry mistakes, unsuitable tolerance, or numerical scaling issues.
6) Can this calculator solve linear systems too?
Yes. When the right-hand side vector is enabled, the calculator solves Ly = b first and then LTx = y. It also reports the residual b - Ax.
7) Why are leading principal minors listed?
They provide a practical positive-definiteness checkpoint. For a symmetric matrix, positive leading principal minors are a standard test confirming that Cholesky decomposition should exist.
8) When should I change the tolerance setting?
Change tolerance when values are extremely small, rounded, or noisy. A tighter tolerance catches tiny asymmetry, while a looser tolerance can prevent harmless floating-point noise from blocking decomposition.