Positive Definite Matrix Checker

Enter the entries a, b, c of the symmetric matrix.

Result

Positive definite
5.00
2.00

How it is calculated

You give the three distinct entries of the symmetric matrix with rows (a, b) and (b, c). The tool computes det = a·c − b² and then applies these tests in order: positive definite if a > 0 and det > 0; negative definite if a < 0 and det > 0; positive semidefinite if a ≥ 0, c ≥ 0 and det ≥ 0; negative semidefinite if a ≤ 0, c ≤ 0 and det ≥ 0; anything else is indefinite. Because the matrix is built from a, b, c, it is symmetric by design. The determinant and the entry a are shown to 2 decimals. Entries are plain numbers and can be negative or zero.

Worked example

Take the matrix with a = 2, b = −1, c = 3. Determinant = 2 × 3 − (−1)² = 6 − 1 = 5.00. The leading entry a = 2 is above 0 and the determinant 5 is above 0, so the first test is satisfied and the matrix is Positive definite. As a check, both eigenvalues, (5 ± √5) / 2, are positive (about 1.38 and 3.62). Changing b to 2 would give det = 6 − 4 = 2, still positive definite, but b = 3 gives det = −3 and an indefinite matrix.

Try this example →

Common mistakes

  • Checking only a and the determinant for semidefiniteness. With zeros allowed you must also check c; for a = 0, b = 0, c = −1 the tool correctly reports negative semidefinite.
  • Entering a non-symmetric matrix. The tool takes one value b for both off-diagonal positions, so for [[1, 2], [3, 1]] you would first have to symmetrise it, for example with b = (2 + 3) / 2.
  • Treating a positive determinant as proof of positive definiteness. If a is negative and det is positive, both eigenvalues are negative, so the matrix is negative definite.
  • Mixing up the roles of the entries. In [[a, b], [b, c]] the entries a and c are on the diagonal, and b is the repeated off-diagonal one.
  • Expecting a 3×3 or larger matrix to work. This tool classifies 2×2 matrices only.

About this calculator

For a 2×2 symmetric matrix written as [[a, b], [b, c]], its definiteness — whether the quadratic form it represents is always positive, always negative, or mixed — can be read directly from two numbers: the leading entry a and the determinant, det = ac − b². By Sylvester’s criterion applied to the 2×2 case, the matrix is positive definite if a is greater than 0 and the determinant is greater than 0; positive semidefinite if a, c and the determinant are all at least 0 (equality allowed — both diagonal entries must be checked, since leading minors alone do not settle semidefiniteness), with negative semidefinite as the mirrored case; negative definite if a is less than 0 and the determinant is greater than 0; and indefinite whenever the determinant is negative, meaning the matrix produces both positive and negative values depending on direction.

This classification matters across linear algebra and its applications: in optimization, the Hessian matrix of a function at a critical point must be positive definite for that point to be a local minimum (negative definite for a local maximum, indefinite for a saddle point); in statistics, a valid covariance matrix must be positive semidefinite; and in numerical methods, positive definiteness guarantees certain matrix decompositions (like the Cholesky decomposition) exist.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    For a Hessian-based test, the borderline cases deserve attention. The matrix with a = 1, b = 1, c = 1 comes back Positive semidefinite with a determinant of 0.00, which means the second-derivative test alone cannot call a minimum. A pair like a = 1, b = 2, c = 1 gives determinant -3.00 and Indefinite, a saddle. The tool handles 2 by 2 symmetric matrices only. What matrix sizes do you need?

Popular calculators

All Calculators