第 08 章

解 Ax = b:特解加零空间,以及秩决定一切

先把增广矩阵消元,零行给出可解条件;再令自由变量为零求出一个特解,加上零空间的全部向量就是通解。秩 r 与 m、n 的关系决定了解的个数。

Solving Ax = b: Particular Solution Plus Nullspace, and What Rank Decides

Eliminate the augmented matrix; zero rows give the solvability condition. Set free variables to zero for a particular solution, then add the nullspace. The relation between r, m, and n fixes the number of solutions.

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

这一讲要彻底解决 Ax=bA\mathbf{x}=\mathbf{b}

完整流程只有三步:

  1. 用消元判断是否有解;
  2. 若有解,求一个特解;
  3. 加上零空间,得到全部解。

这套结构会贯穿整门课,因为所有线性方程的解集都是「一个特解 + 零空间」。

时间轴

时间内容
1:35可解条件:b1,b2,b3b_1,b_2,b_3 的关系
3:20增广矩阵
6:16消元后的右端
7:52求特解
12:44哪些是自由变量
14:16回代得到特解
15:42求全部解
17:17特解加零空间
21:14解集的几何图像
22:16解集不是子空间
24:57一般情形:m×nm\times n、秩 rr
26:14主元数不超过 nn
27:35满列秩:00 或 11 个解
28:33满行秩:无穷多解
31:06秩为 11 的例子
35:42每行都有主元
37:00自由变量的个数
41:54可解条件
45:53无穷多解的原因

例子:沿用上一讲的矩阵

A=[1222246836810],b=[b1b2b3].A= \begin{bmatrix} 1&2&2&2\\ 2&4&6&8\\ 3&6&8&10 \end{bmatrix}, \qquad \mathbf{b}=\begin{bmatrix}b_1\\b_2\\b_3\end{bmatrix}.

第三行是第一行与第二行之和。对左端做「第一行 + 第二行」得到第三行,所以对右端做同样的组合,必须得到 00:

b1+b2−b3=0.b_1+b_2-b_3=0.

这就是可解条件。下面看消元如何自动发现它。

增广矩阵与消元

[1222b12468b236810b3].\left[\begin{array}{cccc|c} 1&2&2&2&b_1\\ 2&4&6&8&b_2\\ 3&6&8&10&b_3 \end{array}\right].

第一步:R2←R2−2R1R_2\leftarrow R_2-2R_1,R3←R3−3R1R_3\leftarrow R_3-3R_1:

[1222b10024b2−2b10024b3−3b1].\left[\begin{array}{cccc|c} 1&2&2&2&b_1\\ 0&0&2&4&b_2-2b_1\\ 0&0&2&4&b_3-3b_1 \end{array}\right].

第二步:R3←R3−R2R_3\leftarrow R_3-R_2:

[1222b10024b2−2b10000b3−b2−b1].\left[\begin{array}{cccc|c} 1&2&2&2&b_1\\ 0&0&2&4&b_2-2b_1\\ 0&0&0&0&b_3-b_2-b_1 \end{array}\right].

最后一行是

0=b3−b2−b1.0=b_3-b_2-b_1.

这正是上面猜到的条件。

一句话总结: 如果左端行的某个组合得到零行,右端同一组合就必须得到零,否则方程组无解。

取一个满足条件的 b\mathbf{b}

取 b=(1,5,6)\mathbf{b}=(1,5,6),因为 1+5=61+5=6。消元后右端变成

(b1, b2−2b1, b3−b2−b1)=(1, 3, 0).\Big(b_1,\ b_2-2b_1,\ b_3-b_2-b_1\Big)=(1,\ 3,\ 0).

方程组化为

x1+2x2+2x3+2x4=1,2x3+4x4=3.\begin{aligned} x_1+2x_2+2x_3+2x_4 &= 1,\\ 2x_3+4x_4 &= 3. \end{aligned}

特解:自由变量全部取零

主元列是第 1、3 列,自由变量是 x2,x4x_2,x_4。令

x2=0,x4=0.x_2=0,\qquad x_4=0.

剩下的方程是

