第 11 章

矩阵空间、秩一矩阵与小世界图

向量空间不限于 R^n:矩阵、函数都可以是向量。秩一矩阵是构造所有矩阵的积木,图则把线性代数带到网络与友谊链上。

Matrix Spaces, Rank-One Matrices, and Small-World Graphs

Vector spaces go beyond R^n: matrices and functions qualify too. Rank-one matrices are the building blocks of every matrix, and graphs bring linear algebra to networks and friendship chains.

首发于 2009.05.07中 / EN
系统课程linear-algebramatrix-spacerank-onegraphs
语言
字号
目录
篇内目录

向量不一定是箭头

上一讲末尾已经出现「矩阵作为向量」的想法,这一讲把它展开。判断标准只有一条:能相加、能乘标量,就构成向量空间。矩阵乘法在这里完全用不上。

全体 3×33\times3 矩阵记作 MM。它的标准基是九个矩阵 EijE_{ij},每个只在第 ii 行第 jj 列有一个 1,其余为 0。因此

dim⁡M=9.\dim M=9.

这九个矩阵相加、乘系数,可以拼出任意 3×33\times3 矩阵,而且它们线性无关。

时间轴

时间内容
0:10矩阵空间与它的子空间
1:52对称矩阵与上三角矩阵
6:58对称矩阵的维数是 6
8:39既对称又是上三角,只能是矩阵对角
10:21子空间的交、并与和
13:48dim⁡(S+U)=dim⁡S+dim⁡U\dim(S+U)=\dim S+\dim U
15:28微分方程 y′′+y=0y''+y=0 的解空间
18:52解空间维数为 2,基是 sin⁡x,cos⁡x\sin x,\cos x
20:38秩一矩阵是最小的积木
22:19秩一矩阵 = 列乘行,维数 m+n−1m+n-1
24:03秩一矩阵的完整图景
27:30rank⁡(A+B)≤rank⁡A+rank⁡B\operatorname{rank}(A+B)\le \operatorname{rank}A+\operatorname{rank}B
29:15分量和为零的子空间
34:19该子空间的零空间维数为 3
39:27图与关联矩阵的预告
44:36留给下一讲的问题

三个子空间

对称矩阵 SS

对称要求 aij=ajia_{ij}=a_{ji}。独立选择的参数是:3 个对角元,加上对角线上方的 3 个元素;下方的 3 个由对称性决定。所以

dim⁡S=3+3=6.\dim S=3+3=6.

注意:SS 的基不能只从标准基里挑。九个 EijE_{ij} 中只有 3 个是对称的(E11,E22,E33E_{11},E_{22},E_{33}),它们张不出全部对称矩阵。要得到完整的基,需要把 Eij+EjiE_{ij}+E_{ji} 这样的组合加进来,例如

[010100000].\begin{bmatrix}0&1&0\\1&0&0\\0&0&0\end{bmatrix}.

这是一个反复出现的教训:大空间的基不一定是子空间的基。

上三角矩阵 UU

要求对角线下方全为 0。可自由选择的是对角元 3 个加上上方 3 个,共 6 个,所以

dim⁡U=6.\dim U=6.

与对称情形不同,UU 的基恰好可以从标准基里挑出六个(EijE_{ij},i≤ji\le j)。这只是巧合,不能当作通用方法。

对角矩阵 D=S∩UD=S\cap U

既对称又上三角,只能是对角矩阵。自由参数只有 3 个对角元:

dim⁡D=3.\dim D=3.

交、并与和

  • 交 S∩U=DS\cap U=D,维数 3。
  • 并 S∪US\cup U 不是子空间。取一个对称但非上三角的矩阵,再取一个上三角但非对称的矩阵,两者相加通常既不对称也不上三角,说明并集对加法不封闭。
  • 和 S+US+U 定义为「一个 SS 中元素加一个 UU 中元素」的全体。它其实就是整个 MM。构造方法如下:给定任意 AA,令
