第 33 章

左逆、右逆与伪逆:按秩分类的四种「求逆」

逆是否存在取决于 m、n、r 的关系:满秩方阵有双侧逆,满列秩有左逆,满行秩有右逆,一般情形只能用 SVD 构造伪逆,它在行空间与列空间之间是真正的逆。

Left, Right, and Pseudoinverses: Four Cases by Rank

Whether an inverse exists depends on m, n, and r: full-rank square gives a two-sided inverse, full column rank a left inverse, full row rank a right inverse, and the general case a pseudoinverse built from SVD.

首发于 2009.05.07中 / EN
系统课程linear-algebrapseudoinversefour-subspacesleast-squares
语言
字号
目录
篇内目录

用四个子空间给「求逆」分类

设 AA 是 m×nm\times n 矩阵,秩为 rr。整个讨论围绕那张熟悉的图:

  • 行空间 ⊆Rn\subseteq\mathbb R^n,维数 rr;
  • 零空间 ⊆Rn\subseteq\mathbb R^n,维数 n−rn-r;
  • 列空间 ⊆Rm\subseteq\mathbb R^m,维数 rr;
  • 左零空间(ATA^{\mathsf T} 的零空间)⊆Rm\subseteq\mathbb R^m,维数 m−rm-r。

逆之所以有时不存在,是因为零空间里的向量被 AA 送到零,没有任何映射能把它们「复活」。所以能否求逆,取决于零空间有多大。

时间轴

时间内容
0:03用四个子空间给「求逆」分类
2:26可逆方阵:双侧逆存在
5:59列独立时的左逆 (ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T}
8:55满列秩时 ATAA^{\mathsf T}A 可逆
11:42长方矩阵不可能有双侧逆
12:34满行秩时的右逆
14:38Ax=bAx=b 的解的个数
16:13右逆与投影的关系
18:56A(ATA)−1ATA(A^{\mathsf T}A)^{-1}A^{\mathsf T} 是投影矩阵
23:03伪逆:从行空间到列空间
24:42行空间与列空间维数相同
26:21伪逆的定义与几何图像
28:10在行空间上 AA 是一一对应的
31:11伪逆与最小二乘
32:53由 SVD 构造伪逆
35:48σσ+=1\sigma\sigma^+=1 的例外:零奇异值
36:40AA+AA^+ 与 A+AA^+A 都是投影
39:59伪逆能做什么、不能做什么

四种情形

情形秩零空间解的情况逆的类型
满秩方阵r=m=nr=m=n双侧都只有零唯一解双侧逆 A−1A^{-1}
满列秩r=n≤mr=n\le mAA 的零空间为零00 或 11 个解左逆
满行秩r=m≤nr=m\le nATA^{\mathsf T} 的零空间为零总有解,无穷多右逆
一般情形r<min⁡(m,n)r<\min(m,n)两侧都有零空间——伪逆

情形一:满秩方阵

r=m=nr=m=n,AA 可逆,左右两侧都得到单位矩阵:

A−1A=AA−1=I.A^{-1}A=AA^{-1}=I.

情形二:满列秩,左逆

列线性无关,r=nr=n,AA 的零空间只有零向量。此时 ATAA^{\mathsf T}A 是 n×nn\times n 对称矩阵,并且可逆。

定义

Aleft=(ATA)−1AT.A_{\text{left}}=(A^{\mathsf T}A)^{-1}A^{\mathsf T}.

它是 n×mn\times m 矩阵,并且

AleftA=(ATA)−1ATA=In.A_{\text{left}}A=(A^{\mathsf T}A)^{-1}A^{\mathsf T}A=I_n.

这就是最小二乘里反复出现的组合。列无关时,正规方程的系数矩阵可逆,最小二乘有唯一解。

注意维度:AleftAA_{\text{left}}A 是 n×nn\times n 单位阵;但反过来的 AAleftAA_{\text{left}} 是 m×mm\times m,不可能是单位阵(因为 n<mn<m)。

情形三:满行秩,右逆

