Positive Definite Matrix Calculator
Introduction: Positive definite matrices in a 3x3 checker
This positive definite matrix calculator is designed for real symmetric 3x3 matrices, where the sign of the quadratic form xTAx determines whether the matrix curves upward in every direction. In applications such as optimization, covariance modeling, stiffness matrices, and Hessian testing, the distinction between positive definite, semidefinite, and indefinite is not just a label; it changes how the matrix behaves when it multiplies a vector.
Enter all nine entries exactly as they appear in the matrix. The calculator expects a symmetric input, so a12 must equal a21, a13 must equal a31, and a23 must equal a32. If those mirrored entries differ, the matrix is not treated as a valid candidate for Sylvester's criterion, because the definiteness test shown here is only meaningful for a real symmetric matrix.
Sylvester's criterion for a 3x3 positive definite matrix
For a real symmetric 3x3 matrix, Sylvester's criterion gives a compact way to decide whether the matrix is positive definite without computing eigenvalues. This positive definite matrix calculator evaluates the leading principal minors in order and looks for strict positivity at every step:
D1 = a11D2 = det([[a11, a12], [a21, a22]])D3 = det(A)
When all three leading minors are greater than zero, the matrix is positive definite and x^T A x stays positive for every nonzero vector x. If any leading minor is zero or negative, the matrix fails the strict positive definite test. That failure may mean the matrix is semidefinite, indefinite, or on the boundary between cases, which is why the calculator also reports the broader principal-minor picture after the main check.
Semidefinite and indefinite cases in a 3x3 symmetric matrix
This positive definite matrix calculator does more than answer yes or no, because a symmetric matrix can sit exactly on the edge of definiteness. A positive semidefinite matrix never produces a negative value of x^T A x, but it can produce zero for at least one nonzero direction. A negative semidefinite matrix behaves the same way after the sign is flipped. An indefinite matrix, by contrast, pushes the quadratic form in both directions: some vectors give positive values and others give negative values.
The result panel therefore lists the leading minors used by Sylvester's criterion and also checks every 1x1, 2x2, and 3x3 principal minor when it decides whether the matrix is positive semidefinite, negative semidefinite, or indefinite. That broader scan is useful when the matrix is not strictly positive definite but still has structure worth understanding, especially if one diagonal direction is zero while the remaining directions still have a consistent sign pattern.
Worked examples for 3x3 positive definite matrices
The diagonal matrix [[2, 0, 0], [0, 3, 0], [0, 0, 5]] is a straightforward positive definite example for this calculator. Each leading principal minor is positive, and the quadratic form is 2x^2 + 3y^2 + 5z^2, so every nonzero vector gives a positive value. This is the easiest kind of matrix to read by inspection because there are no cross terms to hide the sign pattern.
The matrix [[1, 1, 0], [1, 1, 0], [0, 0, 2]] is positive semidefinite rather than positive definite. The first two rows are dependent, so one direction has zero curvature and the leading 2x2 determinant vanishes. The matrix is still never negative in the quadratic-form sense, which is why a semidefinite result is more informative than simply calling it "not positive definite."
The matrix [[1, 0, 0], [0, -1, 0], [0, 0, 2]] is indefinite because the signs of the diagonal entries already suggest mixed curvature, and the quadratic form confirms it: one coordinate direction contributes positively, another contributes negatively, and the matrix cannot be positive definite. In practice, that is the sort of matrix you might encounter in a saddle-point problem or in a model where one variable stabilizes the system while another destabilizes it.
Interpreting the positive definite matrix classification
| Classification | Meaning |
|---|---|
| Positive definite | The quadratic form is strictly positive for every nonzero vector, so the matrix has upward curvature in all directions and passes Sylvester's criterion. |
| Positive semidefinite | The quadratic form never goes below zero, but one or more nonzero directions can still give exactly zero, which is why one minor may vanish without making the matrix negative. |
| Negative definite | The quadratic form is strictly negative for every nonzero vector, so the matrix is the sign-reversed analogue of the positive definite case. |
| Indefinite | The quadratic form takes both positive and negative values, so no single definite sign pattern fits the entire matrix. |
Limitations of this 3x3 positive definite matrix checker
This positive definite matrix calculator uses ordinary floating-point arithmetic and a small tolerance around zero, so a matrix that is numerically close to the boundary between definite and semidefinite can be sensitive to rounding or transcription errors. That matters most when one entry is very small, when cancellation makes a determinant nearly vanish, or when the entries differ only in the last few decimal places. For a quick screen that behavior is usually acceptable, but for exact symbolic work, very ill-conditioned matrices, or classroom proofs that require algebraic certainty, you should confirm the leading minors by hand or use a numerical linear algebra package or computer algebra system.
How to use this positive definite matrix calculator
- Enter a11, a22, and a33 first if you want to sanity-check the diagonal signs before looking at the cross terms.
- Fill in the mirrored off-diagonal pairs a12/a21, a13/a31, and a23/a32 so the matrix is symmetric in the form required by the test.
- Check that every entry is a plain number, because this calculator is looking for matrix values rather than units, rates, or mixed measurement fields.
- Submit the matrix and read the reported leading minors to see whether the matrix is positive definite, semidefinite, negative definite, or indefinite.
Formula: how the positive definite result is determined
This positive definite matrix calculator does not rely on a generic one-size-fits-all formula; it evaluates the entries of the symmetric 3x3 matrix directly. The decision is built from the leading principal minors D1, D2, and D3, where D1 = a11, D2 = a11a22 - a12a21, and D3 = det(A). If all three are strictly positive, the matrix is positive definite. If those tests fail, the calculator checks the remaining principal minors to distinguish semidefinite behavior from an indefinite sign pattern. In other words, the output tells you not only whether the matrix passes the strict Sylvester test, but also whether it lands on the boundary where one direction has zero curvature instead of positive curvature.
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.
Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.