S=[a112a21a31a21a222a32a31a32a332],U=[a112a12−a21a13−a310a222a23−a3200a332].S=\begin{bmatrix} \frac{a_{11}}{2}&a_{21}&a_{31}\\[2pt] a_{21}&\frac{a_{22}}{2}&a_{32}\\[2pt] a_{31}&a_{32}&\frac{a_{33}}{2} \end{bmatrix}, \qquad U=\begin{bmatrix} \frac{a_{11}}{2}&a_{12}-a_{21}&a_{13}-a_{31}\\[2pt] 0&\frac{a_{22}}{2}&a_{23}-a_{32}\\[2pt] 0&0&\frac{a_{33}}{2} \end{bmatrix}.

SS 对称,UU 上三角,逐元素相加恰好得到 AA。因此

S+U=M,dim⁡(S+U)=9.S+U=M,\qquad \dim(S+U)=9.

维数公式随之成立:

dim⁡S+dim⁡U=dim⁡(S∩U)+dim⁡(S+U)⟹6+6=3+9.\dim S+\dim U=\dim(S\cap U)+\dim(S+U) \quad\Longrightarrow\quad 6+6=3+9.

函数也是向量

考虑微分方程

d2ydx2+y=0.\frac{d^2y}{dx^2}+y=0.

它的解是

y=c1cos⁡x+c2sin⁡x.y=c_1\cos x+c_2\sin x.

所有解构成一个向量空间:两个解相加仍是解,乘常数仍是解。{cos⁡x,sin⁡x}\{\cos x,\sin x\} 是一组基,维数是 2。

也可以选 {eix,e−ix}\{e^{ix},e^{-ix}\} 作为基——基不唯一,维数唯一。Strang 的评论很精炼:一门线性微分方程课,本质上就是在给解空间找基。二阶方程的解空间维数是 2,这与方程阶数对应。

这类例子的意义在于:线性代数的语言(组合、无关、基、维数)并不依赖「向量是箭头」这一图像,只要对象能相加、能数乘即可。

秩一矩阵:最小的积木

秩为 1 的矩阵有一个非常干净的结构:

A=uv⊤,A=\mathbf{u}\mathbf{v}^\top,

其中 u\mathbf{u} 是列向量,v⊤\mathbf{v}^\top 是行向量。乘积是一个矩阵,每一列都是 u\mathbf{u} 的倍数。

例子

A=[1452810]=[12][145].A=\begin{bmatrix}1&4&5\\2&8&10\end{bmatrix} = \begin{bmatrix}1\\2\end{bmatrix} \begin{bmatrix}1&4&5\end{bmatrix}.
  • 行空间由 (1,4,5)(1,4,5) 张成,维数 1;
  • 列空间由 (1,2)⊤(1,2)^\top 张成,维数 1;
  • 秩为 1,两个维数一致。

所有矩阵都是秩一矩阵之和

一个秩为 rr 的矩阵可以写成 rr 个秩一矩阵之和。例如一个 5×175\times17、秩为 4 的矩阵,可以拆成 4 个「列 × 行」的外积。

这解释了为什么秩一是「积木」:它是最简单的非零矩阵,而所有矩阵都由若干块拼成。后续讲行列式与特征值时,秩一矩阵还会反复出现,因为它的结构足够简单,计算可以化简。

秩一矩阵不构成子空间

一个自然的错误是把「所有秩一矩阵」当成子空间。取两个秩一矩阵相加:

[1000]+[0001]=[1001],\begin{bmatrix}1&0\\0&0\end{bmatrix} + \begin{bmatrix}0&0\\0&1\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix},

结果是秩 2。更一般地,

rank⁡(A+B)≤rank⁡(A)+rank⁡(B),\operatorname{rank}(A+B)\le \operatorname{rank}(A)+\operatorname{rank}(B),

所以两个秩一矩阵之和通常秩为 2,甚至可能更高。子空间必须对加法封闭,秩一集合不满足。

一个具体的子空间:分量和为零

在 R4\mathbb{R}^4 中取所有满足

v1+v2+v3+v4=0v_1+v_2+v_3+v_4=0

的向量。它构成子空间:相加、数乘都保持「和为零」。

它其实是矩阵

A=[1111]A=\begin{bmatrix}1&1&1&1\end{bmatrix}

的零空间。AA 的秩为 1,列数 n=4n=4,所以