行线性无关,r=mr=m,ATA^{\mathsf T} 的零空间只有零向量。此时 AATAA^{\mathsf T} 可逆。

定义

Aright=AT(AAT)−1.A_{\text{right}}=A^{\mathsf T}(AA^{\mathsf T})^{-1}.

它是 n×mn\times m 矩阵,并且

AAright=Im.AA_{\text{right}}=I_m.

因为 r=m<nr=m<n,零空间维数为 n−m>0n-m>0,所以只要 Ax=bAx=b 有解,就有无穷多个解。

另一侧的乘积是投影

左逆放在右边,得不到单位阵,但得到的是一个熟悉的矩阵:

AAleft=A(ATA)−1AT=Pcol,AA_{\text{left}}=A(A^{\mathsf T}A)^{-1}A^{\mathsf T}=P_{\text{col}},

这是到列空间的投影矩阵。它尽量充当单位阵:在列空间上等于恒等,在左零空间上等于零。

同理,

ArightA=AT(AAT)−1A=Prow,A_{\text{right}}A=A^{\mathsf T}(AA^{\mathsf T})^{-1}A=P_{\text{row}},

这是到行空间的投影矩阵。

这解释了一个常见疑问:为什么左逆只能「左乘」才得到单位阵?因为另一侧的空间维度不够,投影是能做到的最好结果。

一般情形:伪逆

当 r<min⁡(m,n)r<\min(m,n) 时,两侧都有零空间,真正的逆不存在。但 AA 在行空间与列空间之间是一个完美的双射。

为什么是双射

设 x,yx,y 都在行空间,且 Ax=AyAx=Ay。则

A(x−y)=0,A(x-y)=0,

所以 x−yx-y 在零空间中。可是 x−yx-y 又是两个行空间向量的差,仍在行空间中。零空间与行空间正交,交集只有零向量,因此

x−y=0.x-y=0.

这就证明了:行空间中的不同向量,被 AA 送到列空间中的不同向量。

同时,行空间与列空间维数都是 rr,所以这是一个可逆映射。它的逆就是伪逆 A+A^+。

用 SVD 构造

设

A=UΣVT.A=U\Sigma V^{\mathsf T}.

Σ\Sigma 是 m×nm\times n 对角矩阵,前 rr 个对角元 σ1,…,σr>0\sigma_1,\dots,\sigma_r>0,其余为零。

把 Σ\Sigma 的每个非零对角元取倒数,并转置成 n×mn\times m:

Σ+=diag⁡(1σ1,…,1σr,0,…,0).\Sigma^+=\operatorname{diag}\left(\frac{1}{\sigma_1},\dots,\frac{1}{\sigma_r},0,\dots,0\right).

则

A+=VΣ+UT.A^+=V\Sigma^+U^{\mathsf T}.

两个乘积都是投影

AA+=UΣΣ+UT=Pcol,AA^+=U\Sigma\Sigma^+U^{\mathsf T}=P_{\text{col}}, A+A=VΣ+ΣVT=Prow.A^+A=V\Sigma^+\Sigma V^{\mathsf T}=P_{\text{row}}.

ΣΣ+\Sigma\Sigma^+ 是 m×mm\times m,前 rr 个对角元为 11,其余为 00;Σ+Σ\Sigma^+\Sigma 是 n×nn\times n,结构相同。它们分别把向量投影到列空间与行空间。

为什么这是「最好的逆」

伪逆在所有可能的选择中最小:零空间方向上没有信息,任何取值都无法被检验,取零是最自然的。多填任何数都不会改变 AA+AA^+ 与 A+AA^+A 的结果,只会让伪逆变大。

补充:伪逆满足四个 Penrose 条件:AA+A=AAA^+A=A、A+AA+=A+A^+AA^+=A^+、(AA+)T=AA+(AA^+)^{\mathsf T}=AA^+、(A+A)T=A+A(A^+A)^{\mathsf T}=A^+A。前两条说明它在可行范围内尽量充当逆,后两条说明两个乘积都是正交投影。

统计学为什么需要伪逆

