M1-020M1: Mathematics & Statistics FundamentalsLinear AlgebraHard
⚡Flashcard Drill➔Mastery:

Explain Matrix Positive Definiteness and Its Fundamental Significance in Optimization and Covariance Analysis

📐 Mathematical Definition
A≻0  ⟺  λi>0 ∀iA\succ0\iff \lambda_i>0\ \forall i
⚡ One-Sentence Core Answer
A symmetric matrix is positive definite if xTAx>0x^T A x > 0 for all non-zero xx (all eigenvalues >0>0), guaranteeing strict convexity, a unique global minimum, and valid covariance structures.

📌 Key Takeaways

  • •
    Equivalences: All eigenvalues λi>0\lambda_i > 0, all leading principal minors >0>0 (Sylvester's criterion), and Cholesky factorable A=LLTA = L L^T.
  • •
    Optimization: A positive definite Hessian ∇2f(x)≻0\nabla^2 f(x) \succ 0 guarantees that stationary points are strict local minima.
  • •
    Statistics: Covariance matrices Σ=E[(X−μ)(X−μ)T]\Sigma = E[(X-\mu)(X-\mu)^T] are always positive semi-definite (PSD) and positive definite if no variable is a linear combination of others.

📐 Mathematical Derivations

Quadratic form definition: f(x)=xTAxf(x) = x^T A x. Spectral decomposition of symmetric AA gives A=QΛQTA = Q \Lambda Q^T. Let y=QTx≠0y = Q^T x \ne 0. Then xTAx=yTΛy=∑i=1nλiyi2x^T A x = y^T \Lambda y = \sum_{i=1}^n \lambda_i y_i^2. This sum is strictly positive for all y≠0y \ne 0 if and only if every λi>0\lambda_i > 0. In optimization, Taylor expanding around stationary point x∗x^* (where ∇f(x∗)=0\nabla f(x^*)=0): f(x∗+Δx)=f(x∗)+12ΔxT∇2f(x∗)Δx+o(∥Δx∥2)f(x^* + \Delta x) = f(x^*) + \frac{1}{2}\Delta x^T \nabla^2 f(x^*) \Delta x + o(\|\Delta x\|^2). If ∇2f(x∗)≻0\nabla^2 f(x^*) \succ 0, then f(x∗+Δx)>f(x∗)f(x^* + \Delta x) > f(x^*) for all small non-zero perturbations, proving x∗x^* is a strict local minimum.

🏭 Production Trade-offs

Positive definiteness ensures that Newton updates Δx=−(∇2f)−1∇f\Delta x = -(\nabla^2 f)^{-1} \nabla f point in a descent direction because ∇fTΔx=−∇fT(∇2f)−1∇f<0\nabla f^T \Delta x = -\nabla f^T (\nabla^2 f)^{-1} \nabla f < 0. If the Hessian has negative eigenvalues (saddle point or local maximum), standard Newton updates ascend. Quasi-Newton methods (BFGS) explicitly maintain positive definite Hessian approximations using rank-2 updates.
⚠️ Common Interview Pitfalls
  • ✕
    Empirical covariance matrices computed from fewer samples than features (N<PN < P) are rank-deficient (PSD, not PD), causing division by zero in Gaussian likelihoods.
  • ✕
    Assuming non-symmetric matrices with positive diagonal elements are positive definite.
🎯 Interviewer Follow-up Inquiries
  • ?
    Why is Cholesky decomposition (A=LLTA = L L^T) twice as fast and far more stable than LU decomposition for positive definite matrices?
  • ?
    How does Ledoit-Wolf shrinkage guarantee that sample covariance matrices remain strictly positive definite?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
📚

Associated Knowledge Base Guides & Mindmaps

Explore the comprehensive technical article, exam cards, and global architecture tree.

← PreviousM1-019: Explain the Moore-Penrose Pseudoinverse and How It Yields the Minimum-Norm Least Squares Solution📋Back to BankNext →M1-021: Formulate Taylor Expansion and Explain the Respective Roles of Gradients and Hessians in Optimization
中文速览与面试要点

解释正定性,以及它在优化与协方差矩阵中的意义。

xᵀAx>0 对所有非零 x 成立;保证严格凸与唯一极小点。

核心要点

  • 正定的定义是二次型恒正:xᵀAx>0 ∀x≠0,等价条件有三——所有特征值为正、所有顺序主子式为正(Sylvester 判据)、存在可逆 B 使 A=BᵀB(Cholesky 分解存在)。半正定(xᵀAx≥0)允许特征值为 0,即存在非零方向使二次型为 0。在优化中, 海森矩阵正定 ⇔ 严格局部极小 (二阶充分条件):一阶导为零给出驻点,二阶导的正定性区分极小、极大与鞍点。在统计中,协方差矩阵 Σ 必然半正定(因为 Σ=E[(X−μ)(X−μ)ᵀ],对任意 a 有 aᵀΣa=Var(aᵀX)≥0);它严格正定当且仅当各维度不存在完全线性相关。
  • 三个工程含义:① 共线性诊断 ——若协方差矩阵(或设计矩阵 XᵀX)奇异或接近奇异,说明存在完全/近似的线性相关,此时回归系数方差爆炸(Var(ŵⱼ)=σ²/[(1−Rⱼ²)Σ(xᵢⱼ−x̄ⱼ)²] 中 Rⱼ²→1),系数符号不稳定但预测仍可能准确——这正是岭回归(加 λI 使其正定)的动机;② Cholesky 分解的效率 ——正定矩阵可分解为 LLᵀ,使线性方程组求解与多元高斯采样(L·z,z~N(0,I))从 O(n³) 降到 O(n³/3) 且数值稳定,是高斯过程与贝叶斯推断的核心;③ 非凸优化的鞍点 ——高维深度学习中,一阶驻点处海森通常既非正定也非负定(大量正负特征值),即鞍点远多于局部极小,这是 SGD 噪声能有效逃离鞍点的原因。
  • 协方差矩阵半正定;若严格正定则各维无完全共线性
  • 海森矩阵正定 ⇒ 局部凸 ⇒ 二阶充分条件

常见陷阱

  • 把半正定当作正定(忽略了零特征值方向)
  • 认为海森负定也可能是局部极小(必为鞍点或极大)