x1+2x3=1,2x3=3.\begin{aligned} x_1+2x_3 &= 1,\\ 2x_3 &= 3. \end{aligned}

回代:

x3=32,x1=1−2⋅32=−2.x_3=\frac{3}{2},\qquad x_1=1-2\cdot\frac{3}{2}=-2.

所以一个特解是

xp=[−203/20].\mathbf{x}_p= \begin{bmatrix} -2\\ 0\\ 3/2\\ 0 \end{bmatrix}.

代回原方程可验证 Axp=bA\mathbf{x}_p=\mathbf{b}。「自由变量取零」只是为了方便;任何满足方程的解都可以当特解。

通解:特解 + 零空间

上一讲求出零空间的两个特殊解:

s1=[−2100],s2=[20−21].\mathbf{s}_1=\begin{bmatrix}-2\\1\\0\\0\end{bmatrix}, \qquad \mathbf{s}_2=\begin{bmatrix}2\\0\\-2\\1\end{bmatrix}.

于是全部解是

x=xp+c1s1+c2s2=[−203/20]+c1[−2100]+c2[20−21].\mathbf{x}= \mathbf{x}_p+c_1\mathbf{s}_1+c_2\mathbf{s}_2 = \begin{bmatrix}-2\\0\\3/2\\0\end{bmatrix} +c_1\begin{bmatrix}-2\\1\\0\\0\end{bmatrix} +c_2\begin{bmatrix}2\\0\\-2\\1\end{bmatrix}.

为什么可以这样加

A(xp+xn)=Axp+Axn=b+0=b.A(\mathbf{x}_p+\mathbf{x}_n)=A\mathbf{x}_p+A\mathbf{x}_n=\mathbf{b}+\mathbf{0}=\mathbf{b}.

所以零空间里的任何向量加到特解上,仍然是解。反过来,若 x\mathbf{x} 与 xp\mathbf{x}_p 都是解,则

A(x−xp)=b−b=0,A(\mathbf{x}-\mathbf{x}_p)=\mathbf{b}-\mathbf{b}=\mathbf{0},

所以 x−xp\mathbf{x}-\mathbf{x}_p 在零空间里。通解就是特解加上零空间,没有别的。

几何图像

  • 零空间是 R4R^4 中一个过原点的二维子空间;
  • 解集是把这个平面平移到经过 xp\mathbf{x}_p。

所以解集是一个不过原点的平面,不是子空间。这也解释了为什么 Ax=bA\mathbf{x}=\mathbf{b}(b≠0\mathbf{b}\neq\mathbf{0})的解集不能是向量空间:它不含零向量。

秩决定解的个数

设 AA 是 m×nm\times n,秩为 rr。永远有

r≤m,r≤n.r\le m,\qquad r\le n.

秩等于主元个数,也等于主元列数。自由变量个数是 n−rn-r。

情况一:满列秩 r=nr=n

每一列都有主元,没有自由变量:

N(A)={0}.N(A)=\{\mathbf{0}\}.

所以若 Ax=bA\mathbf{x}=\mathbf{b} 有解,解唯一;否则无解。解的个数是 0 或 1。

例子(高瘦矩阵):

A=[13216151],r=2=n.A= \begin{bmatrix} 1&3\\ 2&1\\ 6&1\\ 5&1 \end{bmatrix}, \qquad r=2=n.

两列独立,最简行阶梯形是

R=[10010000]=[I0].R= \begin{bmatrix} 1&0\\ 0&1\\ 0&0\\ 0&0 \end{bmatrix} =\begin{bmatrix}I\\0\end{bmatrix}.

四个方程、两个未知数,所以并不是每个 b\mathbf{b} 都有解。取 b=[4,3,7,6]T\mathbf{b}=[4,3,7,6]^T(两列之和),唯一解是 (1,1)(1,1)。

情况二:满行秩 r=mr=m

每一行都有主元,消元不会产生零行,因此对任意 b\mathbf{b} 都有解。

自由变量有 n−r=n−mn-r=n-m 个,所以:

  • 若 n>mn>m,解有无穷多个;
  • 若 n=mn=m,退化为情况三。

