Positive Definite Matrix Checker

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction: What positive definite means

A real symmetric matrix A is positive definite when the quadratic form x^T A x is positive for every nonzero vector x. Geometrically, the matrix curves upward in every direction. That is why positive definite matrices appear in optimization, Hessian tests, covariance checks, least-squares problems, energy functions, and stability analysis.

This checker is built for 3x3 real symmetric matrices. Enter all nine entries, and make sure mirrored entries match: a12 = a21, a13 = a31, and a23 = a32. If the matrix is not symmetric, the calculator stops instead of applying a criterion that would not be valid.

Sylvester's criterion

For a real symmetric 3x3 matrix, Sylvester's criterion says the matrix is positive definite exactly when all leading principal minors are positive:

If D1 > 0, D2 > 0, and D3 > 0, every nonzero vector produces x^T A x > 0. If any leading minor fails that strict sign test, the matrix is not positive definite.

Semidefinite and indefinite cases

Leading minors alone are enough for strict positive definiteness and strict negative definiteness, but they are not enough to prove semidefiniteness. For positive semidefinite matrices, all principal minors must be nonnegative. For negative semidefinite matrices, the principal minors must match the signs of -A: odd-order principal minors are nonpositive and even-order principal minors are nonnegative.

The result panel therefore reports the leading minors used for Sylvester's criterion and uses all 1x1, 2x2, and 3x3 principal minors when it labels a matrix positive semidefinite, negative semidefinite, or indefinite.

Worked examples

The matrix [[2, 0, 0], [0, 3, 0], [0, 0, 5]] is positive definite. Its leading minors are 2, 6, and 30, all positive. The associated quadratic form is 2x^2 + 3y^2 + 5z^2, which is positive unless x = y = z = 0.

The matrix [[1, 1, 0], [1, 1, 0], [0, 0, 2]] is positive semidefinite but not positive definite. One direction has zero curvature because the first two rows are dependent. Its leading determinant D2 is zero, and all principal minors are nonnegative.

The matrix [[1, 0, 0], [0, -1, 0], [0, 0, 2]] is indefinite because x^T A x can be positive or negative depending on the direction. A positive definite matrix cannot have that mixed curvature.

Interpreting the classification

Classification Meaning
Positive definite x^T A x is strictly positive for every nonzero vector. Optimization Hessians indicate a strict local minimum.
Positive semidefinite The quadratic form is never negative, but it can be zero in at least one nonzero direction.
Negative definite x^T A x is strictly negative for every nonzero vector. Optimization Hessians indicate a strict local maximum.
Indefinite The quadratic form takes both positive and negative values, which is typical of saddle behavior.

Limitations

The calculator uses floating-point arithmetic and a small tolerance for values very close to zero, so matrices near the boundary between definite and semidefinite can be sensitive to rounding. It is intended for numeric 3x3 symmetric matrices. For larger matrices, exact symbolic entries, or high-stakes numerical work, verify with eigenvalues, a Cholesky factorization, or a numerical linear algebra package.

How to use this calculator

  1. Enter a11 using the unit or time period shown by the field.
  2. Enter a12 using the unit or time period shown by the field.
  3. Enter a13 using the unit or time period shown by the field.
  4. Run the calculation and compare the output with a second scenario before acting on it.

Formula: how the estimate is built

The result can be read as result = f(a, b, c), where those inputs represent a11, a12, a13. Keep money, time, distance, percentage, and count fields in the units requested by the form.

Enter matrix entries above.

Arcade Mini-Game: Positive Definite Matrix Checker Calibration Run

Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.