最小二乘的核心是解正规方程

ATAx^=ATb.A^{\mathsf T}A\hat x=A^{\mathsf T}b.

只要 AA 满列秩,ATAA^{\mathsf T}A 可逆,一切顺利。但现实中经常出现重复测量或线性相关的特征,此时 ATAA^{\mathsf T}A 奇异,正规方程有无穷多解。

伪逆给出的

x^=A+b\hat x=A^+b

是其中范数最小的解。这正是统计软件在共线性情形下采用的默认处理方式。

常见误区

  1. 以为长方矩阵也有双侧逆。维度不匹配,AAleftAA_{\text{left}} 是 m×mm\times m,不可能等于 InI_n。
  2. 把左逆与右逆的公式记反。左逆用 ATAA^{\mathsf T}A,右逆用 AATAA^{\mathsf T}。
  3. 以为伪逆等于「先转置再求逆」。只有当 AA 的奇异值全为 11 时才碰巧如此。
  4. 忽略零空间自由度。伪逆在零空间方向上不做任何「恢复」,这是信息论上无法做到的。

本讲结论

  • 四种情形由 m,n,rm,n,r 的关系决定。
  • 满列秩:左逆 (ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T},另一侧乘积是列空间投影。
  • 满行秩:右逆 AT(AAT)−1A^{\mathsf T}(AA^{\mathsf T})^{-1},另一侧乘积是行空间投影。
  • 一般情形:A+=VΣ+UTA^+=V\Sigma^+U^{\mathsf T},在行空间与列空间之间是真正的逆。
  • AA+AA^+ 与 A+AA^+A 分别是到列空间、行空间的正交投影。
  • 伪逆给出的最小二乘解是范数最小的解,适用于 ATAA^{\mathsf T}A 奇异的情形。

理解检验

1. 为什么长方矩阵不可能有双侧逆?

参考答案:设 AA 是 m×nm\times n。若存在左逆 BB(n×mn\times m)使 BA=InBA=I_n,则 rank⁡A≥rank⁡(BA)=n\operatorname{rank}A\ge\operatorname{rank}(BA)=n,结合 rank⁡A≤n\operatorname{rank}A\le n 得 rank⁡A=n\operatorname{rank}A=n。若同时存在右逆 CC 使 AC=ImAC=I_m,则 rank⁡A≥m\operatorname{rank}A\ge m,得 rank⁡A=m\operatorname{rank}A=m。两者同时成立只能有 m=nm=n。更直接的代数证明是:由 BA=InBA=I_n、AC=ImAC=I_m,

B=B(AC)=(BA)C=C,B=B(AC)=(BA)C=C,

于是 B=CB=C,同一矩阵既是左逆又是右逆,AA 为方阵且可逆。所以当 m≠nm\ne n 时,最多只有单侧逆。

2. 左逆与右逆的公式中,为什么一个用 ATAA^{\mathsf T}A,另一个用 AATAA^{\mathsf T}?

参考答案:左逆要在左边得到 InI_n,需要 n×nn\times n 的可逆矩阵,而 ATAA^{\mathsf T}A 正是 n×nn\times n;它在列无关(r=nr=n)时可逆,因为 ATAx=0⇒xTATAx=∥Ax∥2=0⇒Ax=0⇒x=0A^{\mathsf T}Ax=0\Rightarrow x^{\mathsf T}A^{\mathsf T}Ax=\lVert Ax\rVert^2=0\Rightarrow Ax=0\Rightarrow x=0。于是 (ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T} 左乘 AA 得 InI_n。右逆要在右边得到 ImI_m,需要 m×mm\times m 矩阵,AATAA^{\mathsf T} 正是 m×mm\times m,在行无关(r=mr=m)时可逆,同理 AT(AAT)−1A^{\mathsf T}(AA^{\mathsf T})^{-1} 右乘 AA 得 ImI_m。维度决定了各自该用哪个乘积。

3. 证明 AA 在行空间上是单射,并指出证明中用到了哪两个子空间的性质。