dim⁡N(A)=n−r=4−1=3.\dim N(A)=n-r=4-1=3.

一组自然基是三个特殊解:

[−1100],[−1010],[−1001].\begin{bmatrix}-1\\1\\0\\0\end{bmatrix},\quad \begin{bmatrix}-1\\0\\1\\0\end{bmatrix},\quad \begin{bmatrix}-1\\0\\0\\1\end{bmatrix}.

四个基本子空间也随之清楚:

子空间内容维数
行空间(1,1,1,1)(1,1,1,1) 的所有倍数1
零空间分量和为零的向量3
列空间所有实数(1×11\times1 矩阵)1
左零空间只有零向量0

左零空间的基是空集——维数为 0 的空间只有零向量,不需要任何基向量。这个细节常被忽略,但它是维数定义的直接推论。

图:线性代数的下一个舞台

最后五分钟引入图。这里的「图」不是函数图像,而是节点与边的集合。

  • 把教室里每个人看作节点,两人是朋友就连一条边,就得到一张友谊图。
  • 把全美人口看作节点,就得到一张约 2.6 亿节点的图。
  • 把网页看作节点、链接看作边,就得到万维网图。

核心问题是:任意两人之间最少要经过几步? 这就是「六度分隔」的来源。Strang 用自己的例子说明:他离某位政治家两步,学生离这位政治家最多三步。

数学上有趣的地方在于:少量捷径会让距离急剧下降。下一讲会用矩阵(关联矩阵)把图的性质翻译成线性代数问题,四个基本子空间会再次出现——这次是在网络里。

本讲结论

  • 矩阵与函数都可以是向量,只要定义了加法与数乘。
  • 3×33\times3 矩阵空间维数 9;对称、上三角各 6;对角 3。
  • 子空间的交与和满足维数加法公式。
  • 秩一矩阵形如 uv⊤\mathbf{u}\mathbf{v}^\top,是所有矩阵的积木;但秩一矩阵集合不是子空间。
  • 分量和为零的 R4\mathbb{R}^4 子空间是 [1,1,1,1][1,1,1,1] 的零空间,维数 3。
  • 图把线性代数连接到网络与距离问题。

理解检验

1. 为什么对称矩阵空间的基不能直接从标准基 EijE_{ij} 中挑?

参考答案:标准基里的 EijE_{ij}(i≠ji\ne j)只有一个非零元,位于第 ii 行第 jj 列,它的转置是 Eji≠EijE_{ji}\ne E_{ij},因此不是对称矩阵。九个 EijE_{ij} 中只有对角的那三个 E11,E22,E33E_{11},E_{22},E_{33} 是对称的,它们张成的只是对角矩阵空间,维数 3,远小于 dim⁡S=6\dim S=6。

要得到 SS 的基,必须使用形如 Eij+EjiE_{ij}+E_{ji} 的组合,例如

[010100000]=E12+E21.\begin{bmatrix}0&1&0\\1&0&0\\0&0&0\end{bmatrix}=E_{12}+E_{21}.

六个基向量可以取三个 EiiE_{ii} 加三个 Eij+EjiE_{ij}+E_{ji}(i<ji<j),共 6 个且线性无关。这说明:大空间的基不自动是子空间的基。

2. 上三角矩阵空间的基恰好是标准基的子集,这是必然还是巧合?

参考答案:是巧合,或者说,是上三角这个条件的特殊形式带来的便利。UU 的定义是「坐标满足 i>ji>j 时 aij=0a_{ij}=0」,它是用逐坐标的等式刻画的,所以每个满足条件的 EijE_{ij}(i≤ji\le j)本身就在 UU 里,把它们凑齐就得到一组基,共 6 个。

对称条件 aij=ajia_{ij}=a_{ji} 则是坐标之间的等式,单个 EijE_{ij} 不满足它,只有组合才满足。因此不能把「从标准基里挑」当作通用方法;判断依据始终是:这些向量是否都在子空间内、是否无关、个数是否等于维数。

3. 举两个秩一矩阵,使它们的和为秩二,并验证秩的次可加性。

参考答案:取

