Module 6: Eigenvalues
Positive definiteness is eigenvalues meeting a sign condition — and it has profound geometric consequences.
A symmetric matrix A is positive definite (PD) if for every non-zero vector x:
The expression xTAx is called a quadratic form. It assigns a scalar to every point in space.
A symmetric matrix is positive definite if and only if all its eigenvalues are strictly positive. This gives the full classification:
Every positive definite matrix has a Cholesky decomposition: A=LLT where L is lower triangular. This is the "square root" of a matrix and is used extensively in statistics (sampling from a Gaussian) and numerical solvers (it's twice as fast as LU for symmetric systems).
The heatmap shows the quadratic form xᵀAx — how positive or negative the value is at each point. Blue/green = positive, red = negative. Use the presets or edit the matrix. A positive definite matrix produces a pure green bowl. An indefinite matrix produces a saddle.
import numpy as np
A = np.array([[3., 1.], [1., 2.]])
eigenvalues = np.linalg.eigvalsh(A) # for symmetric matrices
print(all(eigenvalues > 0)) # True — positive definite
# Cholesky decomposition (only works for PD)
L = np.linalg.cholesky(A)
print(np.allclose(L @ L.T, A)) # TrueEigenvalues: λ₁ = 3.62, λ₂ = 1.38
positive definite (PD)