参考答案:设 x,yx,y 都在行空间,且 Ax=AyAx=Ay。则 A(x−y)=0A(x-y)=0,所以 x−y∈N(A)x-y\in N(A)。另一方面,行空间对减法封闭,x−yx-y 仍在行空间中,即 x−y∈C(AT)x-y\in C(A^{\mathsf T})。用到的第一个性质是零空间与行空间正交(N(A)⊥C(AT)N(A)\perp C(A^{\mathsf T})),第二个是行空间是子空间(对线性组合封闭)。正交子空间的交集只有零向量,所以 x−y=0x-y=0,即 x=yx=y。行空间与列空间维数同为 rr,单射加上维数相等就得到双射,其逆正是伪逆。

4. 为什么 AA+AA^+ 是投影而不是单位阵?它的零空间是什么?

参考答案:AA+=UΣΣ+UTAA^+=U\Sigma\Sigma^+U^{\mathsf T},其中 ΣΣ+\Sigma\Sigma^+ 是 m×mm\times m 对角阵,前 rr 个对角元为 11、其余 m−rm-r 个为 00。它在列空间(由 u1,…,uru_1,\dots,u_r 张成)上是恒等映射,在左零空间(由 ur+1,…,umu_{r+1},\dots,u_m 张成)上是零映射。只有当 r=mr=m 时它才等于单位阵;一般情形 m−r>0m-r>0,左零空间方向被抹掉,所以只能是投影。它的零空间正是左零空间 N(AT)N(A^{\mathsf T}),维数 m−rm-r。

5. 当 ATAA^{\mathsf T}A 奇异时,最小二乘为什么需要伪逆?伪逆选出的解有什么特殊性?

参考答案:ATAA^{\mathsf T}A 奇异意味着 AA 的列相关(r<nr<n),正规方程 ATAx^=ATbA^{\mathsf T}A\hat x=A^{\mathsf T}b 有无穷多个解——它们相差零空间中的任意向量,而最小二乘只约束「残差最小」,无法区分这些解。伪逆给出

x^=A+b=VΣ+UTb,\hat x=A^+b=V\Sigma^+U^{\mathsf T}b,

它把 bb 在左零空间上的分量投影掉,再把列空间分量按 1/σi1/\sigma_i 映回行空间,因此在零空间方向上取零。于是 x^\hat x 是所有最小二乘解中范数最小的那一个(最小范数最小二乘解),这也是统计软件在共线性下采用的默认解。

与前后课程的关系

前几讲分别处理了特征值、正定、相似与 SVD;这一讲把 SVD 用于非方阵求逆,把四个子空间、秩与最小二乘串成一个完整分类。下一讲是全课程总结,用旧考题回顾这些主线。

Classifying inverses with the four subspaces

Let AA be m×nm\times n of rank rr. Everything turns on the familiar picture:

  • row space ⊆Rn\subseteq\mathbb R^n, dimension rr;
  • null space ⊆Rn\subseteq\mathbb R^n, dimension n−rn-r;
  • column space ⊆Rm\subseteq\mathbb R^m, dimension rr;
  • left null space (null space of ATA^{\mathsf T}) ⊆Rm\subseteq\mathbb R^m, dimension m−rm-r.

Inverses fail exactly because vectors in the null space are sent to zero, and no map can bring them back. How much can be inverted depends on how large the null spaces are.

Timeline

TimeTopic
0:03Classifying inverses by the four subspaces
2:26Invertible square matrices have two-sided inverses
5:59The left inverse when columns are independent
8:55ATAA^{\mathsf T}A is invertible in the full column rank case
11:42A rectangular matrix has no two-sided inverse
12:34The right inverse in the full row rank case
14:38The number of solutions of Ax=bAx=b
16:13Right inverses and projection
18:56The matrix A(ATA)−1ATA(A^{\mathsf T}A)^{-1}A^{\mathsf T} is a projection
23:03The pseudoinverse: row space to column space
24:42Row and column spaces share a dimension
26:21Definition and picture of the pseudoinverse
28:10AA is one-to-one on the row space
31:11The pseudoinverse and least squares
32:53Constructing the pseudoinverse from the SVD
35:48Where σσ+=1\sigma\sigma^+=1 fails: zero singular values
36:40Both AA+AA^+ and A+AA^+A are projections
39:59What the pseudoinverse can and cannot do

