Quick answer
A symmetric matrix A is positive definite if xᵀ A x > 0 for all nonzero x, equivalently if all eigenvalues are positive or all leading principal minors are positive.
Formula
- SPD required for real Cholesky
- Failure: nonpositive value under sqrt
- A = L Lᵀ when SPD
Introduction
The Cholesky Decomposition Calculator attempts Cholesky and reports when the matrix is not positive definite, which is often the fastest practical test on small sizes.
Positive definite is not the same as having positive entries. Construct counterexamples with mixed signs off the diagonal to see the difference.
Connect definitions with what is Cholesky decomposition and manual checks in how to perform Cholesky decomposition.
What positive definite means here
For symmetric A, positive definite is equivalent to all eigenvalues being positive, all leading principal minors being positive, or existence of a real nonsingular Cholesky factor.
Semidefinite allows zeros on the diagonal of L in limiting cases; this calculator targets strict SPD where square roots stay positive.
A matrix with positive entries can fail SPD if off-diagonal magnitudes are too large relative to diagonals.
Covariance matrices from data are symmetric and should be SPD after regularization; tiny negative eigenvalues from rounding are handled in advanced libraries, not in this teaching tool.
When Cholesky fails, diagnose: Was A symmetric? If yes, SPD likely failed. If not symmetric, fix entries before discussing definiteness.
Students should practice both a minor test and a Cholesky attempt to build intuition.
Tests you can use before Cholesky
- Leading principal minors det(A[1:k,1:k]) > 0
- Eigenvalues λᵢ > 0
- Cholesky diagonal updates stay positive
For 2×2 symmetric A, SPD is equivalent to A[1,1] > 0 and det(A) > 0.
For 3×3, check minors in order; one failure is enough to reject SPD.
The calculator implements the Cholesky test directly rather than printing eigenvalues.
Checking positive definiteness
- Confirm symmetry. Definiteness discussions for Cholesky assume symmetric A.
- Apply a 2×2 or 3×3 minor test on paper. Fast on exams.
- Enter A in the calculator. Read either L or an error.
- Interpret errors. Symmetry versus SPD messages point to different fixes.
- Regularize only when the course allows. Adding εI is common in data science, not in every linear algebra class.
SPD and non-SPD samples
A = [[2, -1], [-1, 2]] is symmetric with positive leading minors and succeeds with Cholesky.
A = [[1, 2], [2, 1]] has det negative; Cholesky fails when the sqrt argument goes negative.
Try both in the calculator to see success and failure messages side by side.