例子:把上面的矩阵转置,

AT=[12653111],r=2=m<n=4.A^T= \begin{bmatrix} 1&2&6&5\\ 3&1&1&1 \end{bmatrix}, \qquad r=2=m<n=4.

最简行阶梯形是 [IF]\begin{bmatrix}I&F\end{bmatrix},有两个自由变量,解总是无穷多。

情况三:满秩方阵 r=m=nr=m=n

此时 R=IR=I,矩阵可逆:

  • 零空间只有零向量;
  • 对每个 b\mathbf{b} 都有唯一解。

例子:

A=[1231],det⁡A=1−6=−5≠0.A=\begin{bmatrix}1&2\\3&1\end{bmatrix}, \qquad \det A=1-6=-5\neq 0.

对任意 b\mathbf{b},解唯一。

情况四:一般情形 r<mr<m 且 r<nr<n

既可能有零行(限制 b\mathbf{b}),又有自由变量(解不唯一)。因此解的个数是0 或无穷多,绝不会恰好一个。

汇总表

秩的条件最简行阶梯形解的个数
r=m=nr=m=nII恰好 1 个
r=n<mr=n<m[I0]\begin{bmatrix}I\\0\end{bmatrix}0 或 1 个
r=m<nr=m<n[IF]\begin{bmatrix}I&F\end{bmatrix}无穷多个
r<m, r<nr<m,\ r<n[IF00]\begin{bmatrix}I&F\\0&0\end{bmatrix}0 或无穷多个

一句总结:秩告诉你解的结构,矩阵的具体元素只告诉你解的具体数值。

本讲结论

  • 可解条件:消元后的零行对应的右端也必须为零;等价地,b∈C(A)\mathbf{b}\in C(A)。
  • 特解:令所有自由变量为 00,回代求主元变量。
  • 通解:x=xp+xn\mathbf{x}=\mathbf{x}_p+\mathbf{x}_n,其中 xn\mathbf{x}_n 取遍零空间。
  • 解集是零空间的一次平移,不过原点,因此不是子空间。
  • 满列秩:0 或 1 个解;满行秩:总是无穷多解;满秩方阵:恰好 1 个解;一般情形:0 或无穷多。

理解检验

1. 对 b=(1,5,6)\mathbf{b}=(1,5,6),验证消元后的右端是 (1,3,0)(1,3,0),并求特解。

参考答案:消元两步对右端的作用是 b2←b2−2b1=5−2=3b_2\leftarrow b_2-2b_1=5-2=3,b3←b3−b2−b1=6−5−1=0b_3\leftarrow b_3-b_2-b_1=6-5-1=0,所以右端变为 (1,3,0)(1,3,0)。对应的方程组是

x1+2x2+2x3+2x4=1,2x3+4x4=3.x_1+2x_2+2x_3+2x_4=1,\qquad 2x_3+4x_4=3 .

令自由变量 x2=x4=0x_2=x_4=0,由第二式 x3=3/2x_3=3/2,代回第一式 x1=1−2⋅32=−2x_1=1-2\cdot\frac32=-2。特解为 xp=(−2,0,3/2,0)T\mathbf{x}_p=(-2,0,3/2,0)^T。

2. 为什么「特解 + 零空间」覆盖了全部解?给出两个方向的论证。

参考答案:设 xp\mathbf{x}_p 是任一特解。 方向一(充分性):对任意 xn∈N(A)\mathbf{x}_n\in N(A),

A(xp+xn)=Axp+Axn=b+0=b,A(\mathbf{x}_p+\mathbf{x}_n)=A\mathbf{x}_p+A\mathbf{x}_n=\mathbf{b}+\mathbf{0}=\mathbf{b},

所以每个 xp+xn\mathbf{x}_p+\mathbf{x}_n 都是解。 方向二(必要性):若 x\mathbf{x} 也是解,则

A(x−xp)=Ax−Axp=b−b=0,A(\mathbf{x}-\mathbf{x}_p)=A\mathbf{x}-A\mathbf{x}_p=\mathbf{b}-\mathbf{b}=\mathbf{0},