Four cases

CaseRankNull spacesSolutionsKind of inverse
Full-rank squarer=m=nr=m=ntrivial on both sidesuniquetwo-sided A−1A^{-1}
Full column rankr=n≤mr=n\le mnull space of AA trivialzero or oneleft inverse
Full row rankr=m≤nr=m\le nnull space of ATA^{\mathsf T} trivialalways, infinitely manyright inverse
Generalr<min⁡(m,n)r<\min(m,n)both nontrivial—pseudoinverse

Case one: full-rank square

r=m=nr=m=n, so AA is invertible and both sides give the identity:

A−1A=AA−1=I.A^{-1}A=AA^{-1}=I.

Case two: full column rank, left inverse

The columns are independent, r=nr=n, and the null space of AA is trivial. Then ATAA^{\mathsf T}A is n×nn\times n, symmetric, and invertible.

Define

Aleft=(ATA)−1AT.A_{\text{left}}=(A^{\mathsf T}A)^{-1}A^{\mathsf T}.

It is n×mn\times m, and

AleftA=(ATA)−1ATA=In.A_{\text{left}}A=(A^{\mathsf T}A)^{-1}A^{\mathsf T}A=I_n.

This is the combination that appears throughout least squares. With independent columns, the normal equations have an invertible coefficient matrix and a unique least-squares solution.

Watch the dimensions: AleftAA_{\text{left}}A is n×nn\times n. The other order, AAleftAA_{\text{left}}, is m×mm\times m and cannot be the identity because n<mn<m.

Case three: full row rank, right inverse

The rows are independent, r=mr=m, and the null space of ATA^{\mathsf T} is trivial. Then AATAA^{\mathsf T} is invertible.

Define

Aright=AT(AAT)−1.A_{\text{right}}=A^{\mathsf T}(AA^{\mathsf T})^{-1}.

It is n×mn\times m, and

AAright=Im.AA_{\text{right}}=I_m.

Since r=m<nr=m<n, the null space has dimension n−m>0n-m>0, so whenever Ax=bAx=b is solvable it has infinitely many solutions.

The other product is a projection

Put the left inverse on the right and you do not get the identity, but something familiar:

AAleft=A(ATA)−1AT=Pcol,AA_{\text{left}}=A(A^{\mathsf T}A)^{-1}A^{\mathsf T}=P_{\text{col}},

the projection onto the column space. It does the best a matrix can do: identity on the column space, zero on the left null space.

Similarly,

ArightA=AT(AAT)−1A=Prow,A_{\text{right}}A=A^{\mathsf T}(AA^{\mathsf T})^{-1}A=P_{\text{row}},

the projection onto the row space.

This explains why a left inverse only works from the left: the other side does not have the right dimension, and a projection is the best available result.

The general case: the pseudoinverse

When r<min⁡(m,n)r<\min(m,n), both null spaces are nonzero and no true inverse exists. But AA is a perfect bijection between the row space and the column space.

Why it is a bijection

Let x,yx,y lie in the row space and suppose Ax=AyAx=Ay. Then

A(x−y)=0,A(x-y)=0,

so x−yx-y lies in the null space. But x−yx-y is also a difference of two row-space vectors, hence lies in the row space. The null space and the row space are orthogonal complements, so their intersection is only the zero vector. Therefore

x−y=0.x-y=0.

So distinct row-space vectors map to distinct column-space vectors. Both spaces have dimension rr, so the map is invertible. Its inverse is the pseudoinverse A+A^+.

Constructing it from SVD

Let

A=UΣVT.A=U\Sigma V^{\mathsf T}.

Σ\Sigma is m×nm\times n with σ1,…,σr>0\sigma_1,\dots,\sigma_r>0 on the diagonal and zeros elsewhere.

Reciprocate each nonzero diagonal entry and transpose to shape n×mn\times m:

Σ+=diag⁡(1σ1,…,1σr,0,…,0).\Sigma^+=\operatorname{diag}\left(\frac{1}{\sigma_1},\dots,\frac{1}{\sigma_r},0,\dots,0\right).

Then

A+=VΣ+UT.A^+=V\Sigma^+U^{\mathsf T}.

Both products are projections

AA+=UΣΣ+UT=Pcol,AA^+=U\Sigma\Sigma^+U^{\mathsf T}=P_{\text{col}}, A+A=VΣ+ΣVT=Prow.A^+A=V\Sigma^+\Sigma V^{\mathsf T}=P_{\text{row}}.

ΣΣ+\Sigma\Sigma^+ is m×mm\times m with rr ones and zeros; Σ+Σ\Sigma^+\Sigma is n×nn\times n with the same structure. They project onto the column and row spaces respectively.

Why this is the best inverse

The pseudoinverse is the smallest possible choice. Along the null spaces there is no information, so no value can be tested; setting it to zero is natural. Adding anything there would not change AA+AA^+ or A+AA^+A, only make the pseudoinverse larger.

Background: the pseudoinverse satisfies the four Penrose conditions: AA+A=AAA^+A=A, A+AA+=A+A^+AA^+=A^+, (AA+)T=AA+(AA^+)^{\mathsf T}=AA^+, and (A+A)T=A+A(A^+A)^{\mathsf T}=A^+A. The first two make it an inverse where possible; the last two say both products are orthogonal projections.

Why statistics needs it

Least squares centers on the normal equations

ATAx^=ATb.A^{\mathsf T}A\hat x=A^{\mathsf T}b.

When AA has full column rank, ATAA^{\mathsf T}A is invertible and everything is fine. But repeated measurements or linearly dependent features make ATAA^{\mathsf T}A singular, and the normal equations have infinitely many solutions.

The pseudoinverse gives

x^=A+b,\hat x=A^+b,

the solution of smallest norm. That is exactly what statistical software does by default under collinearity.

Common mistakes

  1. Expecting a rectangular matrix to have a two-sided inverse. The dimensions forbid it: AAleftAA_{\text{left}} is m×mm\times m, not InI_n.
  2. Swapping the left and right inverse formulas. Left uses ATAA^{\mathsf T}A; right uses AATAA^{\mathsf T}.
  3. Thinking the pseudoinverse is just "transpose then invert". That happens only when all singular values equal one.
  4. Ignoring null-space freedom. The pseudoinverse cannot recover anything along the null space; no inverse could.

Takeaways

  • The four cases are determined by the relation among mm, nn, and rr.
  • Full column rank: left inverse (ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T}; the other product is the column-space projection.
  • Full row rank: right inverse AT(AAT)−1A^{\mathsf T}(AA^{\mathsf T})^{-1}; the other product is the row-space projection.
  • General case: A+=VΣ+UTA^+=V\Sigma^+U^{\mathsf T} is a genuine inverse between row and column spaces.
  • AA+AA^+ and A+AA^+A are orthogonal projections onto the column and row spaces.
  • The pseudoinverse gives the minimum-norm least-squares solution when ATAA^{\mathsf T}A is singular.

Check your understanding

1. Why can a rectangular matrix never have a two-sided inverse?

Reference answer: Let AA be m×nm\times n. If a left inverse BB (n×mn\times m) satisfies BA=InBA=I_n, then rank⁡A≥rank⁡(BA)=n\operatorname{rank}A\ge\operatorname{rank}(BA)=n, and since rank⁡A≤n\operatorname{rank}A\le n we get rank⁡A=n\operatorname{rank}A=n. If at the same time a right inverse CC satisfies AC=ImAC=I_m, then rank⁡A≥m\operatorname{rank}A\ge m, so rank⁡A=m\operatorname{rank}A=m. Both can hold only if m=nm=n. A direct algebraic proof: from BA=InBA=I_n and AC=ImAC=I_m,

