Matrices need to be positive definite enough to overcome numerical roundoff:
The smallest eigenvalue is effectively zero to machine precision:
The decomposition can be computed when the precision is high enough to resolve it:
s is a sparse tridiagonal matrix:
The Cholesky decomposition is computed as a dense matrix even if the result is sparse:
Using
LinearSolve will give a
LinearSolveFunction that has a sparse Cholesky factorization: