Positive Definite Matrix Checker
Check whether a symmetric matrix is positive definite using Sylvester's criterion.
Check whether a symmetric matrix is positive definite using Sylvester's criterion.
How Positive Definite Matrix Checker Works
For a symmetric matrix, Sylvester's criterion says the matrix is positive definite exactly when every leading principal minor (the determinant of the top-left k×k block, for every k) is positive. The calculator computes each of these minors and checks that all of them come out greater than zero.
Who Uses Positive Definite Matrix Checker and Why
- Confirming a Hessian matrix at a critical point represents a true local minimum during an optimization problem.
- Checking whether a computed covariance matrix is valid (a proper covariance matrix must be positive semi-definite, and often strictly positive definite in practice).
- Verifying a quadratic form used in a statistics or engineering calculation is always positive, as required by the underlying model.
Mistakes to Avoid
- Testing a matrix that isn't symmetric — positive definiteness, and the leading-minor test used to check it, is defined for symmetric matrices, so a non-symmetric input should be symmetrized or reconsidered first.
- Checking only the largest leading principal minor instead of every one of them — Sylvester's criterion requires ALL leading principal minors (1×1, 2×2, up through the full matrix) to be positive, not just the final determinant.
- Confusing positive definite with positive semi-definite — definite requires strictly positive minors, while semi-definite allows zero; they're related but distinct conditions with different tests.
Tips for Best Results
- If your matrix isn't symmetric to begin with, positive definiteness isn't the right question to ask — symmetrize it first (average it with its transpose) if that's appropriate for your use case, or reconsider whether this is the right test.
- A positive definite Hessian at a critical point is the standard confirmation in calculus-based optimization that you've found a genuine local minimum rather than a saddle point.
Fixing Common Problems
My matrix is symmetric and looks fine, but one leading minor came out negative. — A single negative leading principal minor is enough to fail the test — positive definiteness requires every one of them positive, so even one exception disqualifies the matrix, regardless of how the others look.
Terms Explained
Sylvester's criterion: A test stating a symmetric matrix is positive definite exactly when every leading principal minor is positive.
Leading principal minor: The determinant of the top-left k×k block of a matrix, for each k from 1 up to the full matrix size.