M1-017M1: Mathematics & Statistics FundamentalsLinear AlgebraEasy
⚡Flashcard Drill➔Mastery:

Explain Matrix Rank, Nullspace, Column Space, and Their Role in Linear System Solvability

📐 Mathematical Definition
rank(A)+dim⁡N(A)=n,Ax=b 可解  ⟺  b∈C(A)\mathrm{rank}(A)+\dim\mathcal N(A)=n,\qquad Ax=b\ \text{可解}\iff b\in\mathcal C(A)
⚡ One-Sentence Core Answer
Column space is the span of achievable outputs, nullspace comprises inputs mapped to zero, and rank equals column space dimension; Ax=bAx=b is solvable if and only if b∈Col(A)b \in \text{Col}(A).

📌 Key Takeaways

  • •
    Rank-Nullity Theorem: Rank(A)+Nullity(A)=n\text{Rank}(A) + \text{Nullity}(A) = n (total column dimensions).
  • •
    Solvability: Ax=bAx = b has a solution iff Rank(A)=Rank([A∣b])\text{Rank}(A) = \text{Rank}([A\mid b]).
  • •
    Uniqueness: Solution is unique iff Nullity(A)=0\text{Nullity}(A) = 0 (columns are linearly independent).

📐 Mathematical Derivations

Let A∈Rm×nA \in \mathbb{R}^{m\times n}. Column space Col(A)={Ax:x∈Rn}⊆Rm\text{Col}(A) = \{Ax : x \in \mathbb{R}^n\} \subseteq \mathbb{R}^m, with dimension r=Rank(A)r = \text{Rank}(A). Nullspace Null(A)={x∈Rn:Ax=0}⊆Rn\text{Null}(A) = \{x \in \mathbb{R}^n : Ax = 0\} \subseteq \mathbb{R}^n. The fundamental theorem of linear algebra dictates Row(A)⊥Null(A)\text{Row}(A) \perp \text{Null}(A) and Col(A)⊥Null(AT)\text{Col}(A) \perp \text{Null}(A^T). Any vector xx decomposes uniquely into x=xr+xnx = x_r + x_n where xr∈Row(A)x_r \in \text{Row}(A) and xn∈Null(A)x_n \in \text{Null}(A). If b∈Col(A)b \in \text{Col}(A), the general solution is x=xp+xnx = x_p + x_n with particular solution xpx_p. If Null(A)≠{0}\text{Null}(A) \ne \{0\}, infinite solutions exist.

🏭 Production Trade-offs

In overdetermined systems (m>nm > n, more equations than unknowns, e.g. linear regression), bb rarely lies precisely in Col(A)\text{Col}(A). Ordinary Least Squares projects bb orthogonally onto Col(A)\text{Col}(A), yielding the normal equations ATAx=ATbA^T A x = A^T b. If AA is full column rank, ATAA^T A is invertible, yielding unique x^=(ATA)−1ATb\hat{x} = (A^T A)^{-1} A^T b. If rank-deficient, regularization (L2L2 Ridge) adds λI\lambda I to restore full rank.
⚠️ Common Interview Pitfalls
  • ✕
    Assuming full rank implies an exact solution exists for any bb in overdetermined rectangular matrices.
  • ✕
    Attempting to invert ATAA^T A directly when multicollinear features cause rank deficiency.
🎯 Interviewer Follow-up Inquiries
  • ?
    How does the Moore-Penrose pseudoinverse select the minimum-norm solution when nullspace is non-trivial?
  • ?
    Why does L2 regularization guarantee positive definiteness for ATA+λIA^T A + \lambda I?
⚡
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-016: Explain the Geometric Meaning of Eigenvalues, Eigenvectors, and Singular Value Decomposition (SVD)📋Back to BankNext →M1-018: Define Ill-Conditioned Matrices and Condition Numbers, and Explain Their Impact on Numerical Solvers and Training
中文速览与面试要点

解释矩阵的秩、零空间、列空间,以及秩与可解性的关系。

秩 = 线性无关列数 = 列空间维数;Ax=b 有解当且仅当 b 在列空间中。

核心要点

  • 四个基本子空间构成线性代数的骨架: 列空间 C(A)=Ax(A 的列的所有线性组合,维数=秩 r)、 零空间 N(A)=x:Ax=0(维数=n−r,秩-零化度定理)、行空间 C(Aᵀ)(维数=r)与左零空间 N(Aᵀ)(维数=m−r)。关键正交关系:N(A)⊥C(Aᵀ)、N(Aᵀ)⊥C(A),这给出了 Ax=b 的 可解性判据 ——b 必须落在 C(A) 中,且此时解集为 x_particular+N(A)。秩的三种等价理解:线性无关列的最大数目、非零奇异值的个数、行阶梯形中主元的个数。
  • 工程含义:① 最小二乘的几何 ——当 b∉C(A)(超定),无解,转而求 b 在 C(A) 上的正交投影,得到正规方程 AᵀAx=Aᵀb,其解即最小二乘解(残差与列空间正交);② 秩亏时的处理 ——若 AᵀA 奇异(共线性),需用伪逆/pinv(SVD 截断小奇异值)或加 L2 正则(岭回归使 AᵀA+λI 可逆);③ 低秩假设的威力 ——真实数据矩阵常近似低秩(用户-物品评分矩阵、语言模型权重增量),这使矩阵补全(推荐系统)、LoRA(ΔW=BA,秩 r≪min(d,k))、压缩感知成为可能。LoRA 的本质就是用秩-r 子空间逼近全参微调的更新。
  • 满秩方阵 → 唯一解
  • 秩亏 → 无穷多解或无解(用最小二乘/pinv)

常见陷阱

  • 认为 Ax=b 总有解
  • 在秩亏时直接求逆而不使用伪逆或正则化