A=[1000]=[10][10],B=[0001]=[01][01].A=\begin{bmatrix}1&0\\0&0\end{bmatrix}=\begin{bmatrix}1\\0\end{bmatrix}\begin{bmatrix}1&0\end{bmatrix}, \qquad B=\begin{bmatrix}0&0\\0&1\end{bmatrix}=\begin{bmatrix}0\\1\end{bmatrix}\begin{bmatrix}0&1\end{bmatrix}.

两者都是秩一矩阵(各只有一个非零列/行方向),而

A+B=[1001]=IA+B=\begin{bmatrix}1&0\\0&1\end{bmatrix}=I

的秩为 2。于是

rank⁡(A+B)=2≤1+1=rank⁡(A)+rank⁡(B),\operatorname{rank}(A+B)=2\le 1+1=\operatorname{rank}(A)+\operatorname{rank}(B),

次可加性成立,且此处取等号。注意和可以小于上界:若取 B=−AB=-A,则 A+B=0A+B=0,秩为 0<20<2。无论如何,秩一矩阵之和不一定是秩一,所以「全体秩一矩阵」对加法不封闭,不构成子空间。

4. 零维空间的基是什么?为什么?

参考答案:零维空间只有零向量,其基是空集 ∅\varnothing。

理由要同时满足基的两个条件:空集的张成按定义是 {0}\{\mathbf{0}\}(空组合等于零向量),所以它张成该空间;空集没有非平凡组合,因此线性无关。另一方面,任何包含零向量的非空集合都相关(取零向量的系数为 1),所以零维空间不可能有非空基。这正是本讲中 1×41\times4 矩阵 [1,1,1,1][1,1,1,1] 的左零空间:维数为 m−r=1−1=0m-r=1-1=0,基为空集。

5. 若把友谊图的每个人作为节点,邻接关系如何写成一个矩阵?

参考答案:用邻接矩阵 AA:行和列都对应人,若第 ii 个人与第 jj 个人是朋友,就令 aij=1a_{ij}=1,否则 aij=0a_{ij}=0;并约定 aii=0a_{ii}=0(不考虑自己与自己为友)。友谊是无向的,所以 aij=ajia_{ij}=a_{ji},AA 是对称矩阵,对角线为 00。

邻接矩阵的幂给出步数信息:(A2)ij(A^2)_{ij} 等于从 ii 到 jj 长度为 2 的路径条数,(Ak)ij(A^k)_{ij} 对应长度 kk 的路径条数——这就是「六度分隔」可以写成矩阵问题的原因。补充:下一讲使用的不是邻接矩阵,而是关联矩阵(行是节点、列是边),四个基本子空间在其中有直接的网络含义(如零空间对应环流)。

与前后课程的关系

上一讲建立了四个基本子空间;这一讲把「空间」推广到矩阵与函数,并引入秩一分解。下一讲正式用矩阵描述图:节点、边、关联矩阵,以及四个子空间在网络中的含义。

Vectors need not be arrows

The previous lecture already hinted that matrices can be vectors. This lecture develops the idea. The only requirement is structural: a set whose elements can be added and scaled is a vector space. Matrix multiplication plays no role.

The space of all 3×33\times3 matrices is called MM. Its standard basis is the nine matrices EijE_{ij}, each with a single 1 in row ii, column jj. Hence

dim⁡M=9.\dim M=9.

Any 3×33\times3 matrix is a combination of these nine, and they are independent.

Timeline

TimeTopic
0:10Matrix spaces and their subspaces
1:52Symmetric and upper triangular matrices
6:58The symmetric matrices have dimension 6
8:39Symmetric and upper triangular means diagonal
10:21Intersection, union, and sum of subspaces
13:48The dimension formula for sums
15:28The solution space of y′′+y=0y''+y=0
18:52The solution space is two-dimensional
20:38Rank-one matrices as building blocks
22:19Rank one: a column times a row
24:03The complete rank-one picture
27:30Rank is subadditive
29:15The subspace of vectors whose entries sum to zero
34:19Its null space has dimension three
39:27A first look at graphs and incidence matrices
44:36The question left for next lecture

Three subspaces

Symmetric matrices, SS

Symmetry requires aij=ajia_{ij}=a_{ji}. The free choices are the 3 diagonal entries plus the 3 entries above the diagonal; the entries below are determined. Therefore

dim⁡S=3+3=6.\dim S=3+3=6.

A warning: the basis of SS cannot simply be selected from the standard basis. Only three of the nine EijE_{ij} are symmetric (E11,E22,E33E_{11},E_{22},E_{33}), and they cannot span all symmetric matrices. The full basis needs combinations such as

[010100000].\begin{bmatrix}0&1&0\\1&0&0\\0&0&0\end{bmatrix}.

This is a recurring lesson: a basis of the big space is not automatically a basis of a subspace.

Upper triangular matrices, UU

Entries below the diagonal are zero. The free choices are the 3 diagonal entries plus the 3 above, so

dim⁡U=6.\dim U=6.

Unlike the symmetric case, six of the standard EijE_{ij} with i≤ji\le j happen to form a basis. That is a coincidence of this example, not a general method.

Diagonal matrices, D=S∩UD=S\cap U

Symmetric and upper triangular forces a diagonal matrix. Only the 3 diagonal entries are free:

dim⁡D=3.\dim D=3.

Intersection, union, and sum

  • Intersection S∩U=DS\cap U=D, dimension 3.
  • Union S∪US\cup U is not a subspace. A symmetric but non-triangular matrix plus an upper triangular but non-symmetric matrix typically produces something with neither property, so the union is not closed under addition.
  • Sum S+US+U is the set of all sums of one element from SS and one from UU. It is the whole space MM. Given any AA, set
S=[a112a21a31a21a222a32a31a32a332],U=[a112a12−a21a13−a310a222a23−a3200a332].S=\begin{bmatrix} \frac{a_{11}}{2}&a_{21}&a_{31}\\[2pt] a_{21}&\frac{a_{22}}{2}&a_{32}\\[2pt] a_{31}&a_{32}&\frac{a_{33}}{2} \end{bmatrix}, \qquad U=\begin{bmatrix} \frac{a_{11}}{2}&a_{12}-a_{21}&a_{13}-a_{31}\\[2pt] 0&\frac{a_{22}}{2}&a_{23}-a_{32}\\[2pt] 0&0&\frac{a_{33}}{2} \end{bmatrix}.

SS is symmetric, UU is upper triangular, and entry by entry the sum is AA. Therefore

S+U=M,dim⁡(S+U)=9.S+U=M,\qquad \dim(S+U)=9.

The dimension identity follows:

dim⁡S+dim⁡U=dim⁡(S∩U)+dim⁡(S+U)⟹6+6=3+9.\dim S+\dim U=\dim(S\cap U)+\dim(S+U) \quad\Longrightarrow\quad 6+6=3+9.

Functions are vectors too

Consider the differential equation

d2ydx2+y=0.\frac{d^2y}{dx^2}+y=0.

Its solutions are

y=c1cos⁡x+c2sin⁡x.y=c_1\cos x+c_2\sin x.

The solution set is a vector space: sums of solutions are solutions, and scalar multiples are solutions. The pair {cos⁡x,sin⁡x}\{\cos x,\sin x\} is a basis, and the dimension is 2.

Another basis is {eix,e−ix}\{e^{ix},e^{-ix}\} — bases vary, dimension does not. Strang's remark is sharp: a course in linear differential equations is essentially the search for a basis of the solution space. A second-order equation has a two-dimensional solution space.

The point of the example is that linear algebra does not depend on vectors being arrows. Addition and scalar multiplication are enough.

Rank-one matrices: the smallest blocks

A rank-one matrix has a clean structure:

A=uv⊤,A=\mathbf{u}\mathbf{v}^\top,

where u\mathbf{u} is a column and v⊤\mathbf{v}^\top is a row. Every column of the product is a multiple of u\mathbf{u}.

Example

A=[1452810]=[12][145].A=\begin{bmatrix}1&4&5\\2&8&10\end{bmatrix} = \begin{bmatrix}1\\2\end{bmatrix} \begin{bmatrix}1&4&5\end{bmatrix}.
  • The row space is spanned by (1,4,5)(1,4,5), dimension 1.
  • The column space is spanned by (1,2)⊤(1,2)^\top, dimension 1.
  • The rank is 1, matching both dimensions.

