← Learning roadmap
Step 16 · Interactive

Symmetric & Positive Definite Matrices

A symmetric matrix mirrors its off-diagonal entries. Its eigenvectors form perpendicular directions. The quadratic form xᵀSx reveals whether every nonzero direction points uphill, some directions are flat, or directions disagree.

Drag the gold vector x. Green means xᵀSx > 0; pink means xᵀSx < 0. Pale lines mark xᵀSx = 0. Dashed lines show the perpendicular eigen-directions.

Build a symmetric 2 × 2 matrix

S =
2.00.80.82.0
det(S) = ac − b² eigenvalues test x xᵀSx

1. Why symmetry matters

S = Sᵀ means the two off-diagonal entries match. Every real symmetric matrix has real eigenvalues and an orthonormal eigenbasis: S = QΛQᵀ. In those rotated coordinates, the quadratic form has no cross term.

xᵀSx = λ₁z₁² + λ₂z₂²,   z = Qᵀx

The dashed axes are the columns of Q. Try changing b to rotate them.

2. What positive definite means

Positive definite means xᵀSx > 0 for every nonzero x. Equivalently, both eigenvalues are positive. For this symmetric 2 × 2 matrix, Sylvester’s criterion gives the quick test a > 0 and ac − b² > 0.

If one eigenvalue reaches zero, a nonzero direction becomes flat: positive semidefinite. A positive determinant alone is insufficient; two negative eigenvalues also multiply to a positive number.

Try it: Start with the positive definite preset. Increase |b| until ac − b² reaches zero. Follow the flat direction, then continue until the matrix becomes indefinite. Notice how the origin changes from a strict minimum to a saddle for E(x) = ½xᵀSx.

Next: positive definiteness and optimization →