即 x−xp∈N(A)\mathbf{x}-\mathbf{x}_p\in N(A),也就是 x=xp+xn\mathbf{x}=\mathbf{x}_p+\mathbf{x}_n。两个方向合起来说明解集恰为 xp+N(A)\mathbf{x}_p+N(A),没有遗漏。

3. 一个 4×24\times2 矩阵可能有几个解?取决于什么?

参考答案:m=4>n=2m=4>n=2,所以 r≤2<nr\le 2<n 或 r=n=2r=n=2。若 r=2r=2(满列秩),没有自由变量,N(A)={0}N(A)=\{\mathbf{0}\},但四个方程可能矛盾,因此解的个数是 00 或 11。若 r<2r<2,消元会出现零行,可能因右端条件不满足而无解;一旦有解,自由变量个数 n−r≥1n-r\ge1,解有无穷多个。所以可能的结果是 00、11 或无穷多——具体取决于秩 rr 以及 b\mathbf{b} 是否落在列空间 C(A)C(A) 中。

4. 一个 2×42\times4 矩阵可能无解吗?为什么?

参考答案:可能,但只在 r<m=2r<m=2 时。此时消元会出现零行,右端必须满足相应的相容条件,否则无解。反例:

A=[10001000],b=[12].A=\begin{bmatrix}1&0&0&0\\1&0&0&0\end{bmatrix},\qquad \mathbf{b}=\begin{bmatrix}1\\2\end{bmatrix}.

两行相同而右端不同,显然无解。若 r=m=2r=m=2(满行秩),每行都有主元、没有零行,则对任意 b\mathbf{b} 都有解,且因 n−r=2n-r=2 有两个自由变量,解总是无穷多。

5. 用秩的条件解释:为什么可逆方阵对每个 b\mathbf{b} 都有唯一解?

参考答案:可逆方阵满足 r=m=nr=m=n。r=mr=m 意味着消元不产生零行,所以任何 b\mathbf{b} 都不会触发矛盾,必有解;r=nr=n 意味着没有自由变量,零空间只有零向量,所以解唯一。两者合起来:对每个 b\mathbf{b} 恰有一个解 x=A−1b\mathbf{x}=A^{-1}\mathbf{b}。

与前后课的关系

这一讲完成了线性方程组的完整理论。下一讲转向线性无关、基与维数,把「秩」「自由变量」「零空间维数」这些计数问题统一起来。

The complete theory of Ax=bA\mathbf{x}=\mathbf{b}

Three steps:

  1. use elimination to decide whether a solution exists;
  2. if it does, find one particular solution;
  3. add the nullspace to get all solutions.

This structure recurs throughout the course, because every linear solution set is "one particular solution plus a nullspace".

Timeline

TimeTopic
1:35The condition on b\mathbf{b} for solvability
3:20The augmented matrix
6:16The right-hand side after elimination
7:52Finding a particular solution
12:44Identifying the free variables
14:16Back substitution gives the particular solution
15:42Finding all solutions
17:17Particular plus null space
21:14Plotting the solution set
22:16The solution set is not a subspace
24:57An m×nm\times n matrix of rank rr
26:14At most nn pivots
27:35Full column rank: zero or one solution
28:33Full row rank: infinitely many solutions
31:06An example of rank one
35:42Every row has a pivot
37:00Counting free variables
41:54The solvability condition
45:53Why the solution is always infinite

The example: same matrix as last time

A=[1222246836810],b=[b1b2b3].A= \begin{bmatrix} 1&2&2&2\\ 2&4&6&8\\ 3&6&8&10 \end{bmatrix}, \qquad \mathbf{b}=\begin{bmatrix}b_1\\b_2\\b_3\end{bmatrix}.

Row three is the sum of rows one and two. Applying "row one + row two" to the left side gives row three, so the same combination of the right side must give zero:

b1+b2−b3=0.b_1+b_2-b_3=0.

That is the solvability condition. Elimination should discover it.

Augmented matrix and elimination

[1222b12468b236810b3].\left[\begin{array}{cccc|c} 1&2&2&2&b_1\\ 2&4&6&8&b_2\\ 3&6&8&10&b_3 \end{array}\right].