Every matrix is a sum of rank-one matrices

A rank-rr matrix can be written as the sum of rr rank-one matrices. A 5×175\times17 matrix of rank 4, for instance, decomposes into four outer products.

This is why rank-one matrices are called building blocks: they are the simplest nonzero matrices, and every matrix is assembled from several of them. Determinants and eigenvalues of rank-one matrices are especially simple, which is why they reappear later.

Rank-one matrices are not a subspace

A natural mistake is to treat the set of all rank-one matrices as a subspace. Add two of them:

[1000]+[0001]=[1001],\begin{bmatrix}1&0\\0&0\end{bmatrix} + \begin{bmatrix}0&0\\0&1\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix},

which has rank 2. More generally,

rank⁡(A+B)≤rank⁡(A)+rank⁡(B),\operatorname{rank}(A+B)\le \operatorname{rank}(A)+\operatorname{rank}(B),

so a sum of two rank-one matrices is usually rank 2. A subspace must be closed under addition, and this set is not.

A concrete subspace: components summing to zero

In R4\mathbb{R}^4, take all vectors satisfying

v1+v2+v3+v4=0.v_1+v_2+v_3+v_4=0.

This is a subspace: addition and scaling preserve the zero sum.

It is exactly the null space of

A=[1111].A=\begin{bmatrix}1&1&1&1\end{bmatrix}.

The rank is 1 and there are n=4n=4 columns, so

dim⁡N(A)=n−r=4−1=3.\dim N(A)=n-r=4-1=3.

A natural basis is the three special solutions:

[−1100],[−1010],[−1001].\begin{bmatrix}-1\\1\\0\\0\end{bmatrix},\quad \begin{bmatrix}-1\\0\\1\\0\end{bmatrix},\quad \begin{bmatrix}-1\\0\\0\\1\end{bmatrix}.

The four fundamental subspaces follow:

SubspaceContentsDimension
Row spaceMultiples of (1,1,1,1)(1,1,1,1)1
Null spaceVectors whose components sum to zero3
Column spaceAll real numbers (a 1×11\times1 matrix)1
Left null spaceOnly the zero vector0

The basis of the left null space is the empty set — a zero-dimensional space contains only the zero vector and needs no basis vectors. This detail is easy to skip but follows directly from the definition.

Graphs: the next stage

The last five minutes introduce graphs. Here a graph is not the plot of a function but a set of nodes and edges.

  • Let every person in the room be a node, with an edge between friends. That is a friendship graph.
  • Let every person in the country be a node. That is a graph with about 260 million nodes.
  • Let every web page be a node and every link an edge. That is the web graph.

The central question: how many steps separate any two people? This is the origin of "six degrees of separation". Strang's own example: he is two steps from a certain politician, and his students are at most three.

The mathematical interest is that a few shortcuts collapse the distances dramatically. The next lecture uses a matrix — the incidence matrix — to translate graph properties into linear algebra, and the four subspaces reappear, this time inside a network.

Takeaways

  • Matrices and functions are vectors whenever addition and scalar multiplication are defined.
  • The space of 3×33\times3 matrices has dimension 9; symmetric and upper triangular spaces each have dimension 6; diagonal has dimension 3.
  • Intersection and sum of subspaces satisfy the dimension identity.
  • Rank-one matrices have the form uv⊤\mathbf{u}\mathbf{v}^\top and build all matrices; the set of rank-one matrices is not a subspace.
  • The subspace of R4\mathbb{R}^4 with component sum zero is the null space of [1,1,1,1][1,1,1,1], of dimension 3.
  • Graphs connect linear algebra to networks and distance.

Check your understanding

1. Why can't a basis of the symmetric matrix space be chosen directly from the standard basis EijE_{ij}?

Reference answer: A standard basis matrix EijE_{ij} with i≠ji\ne j has a single nonzero entry in row ii, column jj; its transpose is Eji≠EijE_{ji}\ne E_{ij}, so it is not symmetric. Among the nine EijE_{ij} only the three diagonal ones E11,E22,E33E_{11},E_{22},E_{33} are symmetric, and they span only the diagonal matrices, of dimension 3, far below dim⁡S=6\dim S=6.

