FREE4/4+0ACC--
← Gradient Lab

PSD Classifier - Positive Semidefinite Matrix Practice

CALC6G/04 PSD CLASSIFIER
LOADING

Loading a fresh matrix…

GENERATING A FRESH ROUND

About PSD Classifier

Classify a symmetric 2x2 matrix as positive definite, positive semidefinite, indefinite, or negative definite using trace and determinant - the test that decides whether it could be a covariance matrix.

Each round shows a random symmetric 2x2 matrix [[a, b], [b, c]] with integer entries - a and c drawn from -4 to 4, b from -3 to 3. You pick one of four labels: Positive definite, Positive semidefinite, Indefinite, or Negative definite.

The truth is computed from trace and determinant: det = ac - b² and trace = a + c. If det < 0 the matrix is indefinite. If det ≥ 0 with a > 0 and trace > 0, it is positive definite when det > 0 and positive semidefinite when det = 0. If a < 0 and trace < 0 it is negative definite. In the remaining boundary cases (a = 0 with det ≥ 0), it counts as positive semidefinite only when b = 0 and both a and c are nonnegative; otherwise indefinite.

After each pick the reveal shows trace and det with a one-line explanation of what they imply about the eigenvalue signs, then you move to the next matrix.

Why quant interviews test this

Definiteness checks appear across the quant interview stack: is this a valid covariance or correlation matrix, is this Hessian telling me the critical point is a min, a max, or a saddle, and is this optimization problem convex. The 2x2 trace/det shortcut is the expected fluency level, with Sylvester's leading-minors criterion as the stated generalization.

Common phrasings to be ready for: fix the entry range that keeps [[1, ρ], [ρ, 1]] PSD (answer: |ρ| ≤ 1, from det = 1 - ρ² ≥ 0), explain why sample covariance matrices are always PSD, and classify a critical point from its Hessian - the second-derivative test in multivariable calculus is precisely this game.

The PSD Classifier guide covers how scoring works, the strategy that wins, a worked example and the mistakes most players make.

More Calculus & Linear Algebra games