Step one: R2←R2−2R1R_2\leftarrow R_2-2R_1, R3←R3−3R1R_3\leftarrow R_3-3R_1:

[1222b10024b2−2b10024b3−3b1].\left[\begin{array}{cccc|c} 1&2&2&2&b_1\\ 0&0&2&4&b_2-2b_1\\ 0&0&2&4&b_3-3b_1 \end{array}\right].

Step two: R3←R3−R2R_3\leftarrow R_3-R_2:

[1222b10024b2−2b10000b3−b2−b1].\left[\begin{array}{cccc|c} 1&2&2&2&b_1\\ 0&0&2&4&b_2-2b_1\\ 0&0&0&0&b_3-b_2-b_1 \end{array}\right].

The last row reads

0=b3−b2−b1.0=b_3-b_2-b_1.

Exactly the predicted condition.

One-sentence summary: If a combination of the left-hand rows gives a zero row, the same combination of the right-hand side must give zero, or there is no solution.

Choose a b\mathbf{b} that satisfies it

Take b=(1,5,6)\mathbf{b}=(1,5,6), since 1+5=61+5=6. Elimination turns the right side into

(b1, b2−2b1, b3−b2−b1)=(1, 3, 0).\Big(b_1,\ b_2-2b_1,\ b_3-b_2-b_1\Big)=(1,\ 3,\ 0).

The system reduces to

x1+2x2+2x3+2x4=1,2x3+4x4=3.\begin{aligned} x_1+2x_2+2x_3+2x_4 &= 1,\\ 2x_3+4x_4 &= 3. \end{aligned}

Particular solution: set all free variables to zero

Pivots are in columns 1 and 3, so the free variables are x2,x4x_2,x_4. Set

x2=0,x4=0.x_2=0,\qquad x_4=0.

The remaining equations are

x1+2x3=1,2x3=3.\begin{aligned} x_1+2x_3 &= 1,\\ 2x_3 &= 3. \end{aligned}

Back-substitute:

x3=32,x1=1−2⋅32=−2.x_3=\frac{3}{2},\qquad x_1=1-2\cdot\frac{3}{2}=-2.

So a particular solution is

xp=[−203/20].\mathbf{x}_p= \begin{bmatrix} -2\\ 0\\ 3/2\\ 0 \end{bmatrix}.

Substitute into the original system to verify Axp=bA\mathbf{x}_p=\mathbf{b}. Setting free variables to zero is only a convenience; any solution can serve as the particular one.

General solution: particular plus nullspace

From the previous lecture, two special nullspace vectors are

s1=[−2100],s2=[20−21].\mathbf{s}_1=\begin{bmatrix}-2\\1\\0\\0\end{bmatrix}, \qquad \mathbf{s}_2=\begin{bmatrix}2\\0\\-2\\1\end{bmatrix}.

All solutions are

x=xp+c1s1+c2s2=[−203/20]+c1[−2100]+c2[20−21].\mathbf{x}= \mathbf{x}_p+c_1\mathbf{s}_1+c_2\mathbf{s}_2 = \begin{bmatrix}-2\\0\\3/2\\0\end{bmatrix} +c_1\begin{bmatrix}-2\\1\\0\\0\end{bmatrix} +c_2\begin{bmatrix}2\\0\\-2\\1\end{bmatrix}.

Why adding is valid

A(xp+xn)=Axp+Axn=b+0=b.A(\mathbf{x}_p+\mathbf{x}_n)=A\mathbf{x}_p+A\mathbf{x}_n=\mathbf{b}+\mathbf{0}=\mathbf{b}.

Conversely, if x\mathbf{x} and xp\mathbf{x}_p are both solutions, then

A(x−xp)=b−b=0,A(\mathbf{x}-\mathbf{x}_p)=\mathbf{b}-\mathbf{b}=\mathbf{0},

so x−xp\mathbf{x}-\mathbf{x}_p lies in the nullspace. The general solution is the particular solution plus the nullspace, and nothing else.