A basis of SS must use combinations such as Eij+EjiE_{ij}+E_{ji}, for example

[010100000]=E12+E21.\begin{bmatrix}0&1&0\\1&0&0\\0&0&0\end{bmatrix}=E_{12}+E_{21}.

Six basis vectors are the three EiiE_{ii} plus the three Eij+EjiE_{ij}+E_{ji} with i<ji<j; they are independent and span SS. The lesson: a basis of the big space is not automatically a basis of a subspace.

2. Is it a coincidence that the upper triangular space has a basis inside the standard basis?

Reference answer: It is a coincidence, or rather a consequence of the special form of the condition. UU is defined by coordinate-wise equations (aij=0a_{ij}=0 when i>ji>j), so each EijE_{ij} with i≤ji\le j already lies in UU, and taking all six of them gives a basis.

Symmetry, by contrast, is an equation between coordinates, aij=ajia_{ij}=a_{ji}, which no single EijE_{ij} satisfies; only combinations do. So "pick from the standard basis" is never a general method. The real test is always: are the vectors inside the subspace, independent, and equal in number to the dimension?

3. Give two rank-one matrices whose sum has rank two, and verify subadditivity of rank.

Reference answer: Take

A=[1000]=[10][10],B=[0001]=[01][01].A=\begin{bmatrix}1&0\\0&0\end{bmatrix}=\begin{bmatrix}1\\0\end{bmatrix}\begin{bmatrix}1&0\end{bmatrix}, \qquad B=\begin{bmatrix}0&0\\0&1\end{bmatrix}=\begin{bmatrix}0\\1\end{bmatrix}\begin{bmatrix}0&1\end{bmatrix}.

Both have rank one (each has a single nonzero column and row direction), while

A+B=[1001]=IA+B=\begin{bmatrix}1&0\\0&1\end{bmatrix}=I

has rank 2. Hence

rank⁡(A+B)=2≤1+1=rank⁡(A)+rank⁡(B),\operatorname{rank}(A+B)=2\le 1+1=\operatorname{rank}(A)+\operatorname{rank}(B),

so subadditivity holds, here with equality. The sum can also be smaller than the bound: with B=−AB=-A, A+B=0A+B=0 has rank 0<20<2. Either way, a sum of rank-one matrices need not have rank one, so the set of rank-one matrices is not closed under addition and is not a subspace.

4. What is a basis of the zero-dimensional space, and why?

Reference answer: The zero-dimensional space contains only the zero vector, and its basis is the empty set ∅\varnothing.

It satisfies both requirements: the span of the empty set is {0}\{\mathbf{0}\} by definition (the empty combination is the zero vector), and it has no nontrivial combination, so it is independent. Conversely, any nonempty set containing the zero vector is dependent (assign coefficient 1 to the zero vector), so no nonempty set can be a basis. This is exactly the left null space of the 1×41\times4 matrix [1,1,1,1][1,1,1,1]: dimension m−r=1−1=0m-r=1-1=0, with the empty set as basis.

5. How would you encode a friendship graph as a matrix?

Reference answer: Use the adjacency matrix AA: rows and columns index people, with aij=1a_{ij}=1 if person ii and person jj are friends and aij=0a_{ij}=0 otherwise, and aii=0a_{ii}=0 by convention. Friendship is undirected, so aij=ajia_{ij}=a_{ji} and AA is symmetric with zero diagonal.

Powers of the adjacency matrix record path counts: (A2)ij(A^2)_{ij} is the number of length-two paths from ii to jj, and (Ak)ij(A^k)_{ij} counts paths of length kk — which is why "six degrees of separation" is a matrix question. Note: the next lecture uses the incidence matrix instead (rows are nodes, columns are edges), where the four subspaces have direct network meanings, such as the null space describing circulations.

How this connects to the course

The previous lecture established the four fundamental subspaces. This one extends "space" to matrices and functions and introduces rank-one decomposition. The next lecture uses matrices to describe graphs: nodes, edges, incidence matrices, and what the four subspaces mean on a network.

来源