On this page
Asking "is this matrix positive definite?" is really asking "does this quadratic form only go up?" Here are three tests that always agree. Matrices are written row by row: A = (2, 1; 1, 2) has rows 2, 1 and 1, 2.
What does positive definite mean?
A real symmetric matrix A is positive definite if xᵀAx > 0 for every non-zero vector x, as the definite matrix entry on Wikipedia states. The expression xᵀAx is called a quadratic form. For the 2×2 matrix (a, b; b, c) it is ax² + 2bxy + cy².
Take A = (2, 1; 1, 2). Its quadratic form is 2x² + 2xy + 2y², which you can rewrite as x² + y² + (x + y)². That is zero only when x = y = 0, so A is positive definite.
The surface z = 2x² + 2xy + 2y² is a bowl with its lowest point at the origin; every horizontal slice is an ellipse, as in the diagram above.
How do you test if a matrix is positive definite?
For a symmetric matrix these three tests are equivalent: if one passes, all pass.
Eigenvalues. All eigenvalues are positive (definite matrix entry). For a refresher, see what the eigenvalues of a 2×2 matrix mean and how to find them.
Leading principal minors. The determinants of the top-left 1×1, 2×2, up to n×n corners are all positive. This is Sylvester's criterion, named after James Joseph Sylvester.
Pivots. Gaussian elimination without row swaps gives only positive pivots. MIT's 18.06 linear algebra notes call this "a good way to tell": for a symmetric matrix, the number of positive pivots equals the number of positive eigenvalues.
Tests 2 and 3 are linked: each pivot is a leading minor divided by the one before it.
A 2×2 worked example
For A = (2, 1; 1, 2):
Eigenvalues: λ² − 4λ + 3 = 0, so λ = 1 and λ = 3. Both positive.
Leading minors: 2, then 2 × 2 − 1 × 1 = 3. Both positive.
Pivots: 2, then 3/2. Both positive.
Now move the 2s off the diagonal: B = (1, 2; 2, 1). Its eigenvalues are 3 and −1, its minors are 1 and −3, and its pivots are 1 and −3. Every test fails, and you can find the vector that breaks it: x = (1, −1) gives xᵀBx = 1 − 4 + 1 = −2. The surface z = x² + 4xy + y² is a saddle, not a bowl.
A 3×3 worked example
Take C = (2, −1, 0; −1, 2, −1; 0, −1, 2).
Leading minors: 2, then 4 − 1 = 3, then det C = 4. All positive.
Pivots: 2, 3/2 and 4/3, each minor divided by the previous one. All positive.
Eigenvalues: 2 − √2, 2 and 2 + √2, roughly 0.59, 2 and 3.41. All positive.
Definition check: xᵀCx = x² + (x − y)² + (y − z)² + z², a sum of squares that is zero only at the origin.
How does this connect to the second derivative test?
At a critical point, where the gradient of the function is zero, a smooth function f(x, y) behaves like the quadratic form of its Hessian, the matrix of second partial derivatives. The second partial derivative test says: if D = f_xx f_yy − (f_xy)² > 0 and f_xx > 0, the point is a local minimum; if D < 0 it is a saddle point; if D = 0 the test is inconclusive.
But f_xx > 0 and D > 0 are just the two leading minors of the Hessian: the calculus test is Sylvester's criterion in disguise. For f(x, y) = x² + xy + y², the Hessian is A, so the origin is the bottom of the bowl. It is the matrix version of why the sign of f″ decides a maximum or minimum in one variable.
In n variables, the same page says a positive definite Hessian at a critical point gives a local minimum, and that with three or more variables the Hessian's determinant alone is not enough.
Your 60-second checklist
Check symmetry. If A is not symmetric, xᵀAx depends only on (A + Aᵀ)/2, so test that.
Scan the diagonal. A zero or negative entry rules it out: the unit vector in that direction gives xᵀAx equal to that entry.
For 2×2 and 3×3, compute leading minors; for bigger matrices, read the pivots.
Need semidefinite (≥ 0)? Sylvester's criterion then needs all principal minors non-negative, not just the leading ones.
If a test fails, write down a vector x with xᵀAx ≤ 0. That turns a sign into a proof.
If eigenvalues, determinants and pivots still feel like separate chapters, the Fermi Concept Library gives each concept its own lesson and shows its place in the map. For practice, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.