The geometry

  • The nullspace is a two-dimensional subspace of R4R^4 through the origin;
  • the solution set is that plane translated so it passes through xp\mathbf{x}_p.

So the solution set is a plane not through the origin, hence not a subspace. This is why the solution set of Ax=bA\mathbf{x}=\mathbf{b} with b≠0\mathbf{b}\neq\mathbf{0} cannot be a vector space: it does not contain zero.

Rank decides the number of solutions

Let AA be m×nm\times n with rank rr. Always

r≤m,r≤n.r\le m,\qquad r\le n.

Rank is the number of pivots and the number of pivot columns. The number of free variables is n−rn-r.

Case 1: full column rank r=nr=n

Every column has a pivot, so there are no free variables:

N(A)={0}.N(A)=\{\mathbf{0}\}.

If Ax=bA\mathbf{x}=\mathbf{b} has a solution, it is unique; otherwise there is none. Zero or one solution.

Example (tall and thin):

A=[13216151],r=2=n.A= \begin{bmatrix} 1&3\\ 2&1\\ 6&1\\ 5&1 \end{bmatrix}, \qquad r=2=n.

The two columns are independent, and the reduced form is

R=[10010000]=[I0].R= \begin{bmatrix} 1&0\\ 0&1\\ 0&0\\ 0&0 \end{bmatrix} =\begin{bmatrix}I\\0\end{bmatrix}.

Four equations, two unknowns, so not every b\mathbf{b} is solvable. With b=[4,3,7,6]T\mathbf{b}=[4,3,7,6]^T (the sum of the columns), the unique solution is (1,1)(1,1).

Case 2: full row rank r=mr=m

Every row has a pivot, so elimination produces no zero rows, and every b\mathbf{b} is solvable.

There are n−r=n−mn-r=n-m free variables, so:

  • if n>mn>m, there are infinitely many solutions;
  • if n=mn=m, this reduces to case 3.

Example: transpose the matrix above,

AT=[12653111],r=2=m<n=4.A^T= \begin{bmatrix} 1&2&6&5\\ 3&1&1&1 \end{bmatrix}, \qquad r=2=m<n=4.

The reduced form is [IF]\begin{bmatrix}I&F\end{bmatrix}; two free variables, always infinitely many solutions.

Case 3: full rank square r=m=nr=m=n

Now R=IR=I and the matrix is invertible:

  • the nullspace contains only zero;
  • every b\mathbf{b} has exactly one solution.

Example:

A=[1231],det⁡A=1−6=−5≠0.A=\begin{bmatrix}1&2\\3&1\end{bmatrix}, \qquad \det A=1-6=-5\neq 0.

For any b\mathbf{b}, the solution is unique.

Case 4: general r<mr<m and r<nr<n

There can be zero rows (restricting b\mathbf{b}) and free variables (solutions not unique). So the count is zero or infinitely many, never exactly one.

Summary table

Rank conditionReduced formNumber of solutions
r=m=nr=m=nIIexactly one
r=n<mr=n<m[I0]\begin{bmatrix}I\\0\end{bmatrix}zero or one
r=m<nr=m<n[IF]\begin{bmatrix}I&F\end{bmatrix}infinitely many
r<m, r<nr<m,\ r<n[IF00]\begin{bmatrix}I&F\\0&0\end{bmatrix}zero or infinitely many

One sentence: rank tells you the structure of the solution set; the actual entries only tell you the numbers.

Takeaways

  • Solvability: each zero row in the reduced form must have a zero on the right; equivalently, b∈C(A)\mathbf{b}\in C(A).
  • Particular solution: set all free variables to zero and back-substitute.
  • General solution: x=xp+xn\mathbf{x}=\mathbf{x}_p+\mathbf{x}_n, with xn\mathbf{x}_n ranging over the nullspace.
  • The solution set is a translate of the nullspace; it misses the origin, so it is not a subspace.
  • Full column rank: zero or one. Full row rank: always infinitely many. Full square rank: exactly one. General: zero or infinitely many.

Check your understanding

1. For b=(1,5,6)\mathbf{b}=(1,5,6), verify that elimination produces (1,3,0)(1,3,0) and find the particular solution.

