The behavior of the Cholesky algorithm depends entirely on what kind of matrix it is asked to factor — positive definite, positive semi-definite, indefinite, non-symmetric, or merely near-singular. The table below collects each scenario, what the algorithm does in each case, and the standard remedy when the straightforward A=LLT form does not apply. The "positive semi-definite" row links back to the pivoted-Cholesky treatment above. Read the table below as a diagnostic rather than a list of caveats. Cholesky is unusual among algorithms in that its failure modes are informative: it does not merely stop, it stops in a way that identifies what is wrong with the matrix. The split is between the cases that run to completion and the cases where the halt itself is the answer.
Decompositions · Cholesky
What the algorithm does with each matrix
The algorithm is also a test. Feed it a matrix and how it terminates classifies the matrix — completion means positive definite, and each way of failing identifies a different reason.
5cases
The algorithm completes2
1all λi>0 A=LLT, all ℓii>0 The intended case. Every square root is taken of a strictly positive number, the diagonal of L comes out positive, and the factorization is unique. Half the cost of LU because symmetry means only one triangle is computed. 2smallest λ near zero runs; ℓii very small Completes without complaint while the accuracy quietly degrades — small pivots amplify rounding into L. The failure is silent, so the smallest diagonal entry is worth monitoring; adding εI regularizes at the cost of solving a slightly different problem. The algorithm halts — and the halt is the answer3
3some λi=0 zero appears on the diagonal of L Rank-deficient rather than wrong. Pivoted Cholesky, PTAP=LLT, handles it by reordering so the zeros arrive last — the factorization exists but is no longer unique. 4some λi<0 negative under the square root
No real L exists, and the algorithm discovers this the moment it tries. Use LDLT, which permits negative entries in D and so handles any symmetric matrix — at the price of no longer testing definiteness. 5A=LLT is impossible Any product LLT is symmetric by construction, so a non-symmetric A has no such factorization whatever its eigenvalues are. This is a precondition rather than an outcome — check symmetry first and use LU if it fails. That property is what makes it the standard definiteness test. The alternative is computing every eigenvalue and checking the signs, which costs more, converges iteratively rather than terminating, and returns approximations that then have to be judged against zero. Cholesky answers in 31n3 operations, finishes in a fixed number of steps, and hands back the factorization as well when the answer is yes. One case deserves separate attention because it does not announce itself. A matrix that is positive definite but nearly singular runs to completion — no error, no halt — while the small pivots quietly amplify rounding error through L. The result looks like a successful factorization and is not a reliable one, which is why the smallest diagonal entry of L is worth reading rather than assuming.