B=B(AC)=(BA)C=C,B=B(AC)=(BA)C=C,

so B=CB=C is simultaneously a left and a right inverse, making AA square and invertible. Hence for m≠nm\ne n at most one side can exist.

2. Why does the left inverse use ATAA^{\mathsf T}A while the right inverse uses AATAA^{\mathsf T}?

Reference answer: A left inverse must produce InI_n on the left, which requires an invertible n×nn\times n matrix — and ATAA^{\mathsf T}A is exactly n×nn\times n. It is invertible when the columns are independent (r=nr=n), because ATAx=0⇒xTATAx=∥Ax∥2=0⇒Ax=0⇒x=0A^{\mathsf T}Ax=0\Rightarrow x^{\mathsf T}A^{\mathsf T}Ax=\lVert Ax\rVert^2=0\Rightarrow Ax=0\Rightarrow x=0. Hence (ATA)−1AT(A^{\mathsf T}A)^{-1}A^{\mathsf T} times AA on the left gives InI_n. A right inverse must produce ImI_m, requiring an m×mm\times m matrix; AATAA^{\mathsf T} is exactly that and is invertible when the rows are independent (r=mr=m), so AT(AAT)−1A^{\mathsf T}(AA^{\mathsf T})^{-1} gives ImI_m on the right. The dimensions dictate which product to use.

3. Prove that AA is injective on the row space, and identify which two subspace facts the proof uses.

Reference answer: Take x,yx,y in the row space with Ax=AyAx=Ay. Then A(x−y)=0A(x-y)=0, so x−y∈N(A)x-y\in N(A). On the other hand the row space is closed under subtraction, so x−y∈C(AT)x-y\in C(A^{\mathsf T}). The first fact used is N(A)⊥C(AT)N(A)\perp C(A^{\mathsf T}): the null space is orthogonal to the row space. The second is that the row space is a subspace, hence closed under linear combinations. Two orthogonal subspaces meet only at zero, so x−y=0x-y=0, i.e. x=yx=y. Since the row and column spaces both have dimension rr, injectivity plus equal dimensions gives a bijection, and its inverse is the pseudoinverse.

4. Why is AA+AA^+ a projection rather than the identity? What is its null space?

Reference answer: AA+=UΣΣ+UTAA^+=U\Sigma\Sigma^+U^{\mathsf T}, where ΣΣ+\Sigma\Sigma^+ is the m×mm\times m diagonal matrix with the first rr diagonal entries 11 and the remaining m−rm-r entries 00. It acts as the identity on the column space (spanned by u1,…,uru_1,\dots,u_r) and as zero on the left null space (spanned by ur+1,…,umu_{r+1},\dots,u_m). It equals the identity only when r=mr=m; in general m−r>0m-r>0 and the left-null-space directions are killed, so it can only be a projection. Its null space is precisely the left null space N(AT)N(A^{\mathsf T}), of dimension m−rm-r.

5. When ATAA^{\mathsf T}A is singular, why does least squares need the pseudoinverse, and what is special about the solution it selects?

Reference answer: ATAA^{\mathsf T}A singular means the columns of AA are dependent (r<nr<n), so the normal equations ATAx^=ATbA^{\mathsf T}A\hat x=A^{\mathsf T}b have infinitely many solutions — they differ by arbitrary null-space vectors, and "least residual" alone cannot distinguish them. The pseudoinverse gives

x^=A+b=VΣ+UTb,\hat x=A^+b=V\Sigma^+U^{\mathsf T}b,

which projects away the component of bb in the left null space and maps the column-space component back through 1/σi1/\sigma_i; it assigns zero on the null space. Among all least-squares solutions, x^\hat x is therefore the one of minimum norm (the minimum-norm least-squares solution), which is the default that statistical software uses under collinearity.

How this connects to the course

The preceding lectures covered eigenvalues, positive definiteness, similarity, and SVD. This one applies SVD to inverting non-square matrices and ties the four subspaces, rank, and least squares into one classification. The next lecture is the final review, revisiting these threads through old exam problems.

来源