MIT Linear Algebra Note Part 1

本段核心内容:

\[Ax=b \]

一些概念

打 OI 的应该很熟悉,略去。

矩阵乘法的性质

TODO:

Gauss Elimination

TODO:

Gauss elimination 得到的矩阵是一个类似上三角的阶梯型,称为 Row echelon form。

不妨将矩阵 \(A\) 的 Row echelon form 记为 \(\text{ref}(A)\)

矩阵 \(A\) 的 Pivot variable 个数称为矩阵 \(A\) 的秩,记为 \(\text{rank}(A)\)

在 Mathematica 中为 MatrixRank 函数。

Gauss–Jordan Elimination

Gauss Elimination 反着往上消。

得到一个 Reduced row echelon form。

不妨将矩阵 \(A\) 的 Reduced row echelon form 记为 \(\text{rref}(A)\)

在 Mathematica 中为 RowReduce 函数。

Transpose

TODO: \(A^T\)

在 Mathematica 中为 Transpose 函数。

Vector Space

严谨定义:Wiki

虽然跟抽代扯上了关系,但是其主要思想为:

  • 对向量加法封闭
  • 对数乘封闭

即若 \(x,y \in V\),它们的 Combination \(ax+by \in V\)

Subspace

\(A\)\(B\) 的子集,且是 Vector Space,则称 \(A\)\(B\) 的 Subspace。

两个 Subspace 的交还是 Subspace。

Column Space

矩阵 \(A\) 的 Column Space 记作 \(C(A)\),表示 \(A\) 的各列的 Combination 组成的 Vector Space。显然属于 Subspace 的一种。

显然 \(Ax=b\) 有解的充要条件是 \(b \in C(A)\)

Null Space

矩阵 \(A\) 的 Null Space 记作 \(N(A)\),表示 \(Ax=0\) 的所有解。显然它是一个 Vector Space,当然属于 Subspace 的一种。

Example

求:

\[N\left(\begin{bmatrix} 1 & 2 & 2 & 2 \\ 2 & 4 & 6 & 8 \\ 3 & 6 & 8 & 10 \\ \end{bmatrix}\right)\]

Solution

注意到给 \(A\) 乘上任何可逆矩阵都不会改变 \(N(A)\)

而给 \(A\) 做 Gauss Elimination 相当于给 \(A\) 乘上一个可逆矩阵,因此不改变 \(N(A)\)

\[\text{ref}(A) = \begin{bmatrix} \boxed{1} & 2 & 2 & 2 \\ & & \boxed{2} & 4 \\ & & & \\ \end{bmatrix}\]

\(x_1,x_3\) 是 Pivot variable,\(x_2,x_4\) 是 Free variable。我们可以任意给 Free variable 赋值,反着接触 Pivot 的值。

因此 \(N(A)\) 是一个 \(m - \text{rank}(A)\) 维空间,我们选取一组 Basis 对其进行表示。

为了方便,不妨选取 \(x_2=1, x_4=0\)\(x_2=0, x_4=1\) 的解。计算可得:

\[x = c_1 \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix} + c_2 \begin{bmatrix} 2 \\ 0 \\ -2 \\ 1 \end{bmatrix}, \text{where } c_1,c_2 \in \mathbb R \]

\(Ax=0\) 的通解,即 \(N(A)\) 的所有元素。

特别地,\(A\) 满秩时,\(N(A)\) 仅含有零向量。

\(Ax=b\)

Examle

Solve the system of equations

\[\begin{bmatrix} 1 & 2 & 2 & 2 \\ 2 & 4 & 6 & 8 \\ 3 & 6 & 8 & 10 \\ \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} =\begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix}\]

Solution

令 Augmented Matrix 为 \(\begin{bmatrix} A & b \end{bmatrix}\)

\(\text{ref}\) 的过程让 \(b\) 也跟着做一遍:

\[\begin{bmatrix} \boxed{1} & 2 & 2 & 2 & b_1 \\ & & \boxed{2} & 4 & b_2 - 2 b_1 \\ & & & & b_3 - b_2 - b_1 \\ \end{bmatrix}\]

根据最下面一行可知,\(b_3 - b_2 - b_1 = 0\) 是方程有解的充要条件。接下来仅讨论方程有解的情况。

为了方便,令所有 Free variables 为 \(0\) 解出一个 Particular Solution \(x^*\)

在此例中:

\[x^* = \begin{bmatrix} -2 \\ 0 \\ \frac 3 2 \\ 0 \end{bmatrix} \]

而解集为 \(x^* + N(A)\)。在此例中:

\[x = \begin{bmatrix} -2 \\ 0 \\ \frac 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} \]

这种"特解 + 通解"的 Pattern 是非常重要的。

Summary

对于一个 \(n\)\(m\) 列矩阵 \(A\):(令 \(\text{rank}(A) = r\)\(\text{rref}(A) = R\)

  • 最重要的:\(r=n=m\) 满秩方阵
    • \(R=I\)
    • 唯一解
  • \(r=m<n\) 方程多,未知数少
    • \(R=\begin{bmatrix} I \\ 0 \end{bmatrix}\)
    • 无解 / 唯一解
  • \(r=n<m\) 方程少,未知数多
    • 不严谨的记法:\(R=\begin{bmatrix} I & F \end{bmatrix}\)(因为 Pivot column 不一定都在最左边)
    • 无穷多解
  • \(r<n, r<m\)
    • 不严谨的记法:\(R=\begin{bmatrix} I & F \\ 0 & 0 \end{bmatrix}\)
    • 无解 / 无穷多解
posted @ 2025-01-20 18:43  August_Light  阅读(33)  评论(0)    收藏  举报