Reference answer: Elimination acts on the right-hand side as b2←b2−2b1=5−2=3b_2\leftarrow b_2-2b_1=5-2=3 and b3←b3−b2−b1=6−5−1=0b_3\leftarrow b_3-b_2-b_1=6-5-1=0, so the right side becomes (1,3,0)(1,3,0). The system is

x1+2x2+2x3+2x4=1,2x3+4x4=3.x_1+2x_2+2x_3+2x_4=1,\qquad 2x_3+4x_4=3 .

Set the free variables x2=x4=0x_2=x_4=0. The second equation gives x3=3/2x_3=3/2; back-substitution gives x1=1−2⋅32=−2x_1=1-2\cdot\frac32=-2. So xp=(−2,0,3/2,0)T\mathbf{x}_p=(-2,0,3/2,0)^T.

2. Why does "particular plus nullspace" cover every solution? Prove both directions.

Reference answer: Let xp\mathbf{x}_p be any particular solution. Sufficiency: for any xn∈N(A)\mathbf{x}_n\in N(A),

A(xp+xn)=Axp+Axn=b+0=b,A(\mathbf{x}_p+\mathbf{x}_n)=A\mathbf{x}_p+A\mathbf{x}_n=\mathbf{b}+\mathbf{0}=\mathbf{b},

so every xp+xn\mathbf{x}_p+\mathbf{x}_n is a solution. Necessity: if x\mathbf{x} is also a solution, then

A(x−xp)=Ax−Axp=b−b=0,A(\mathbf{x}-\mathbf{x}_p)=A\mathbf{x}-A\mathbf{x}_p=\mathbf{b}-\mathbf{b}=\mathbf{0},

so x−xp∈N(A)\mathbf{x}-\mathbf{x}_p\in N(A), i.e. x=xp+xn\mathbf{x}=\mathbf{x}_p+\mathbf{x}_n. Together the two directions show the solution set is exactly xp+N(A)\mathbf{x}_p+N(A), with nothing missing.

3. How many solutions can a 4×24\times2 matrix have? What does it depend on?

Reference answer: Here m=4>n=2m=4>n=2, so either r=n=2r=n=2 or r<2r<2. If r=2r=2 (full column rank) there are no free variables and N(A)={0}N(A)=\{\mathbf{0}\}, but four equations may still contradict each other, so the count is 00 or 11. If r<2r<2, elimination produces a zero row, which may make the system inconsistent; once it is consistent, the number of free variables is n−r≥1n-r\ge1, so there are infinitely many solutions. Hence the possibilities are 00, 11, or infinitely many — determined by the rank rr and by whether b\mathbf{b} lies in the column space C(A)C(A).

4. Can a 2×42\times4 matrix be unsolvable? Why or why not?

Reference answer: Yes, but only when r<m=2r<m=2. Then elimination creates a zero row, and the right-hand side must satisfy the corresponding compatibility condition. Counterexample:

A=[10001000],b=[12].A=\begin{bmatrix}1&0&0&0\\1&0&0&0\end{bmatrix},\qquad \mathbf{b}=\begin{bmatrix}1\\2\end{bmatrix}.

The two rows coincide while the right-hand entries differ, so there is no solution. If r=m=2r=m=2 (full row rank), every row has a pivot and no zero row appears, so every b\mathbf{b} is solvable; and since n−r=2n-r=2 there are two free variables, so the solution is always infinite.

5. Use the rank conditions to explain why an invertible square matrix has a unique solution for every b\mathbf{b}.

Reference answer: An invertible square matrix has r=m=nr=m=n. The condition r=mr=m means elimination produces no zero row, so no b\mathbf{b} can create a contradiction — a solution always exists. The condition r=nr=n means there are no free variables and the nullspace is trivial, so the solution is unique. Together: exactly one solution for every b\mathbf{b}, namely x=A−1b\mathbf{x}=A^{-1}\mathbf{b}.

How it connects

This lecture completes the theory of linear systems. The next turns to linear independence, bases, and dimension, unifying the counting questions around rank, free variables, and nullspace dimension.

来源