# 行空间与列空间

矩阵的**行空间**和**列空间**分别是其各行与各列所张成的两个子空间。对于 \( m \times n \) 矩阵 \( A \)，列空间 \( \operatorname{Col} A \) 是 \( A \) 的列的所有线性组合的集合，等价地是 \( \{ A\vec{x} : \vec{x} \in \mathbb{R}^n \} \)，并且它是 \( \mathbb{R}^m \) 的子空间；行空间 \( \operatorname{Row} A \) 是行向量的所有线性组合的集合，写成 \( \mathbb{R}^n \) 中的向量，并满足 \( \operatorname{Row} A = \operatorname{Col} A^T \)。<sup>[1](https://www.math.purdue.edu/~xu1121/Sec4.2)</sup> 它们与零空间和左零空间一起，构成与矩阵相关的四个基本子空间。<sup>[2](https://webhome.auburn.edu/~mip0024/teaching/math2660/slides/19-fundamental-subspaces.html)</sup>

| 关键事实 | 细节 |
|---|---|
| 列空间 | 列的所有线性组合；等于映射 \( \vec{x} \mapsto A\vec{x} \) 的值域；对于 \( m \times n \) 矩阵，是 \( \mathbb{R}^m \) 的子空间<sup>[1](https://www.math.purdue.edu/~xu1121/Sec4.2)</sup> |
| 行空间 | 行的所有线性组合，写成 \( \mathbb{R}^n \) 中的向量；\( \operatorname{Row} A = \operatorname{Col} A^T \)<sup>[1](https://www.math.purdue.edu/~xu1121/Sec4.2)</sup> |
| 维数相等 | \( \operatorname{rank} A = \dim \operatorname{Col} A = \dim \operatorname{Row} A \)；共同值称为秩<sup>[3](https://www.math.purdue.edu/~chenjk/MA265Su18/Lesson17-acc.html)</sup> |
| 秩定理 | \( \dim \operatorname{Col} A + \dim \operatorname{Nul} A = n \)，即列数<sup>[4](https://people.math.carleton.ca/~kcheung/math/notes/MATH1107/09/09_rank_nullity_theorem.html)</sup> |
| 正交补 | 在 \( \mathbb{R}^n \) 中 \( \operatorname{Nul} A = (\operatorname{Row} A)^{\perp} \)，在 \( \mathbb{R}^m \) 中 \( \operatorname{Nul} A^T = (\operatorname{Col} A)^{\perp} \)<sup>[5](https://people.hsc.edu/faculty-staff/blins/classes/spring20/math422/week6.html)</sup> |
| 计算一组基 | 行变换保持行空间；\( A \) 的阶梯形中的非零行构成其一组基，而 \( A \) 的主元列构成列空间的一组基<sup>[3](https://www.math.purdue.edu/~chenjk/MA265Su18/Lesson17-acc.html)</sup> |
| 最小二乘 | 最小二乘解满足 \( A^T A \vec{x} = A^T \vec{b} \)，且 \( A\vec{x} \) 是 \( \vec{b} \) 到列空间的正交投影<sup>[6](https://ximera.osu.edu/linearalgebra/textbook/leastSquares/theFundamentalSubspacesTheorem)</sup> |

## 定义及各空间所在之处

对于 \( A = \begin{bmatrix} \vec{a}_1 & \dots & \vec{a}_n \end{bmatrix} \)，列空间是 \( \operatorname{Span}\{\vec{a}_1, \dots, \vec{a}_n\} \)，即所有形如 \( A\vec{x} \)（其中 \( \vec{x} \in \mathbb{R}^n \)）的向量 \( \vec{b} \) 的集合。它是线性变换 \( \vec{x} \mapsto A\vec{x} \) 的值域，并且 \( \operatorname{Col} A = \mathbb{R}^m \) 当且仅当对每个 \( \vec{b} \in \mathbb{R}^m \)，方程 \( A\vec{x} = \vec{b} \) 都相容。<sup>[1](https://www.math.purdue.edu/~xu1121/Sec4.2)</sup>

\( m \times n \) 矩阵的每一行有 \( n \) 个元素，并被等同于 \( \mathbb{R}^n \) 中的一个向量，因此行空间是 \( \mathbb{R}^n \) 的子空间。把各行写成列向量，立即可得恒等式 \( \operatorname{Row} A = \operatorname{Col} A^T \)，同样也有 \( \operatorname{Row} A^T = \operatorname{Col} A \)。<sup>[1](https://www.math.purdue.edu/~xu1121/Sec4.2)</sup> 因此，当 \( m \neq n \) 时，这两个空间位于不同的环境空间中：列空间在陪域 \( \mathbb{R}^m \) 中，行空间在定义域 \( \mathbb{R}^n \) 中。<sup>[5](https://people.hsc.edu/faculty-staff/blins/classes/spring20/math422/week6.html)</sup>

## 秩：一个数描述两个空间

线性代数的一个核心定理，有时称为线性代数第二奇迹，指出任意矩阵的行秩等于其列秩。<sup>[7](https://people.cs.uchicago.edu/~laci/REU16/book.pdf)</sup> 因此 \( \operatorname{rank} A = \dim \operatorname{Col} A = \dim \operatorname{Row} A = \dim \operatorname{Col} A^T \)。<sup>[3](https://www.math.purdue.edu/~chenjk/MA265Su18/Lesson17-acc.html)</sup> 正是这个等式使得单个数字——秩——能够描述这两个空间，而且尽管这两个空间通常位于维数不同的向量空间中，该等式仍然成立。

**数主元。** 秩等于主元列的个数，也等于基本变量的个数，而 \( \dim \operatorname{Nul} A \) 等于自由变量的个数；它们的和是 \( n \)，即列数（秩定理，或称秩-零化度定理）。<sup>[3](https://www.math.purdue.edu/~chenjk/MA265Su18/Lesson17-acc.html)</sup><sup> • </sup><sup>[4](https://people.math.carleton.ca/~kcheung/math/notes/MATH1107/09/09_rank_nullity_theorem.html)</sup> 证明通过行化简进行：初等行变换不改变行空间或零空间，而对于简化行阶梯形矩阵 \( R \)，行空间维数 \( k \) 是首元 1 的个数，所以 \( \operatorname{rank}(R) + \operatorname{nullity}(R) = k + (n - k) = n \)。<sup>[4](https://people.math.carleton.ca/~kcheung/math/notes/MATH1107/09/09_rank_nullity_theorem.html)</sup> 将同一定理应用于 \( A^T \)，得到 \( \operatorname{rank}(A) + \dim \operatorname{Nul}(A^T) = m \)，因此当秩为 \( r \) 时，左零空间的维数为 \( m - r \)。<sup>[2](https://webhome.auburn.edu/~mip0024/teaching/math2660/slides/19-fundamental-subspaces.html)</sup>

## 计算基

行化简是标准工具。如果 \( A \sim B \)（一个矩阵由另一个经初等行变换得到），那么 \( \operatorname{Row} A = \operatorname{Row} B \)，因为 \( B \) 的各行是 \( A \) 的各行的线性组合，且行变换可逆。<sup>[3](https://www.math.purdue.edu/~chenjk/MA265Su18/Lesson17-acc.html)</sup> 阶梯形矩阵的非零行构成行空间的一组基；原矩阵的各行不直接使用，因为行变换可能改变它们之间的线性相关性。<sup>[3](https://www.math.purdue.edu/~chenjk/MA265Su18/Lesson17-acc.html)</sup> 对于列空间，原矩阵 \( A \) 的主元列构成一组基，因为主元列的个数等于 \( \dim \operatorname{Col} A \)。<sup>[3](https://www.math.purdue.edu/~chenjk/MA265Su18/Lesson17-acc.html)</sup>

## 正交补与基本定理

线性代数基本定理指出，对任意 \( A \in \mathbb{R}^{m \times n} \)，有 \( \operatorname{Null}(A) = \operatorname{Range}(A^T)^{\perp} \) 和 \( \operatorname{Null}(A^T) = \operatorname{Range}(A)^{\perp} \)。<sup>[5](https://people.hsc.edu/faculty-staff/blins/classes/spring20/math422/week6.html)</sup> 换句话说，行空间与零空间是定义域 \( \mathbb{R}^n \) 中的正交补，列空间与左零空间是陪域 \( \mathbb{R}^m \) 中的正交补。<sup>[5](https://people.hsc.edu/faculty-staff/blins/classes/spring20/math422/week6.html)</sup> 成为正交补意味着这两对空间既相互垂直，又作为直和共同张成整个环境空间：<sup>[8](https://ericdarve.github.io/NLA/content/four_fundamental_subspaces.html)</sup>

\[ \mathbb{R}^n = \operatorname{Row}(A) \oplus \operatorname{Nul}(A), \qquad \mathbb{R}^m = \operatorname{Col}(A) \oplus \operatorname{Nul}(A^T). \]

因此，每个输入向量都有唯一分解，分为行空间分量和零空间分量，且这两个分量正交。<sup>[8](https://ericdarve.github.io/NLA/content/four_fundamental_subspaces.html)</sup> 在 \( \mathbb{R}^3 \) 中，若矩阵的秩为 2，这意味着行空间是一个平面，而零空间是垂直于该平面的直线。<sup>[3](https://www.math.purdue.edu/~chenjk/MA265Su18/Lesson17-acc.html)</sup> 对任意子空间 \( V \) 都有双补性质 \( (V^{\perp})^{\perp} = V \)，这意味着该定理的四种陈述彼此等价。<sup>[6](https://ximera.osu.edu/linearalgebra/textbook/leastSquares/theFundamentalSubspacesTheorem)</sup>

## 应用

**最小二乘。** 当 \( A\vec{x} = \vec{b} \) 没有精确解，即 \( \vec{b} \notin \operatorname{Col} A \) 时，最小二乘问题寻找列空间中距离 \( \vec{b} \) 最近的向量。投影 \( \operatorname{pr}_{C(A)}(\vec{b}) \) 由 \( A\vec{x} - \vec{b} \in C(A)^{\perp} = N(A^T) \) 刻画，由此得到正规方程 \( A^T A \vec{x} = A^T \vec{b} \)。<sup>[6](https://ximera.osu.edu/linearalgebra/textbook/leastSquares/theFundamentalSubspacesTheorem)</sup> 当 \( A \) 列满秩时，\( A^T A \) 非奇异，唯一的最小二乘解为 \( \vec{x} = (A^T A)^{-1} A^T \vec{b} \)，近似为 \( A\vec{x} = A (A^T A)^{-1} A^T \vec{b} \)。<sup>[6](https://ximera.osu.edu/linearalgebra/textbook/leastSquares/theFundamentalSubspacesTheorem)</sup> 在线性回归中，拟合 \( \hat{y} \in \operatorname{Range}(X) \) 使其最接近观测值 \( y \)，正是要求 \( \hat{y} - y \) 与设计矩阵的列空间正交，即 \( X^T(\hat{y} - y) = 0 \)。<sup>[5](https://people.hsc.edu/faculty-staff/blins/classes/spring20/math422/week6.html)</sup>

**数值秩。** 在浮点计算中，秩是一个判定而非精确性质：计算出的奇异值很少恰好为零。诸如 NumPy 的 `matrix_rank` 之类的软件，在奇异值低于阈值时判定为秩亏，默认阈值为 \( S_{\max} \cdot \max(M, N) \cdot \varepsilon \)，其中 \( \varepsilon \) 是机器 epsilon；这可以检测出那些在数值上（尽管并非精确地）是其他列线性组合的列。<sup>[9](https://numpy.org/doc/stable/reference/generated/numpy.linalg.matrix_rank.html)</sup>

**统计学与数据科学。** 从含噪、不完整的观测中估计未知低秩矩阵的列空间，是含缺失数据的主成分分析、张量补全以及二部图中的社区恢复中的一个核心问题；针对列维数远大于行维数的情形，已发展出统计理论，并给出匹配的极小极大下界。<sup>[10](https://collaborate.princeton.edu/en/publications/subspace-estimation-from-unbalanced-and-incomplete-data-matrices-/)</sup>

## References

1. [Section 4.2: Null Spaces, Column Spaces, Row Spaces and Linear Transformations, Purdue University](https://www.math.purdue.edu/~xu1121/Sec4.2)
2. [Fundamental Subspaces, MATH 2660 slides, Auburn University](https://webhome.auburn.edu/~mip0024/teaching/math2660/slides/19-fundamental-subspaces.html)
3. [4.6 Rank, Accessible Math Notes, Purdue University](https://www.math.purdue.edu/~chenjk/MA265Su18/Lesson17-acc.html)
4. [Rank-Nullity Theorem, MATH 1107 notes, Carleton University](https://people.math.carleton.ca/~kcheung/math/notes/MATH1107/09/09_rank_nullity_theorem.html)
5. [Week 6 Lecture Notes, MATH 422, Hampden-Sydney College](https://people.hsc.edu/faculty-staff/blins/classes/spring20/math422/week6.html)
6. [Least-squares solutions and the Fundamental Subspaces theorem, Ximera, Ohio State University](https://ximera.osu.edu/linearalgebra/textbook/leastSquares/theFundamentalSubspacesTheorem)
7. [Discover Linear Algebra, László Babai, University of Chicago](https://people.cs.uchicago.edu/~laci/REU16/book.pdf)
8. [The Four Fundamental Subspaces, CME 302 Numerical Linear Algebra, Stanford University](https://ericdarve.github.io/NLA/content/four_fundamental_subspaces.html)
9. [numpy.linalg.matrix_rank, NumPy v2.5 Manual](https://numpy.org/doc/stable/reference/generated/numpy.linalg.matrix_rank.html)
10. [Subspace estimation from unbalanced and incomplete data matrices, Cai, Li, Chi, Poor, and Chen, Annals of Statistics 49(2), 2021](https://collaborate.princeton.edu/en/publications/subspace-estimation-from-unbalanced-and-incomplete-data-matrices-/)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Linear and multilinear algebra › Vector spaces and linear maps

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/row-and-column-spaces

English original: https://www.edgepedia.org/row-and-column-spaces
