M1-019M1: Mathematics & Statistics FundamentalsLinear AlgebraMedium
⚡Flashcard Drill➔Mastery:

Explain the Moore-Penrose Pseudoinverse and How It Yields the Minimum-Norm Least Squares Solution

🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
Next: M1-020 →
📐 Mathematical Definition
A+=VΣ+U⊤,x^=A+bA^+=V\Sigma^+U^\top,\qquad \hat x=A^+b
⚡ One-Sentence Core Answer
The pseudoinverse A+A^+ generalizes matrix inversion to all rectangular matrices via SVD, finding the vector x^\hat{x} that minimizes residual ∥Ax−b∥2\|Ax - b\|_2 with minimum Euclidean norm ∥x∥2\|x\|_2.

📌 Key Takeaways

  • •
    SVD representation: If A=UΣVTA = U\Sigma V^T, then A+=VΣ+UTA^+ = V \Sigma^+ U^T, where Σ+\Sigma^+ reciprocates non-zero singular values.
  • •
    Overdetermined full column rank: A+=(ATA)−1ATA^+ = (A^T A)^{-1} A^T (Ordinary Least Squares solution).
  • •
    Underdetermined full row rank: A+=AT(AAT)−1A^+ = A^T (A A^T)^{-1} (Minimum-norm interpolating solution).

📐 Mathematical Derivations

The Moore-Penrose conditions uniquely define A+A^+ via four algebraic axioms: (1) AA+A=AAA^+A = A, (2) A+AA+=A+A^+AA^+ = A^+, (3) (AA+)T=AA+(AA^+)^T = AA^+, (4) (A+A)T=A+A(A^+A)^T = A^+A. Given SVD A=Udiag(σ1,…,σr,0,… )VTA = U \text{diag}(\sigma_1, \dots, \sigma_r, 0, \dots) V^T, define Σ+=diag(1/σ1,…,1/σr,0,… )\Sigma^+ = \text{diag}(1/\sigma_1, \dots, 1/\sigma_r, 0, \dots). For linear system Ax=bAx=b, the least squares objective is min⁡x∥Ax−b∥22\min_x \|Ax - b\|_2^2. Substituting SVD: ∥Ax−b∥22=∥UΣVTx−b∥22=∥Σy−UTb∥22\|Ax - b\|_2^2 = \|U\Sigma V^T x - b\|_2^2 = \|\Sigma y - U^T b\|_2^2 where y=VTxy = V^T x. For components i>ri > r, σi=0\sigma_i = 0, so choosing yi=0y_i = 0 minimizes ∥x∥2=∥y∥2\|x\|_2 = \|y\|_2 while achieving optimal fit for i≤ri \le r with yi=(UTb)iσiy_i = \frac{(U^T b)_i}{\sigma_i}. Hence, x^=Vy=VΣ+UTb=A+b\hat{x} = V y = V\Sigma^+ U^T b = A^+ b.

🏭 Production Trade-offs

In modern overparameterized deep learning (p≫Np \gg N), the pseudoinverse solution corresponds to the implicit bias of gradient descent initialized at zero: it converges to the interpolating solution that minimizes the L2L2 norm ∥W∥2\|W\|_2. In linear regression, computing A+A^+ via SVD is more stable than computing (ATA)−1AT(A^T A)^{-1} A^T because it avoids squaring the matrix condition number: κ(ATA)=κ(A)2\kappa(A^T A) = \kappa(A)^2.
⚠️ Common Interview Pitfalls
  • ✕
    Computing (ATA)−1AT(A^T A)^{-1} A^T on near-singular matrices, amplifying numerical noise compared to SVD-based pseudoinverse.
  • ✕
    Setting threshold epsilon too low when inverting tiny singular values, blowing up pseudoinverse norm.
🎯 Interviewer Follow-up Inquiries
  • ?
    Why does gradient descent with zero initialization converge to the Moore-Penrose pseudoinverse solution in underdetermined linear regression?
  • ?
    How does ridge regularization relate to truncated pseudoinverse singular value thresholding?
⚡
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

← PreviousM1-018: Define Ill-Conditioned Matrices and Condition Numbers, and Explain Their Impact on Numerical Solvers and Training📋 Back to BankNext →M1-020: Explain Matrix Positive Definiteness and Its Fundamental Significance in Optimization and Covariance Analysis
中文速览与面试要点

解释 Moore-Penrose 伪逆,以及它如何给出最小二乘解。

伪逆通过 SVD 对非零奇异值取倒数构造,给出最小范数最小二乘解。

核心要点

  • 伪逆的构造完全依赖 SVD:若 A=UΣVᵀ(秩 r),则 A⁺=VΣ⁺Uᵀ,其中 Σ⁺ 是把 Σ 的 非零奇异值取倒数 、零奇异值保持为零后转置得到的 n×m 矩阵。它满足四个 Penrose 条件(AA⁺A=A、A⁺AA⁺=A⁺、(AA⁺)ᵀ=AA⁺、(A⁺A)ᵀ=A⁺A),因此在所有'最小二乘解'中,A⁺b 是 唯一具有最小范数 的那个。具体地,Ax=b 的解集可写为 A⁺b+(I−A⁺A)w(w 任意),其中 A⁺b 是与零空间正交的分量,范数最小。当 A 列满秩时 A⁺=(AᵀA)⁻¹Aᵀ,退化为标准最小二乘解。
  • 三个实用价值:① 秩亏/欠定的统一处理 ——当特征完全共线(AᵀA 奇异)或方程数少于未知数时,普通求逆失败,伪逆仍给出唯一的最小范数解(这也是 np.linalg.lstsq 与 pinv 内部用 SVD 的原因);② 与岭回归的关系 ——岭回归解 (AᵀA+λI)⁻¹Aᵀb 可写成 Σᵢ σᵢ/(σᵢ²+λ)·vᵢuᵢᵀb,即把伪逆中的 1/σᵢ 替换为 σᵢ/(σᵢ²+λ)——两者都抑制小奇异值方向,但岭回归是平滑抑制(λ→0 时趋于伪逆),伪逆是硬截断;③ 数值实现 ——SVD 截断(丢弃小于阈值的奇异值)比伪逆更可控,是实践中处理病态的首选(如 PCA、协同过滤中的潜在因子)。
  • 秩亏时唯一给出最小范数解
  • 等价于岭回归在 λ→0 的极限(数值上更稳)

常见陷阱

  • 把伪逆等同于普通逆(仅在满秩方阵时相同)
  • 在需要稳定解时用普通求逆而非 SVD 截断