# 列運算

This work by Jephian Lin is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
{%hackmd 5xqeIJ7VRCGBfLtfMi0_IQ %}
```python
from lingeo import random_int_list, random_good_matrix
```
## Main idea
Let $A$ be an $m\times n$ matrix $\mathbb{R}^n$.
The following three types of operations on a matrix are called **row operations**.
1. swapping: swap the $i$-th and the $j$-th rows. (Denoted as $\rho_i\leftrightarrow\rho_j$.)
2. rescaling: multiply the $i$-th row by a nonzero scalar $k$. (Denoted as $\rho_i:\times k$.)
3. row combination: multiply the $j$-th row by a scalar $k$ and add the result to the $i$-th row. (Denoted as $\rho_i: + k\rho_j$.)
Note that for $\rho_i: +k\rho_j$, the scalar $k$ can possibly be zero, but then the operation does nothing.
The **pivot** of a row vector is the index of its left-most entry.
A matrix $A$ is in the **echelon form** if:
1. Zero rows are below any nonzero rows.
2. From top to the bottom, the pivot of each row strickly moving to the right.
Each matrix can be reduced to an echelon from through row operations.
If necessary, one may do reduce the matrix further to the form below.
A matrix $A$ is in the **reduced echelon form** if:
1. It is in the echelon form.
2. For each nonzero row, the entry at the pivot is $1$.
3. For each nonzero row, the column of $A$ at the pivot is zero except for the entry on this row.
The **pivots** of a reduced echelon form is the set of pivots of its rows.
The **pivots** of a matrix is the pivots of its reduced echelon form.
If $B$ can be obtained from $A$ by some row reduction, then we say $A$ **reduces to** $B$, denoted as $A\rightarrow B$.
Each matrix reduces to a unique reduced echelon form.
Let $A$ be an $m\times n$ matrix and ${\bf b}$ a vector in $\mathbb{R}^m$.
Then the **augmenting matrix** of the equation $A{\bf x} = {\bf b}$ is the $m\times (n+1)$ matrix
$$\left[\begin{array}{c|c} A & {\bf b} \end{array}\right].
$$
## Side stories
- `A.nullspace`
- `A.swap_rows`
- `A.rescale_row`
- `A.add_muptiple_of_row`
- equivalence relation
- equivalence clases
## Experiments
##### Exercise 1
執行下方程式碼。
找到矩陣 $A$ 的最簡階梯形式矩陣。
可以手算也可以考慮在下方程式碼加上:
1. $\rho_i\leftrightarrow\rho_j$: `A.swap_rows(i,j)` .
2. $\rho_i: \times k$: `A.rescale_row(i, k)` .
3. $\rho_i: +k\rho_j$: `A.add_multiple_of_row(i, j, k)` .
```python
### code
set_random_seed(0)
print_ans = 0
A, R, pivots = random_good_matrix(3,5,2, return_answer=True)
print("A =")
show(A)
# A.swap_rows(0,1)
# A.rescale_row(1, 1/3)
# A.add_multiple_of_row(1, 0, -3)
print("After row operations:")
#answer
A.add_multiple_of_row(1, 0, -3)
A.add_multiple_of_row(2, 0, 8)
A.add_multiple_of_row(2, 1, 4)
A.add_multiple_of_row(0, 1, 3)
show(A)
if print_ans:
print("The reduced echelon form of A is")
show(R)
```
:::warning
- [x] 挑一題把題目的數字記下來,然後留下計算過程。
:::
藉由 `seed = 0` 得到
$$A = \begin{bmatrix} 1 & 3 & -18 & 5 & 14 \\
3 & -8 & 49 & 15 & -39 \\
-8 & 20 & -124 & 40 & 100 \end{bmatrix}.
$$
令各列分別為 $\rho_1 , \rho_2 , \rho_3$,
則利用列運算 $\rho_2: + (-3)\rho_1$,$\rho_3: + 8\rho_1$ 可以得到
$$\begin{bmatrix} 1 & 3 & -18 & 5 & 14 \\
0 & 1 & -5 & 0 & 3 \\
0 & -4 & 20 & 0 & -12 \end{bmatrix},
$$
再使用列運算 $\rho_3: + 4\rho_2$,$\rho_1: + 3\rho_2$,得到
$$\begin{bmatrix} 1 & 0 & -3 & 5 & 5 \\
0 & 1 & -5 & 0 & 3 \\
0 & 0 & 0 & 0 & 0 \end{bmatrix},
$$
此為 $A$ 之最簡階梯式。
## Exercises
##### Exercise 2
證明每一個列運算都可以被復原。
##### Exercise 2(a)
若 $A$ 經過列運算 $\rho_i\leftrightarrow\rho_j$ 後得到 $B$。
找一個列運算讓 $B$ 變回 $A$。
$Ans:$
$B$ 經過列運算 $\rho_j\leftrightarrow\rho_i$ 後可得到 $A$。
##### Exercise 2(b)
若 $A$ 經過列運算 $\rho_i: \times k$ 後得到 $B$。
找一個列運算讓 $B$ 變回 $A$。
$Ans:$
$B$ 經過列運算 $\rho_i: \times \frac{1}{k}$ 後得到 $A$。
##### Exercise 2(c)
若 $A$ 經過列運算 $\rho_i: + k\rho_j$ 後得到 $B$。
找一個列運算讓 $B$ 變回 $A$。
$Ans:$
$B$ 經過列運算 $\rho_i: +(-k)\rho_j$ 後得到 $A$。
##### Exercise 3
令 $A$ 為一矩陣其各列向量為 ${\bf r}_1,\ldots,{\bf r}_m$。
依照下面的步驟證明列運算不會改變列空間。
##### Exercise 3(a)
若 $A$ 經過列運算 $\rho_i\leftrightarrow\rho_j$ 後得到 $B$。
證明 $\operatorname{Row}(A) = \operatorname{Row}(B)$。
:::warning
- [x] 由於 $\Row(A)$ 和 $\Row(B)$ 均由 ...,所以 $\Row(A) = ...$ 句點
:::
$Ans:$
$\operatorname{Row}(A)$ 可表示為 $c_1{\bf r}_1+\ldots+c_i{\bf r}_i+\ldots+c_j{\bf r}_j+\ldots+ c_m{\bf r}_m$,
而 $\operatorname{Row}(B)$ 可表示成 $c_1{\bf r}_1+\ldots+ c_j{\bf r}_j+\ldots+c_i{\bf r}_i+\ldots+c_m{\bf r}_m$。
因為 $\operatorname{Row}(A)$ 和 $\operatorname{Row}(B)$ 均由 ${\bf r}_1,\ldots,{\bf r}_m$ 組成,所以$\Row(A) = \vspan({\bf r}_1,\ldots,{\bf r}_m)=\Row(B)$。
##### Exercise 3(b)
若 $A$ 經過列運算 $\rho_i: \times k$ 後得到 $B$。
證明 $\operatorname{Row}(A) = \operatorname{Row}(B)$。
:::warning
- [x] 用元素關係來證明兩集合相等:若 $x\in A\implies x\in B$,則 $A\subseteq B$。3(c) 也是
- [x] 係數不要粗體
:::
$Ans:$
$\operatorname{Row}(A)$ 可表示為 $c_1{\bf r}_1+\ldots+c_i{\bf r}_i+\ldots+c_j{\bf r}_j+\ldots+c_m{\bf r}_m$,而 $\operatorname{Row}(B)$ 可表示成 $c_1{\bf r}_1+\ldots+kc_i{\bf r}_i+\ldots+c_m{\bf r}_m$,
$\operatorname{Row}(A)$ 和 $\operatorname{Row}(B)$ 均由 ${\bf r}_1,\ldots,{\bf r}_m$ 組成,等於 $\vspan({\bf r}_1,\ldots,{\bf r}_m)$,所以$\Row(A) = \vspan({\bf r}_1,\ldots,{\bf r}_m)=\Row(B)$。
Sample:
若 $\bx \in \Row(A)$,則 $\bx$ 可以表示成
$\bx = c_1{\bf r}_1+\ldots+c_i{\bf r}_i+\ldots+\ldots+c_m{\bf r}_m$,
也就是
$\bx =c_1{\bf r}_1+\ldots+(\frac{1}{k}c_i)k{\bf r}_i+\ldots+c_m{\bf r}_m$。
因此 $\bx \in \Row(B)$,得到 $\Row(A)\subseteq\Row(B)$。
若 $\bx \in \Row(B)$,則 $\bx$ 可以表示成 $\bx =c_1{\bf r}_1+\ldots+kc_i{\bf r}_i+\ldots+c_m{\bf r}_m$,
也就是 $\bx = c_1{\bf r}_1+\ldots+(kc_i){\bf r}_i+\ldots+\ldots+c_m{\bf r}_m$。
因此 $\bx \in \Row(A)$,得到 $\Row(B)\subseteq\Row(A)$,因為 $\Row(A)\subseteq\Row(B)$ 且 $\Row(B)\subseteq\Row(A)$,所以可以得到 $\Row(A)=\Row(B)$。
##### Exercise 3(c)
若 $A$ 經過列運算 $\rho_i: + k\rho_j$ 後得到 $B$。
證明 $\operatorname{Row}(A) = \operatorname{Row}(B)$。
$Ans:$
令 $\bx \in \operatorname{Row}(A)$,則 $\bx$ 可表示為 $c_1{\bf r}_1+\ldots+ c_i{\bf r}_i+\ldots+c_j{\bf r}_j+\ldots+c_m{\bf r}_m$,
也就是
$\bx =c_1{\bf r}_1+\ldots+c_i(k{\br}_j+{\bf r}_i)+\ldots+(c_j-kc_i){\bf r}_j+\ldots+c_m{\bf r}_m$。
因此 $\bx \in \Row(B)$,得到 $\Row(A)\subseteq\Row(B)$。
令 $\bx\in\operatorname{Row}(B)$,則 $\bx$ 可表示成 $\bx = c_1{\bf r}_1+\ldots+c_i(k{\br}_j+{\bf r}_i)+\ldots+c_j{\br}_j+\ldots+ c_m{\bf r}_m$,也就是 ${\bf x}=c_1{\bf r}_1+\ldots+c_i{\bf r}_i+\ldots+(kc_i+c_j){\br}_j+\ldots+{\bf c}_m{\bf r}_m$,
因此 $\bx \in \Row(A)$,得到 $\Row(B)\subseteq\Row(A)$。
因為 $\Row(A)\subseteq\Row(B)$ 且 $\Row(B)\subseteq\Row(A)$,所以可以得到 $\Row(A)=\Row(B)$。
##### Exercise 4
令 $A$ 為一矩陣其各列向量為 ${\bf r}_1,\ldots,{\bf r}_m$
而 ${\bf b} = (b_1,\ldots,b_m)^\top$。
令 $A'$ 為方程組 $A{\bf x} = {\bf b}$ 增廣矩陣。
依照下面的步驟證明列運算不會改變解集合。
##### Exercise 4(a)
若 $A'$ 經過列運算 $\rho_i\leftrightarrow\rho_j$ 後得到 $B'$。
證明兩增廣矩陣對應到的方程組有一樣的解集合。
$Ans:$ 我們已知解集合在空間的意義為**終點落在 $\Row(A)$ 的向量集合**。
將 $A'$ 做列運算 $\rho_i\leftrightarrow\rho_j$ 後得到 $B'$,意即將 $A'$ 中兩向量對調,並不影響 $\Row(A')$ 所得之結果。故所得之解集合亦相等。
:::warning
- [x] 參考下面的例子修改 4(b) 和 4(c)。
:::
Sample:
我們可以令 $A' = \left[\begin{array}{c|c} A & \bb \end{array}\right]$ 及 $B' = \left[\begin{array}{c|c} B & \bb' \end{array}\right]$。
若 $\bx$ 滿足 $A\bx = \bb$,則 $B\bx$ 是把 $A\bx = \bb$ 的第 $i$ 項和第 $j$ 項對調,剛好就是 $\bb'$。因此 $\bx$ 滿足 $B\bx = \bb'$。所以所有 $A\bx = \bb$ 的解都是 $B\bx = \bb'$ 的解。
由於 $\rho_i\leftrightarrow\rho_j$ 的逆運算是 $\rho_i\leftrightarrow\rho_j$,所以 $B\bx = \bb'$ 的解也是 $A\bx = \bb$ 的解。
##### Exercise 4(b)
若 $A'$ 經過列運算 $\rho_i: \times k$ 後得到 $B'$。
證明兩增廣矩陣對應到的方程組有一樣的解集合。
$Ans:$
我們可以令 $A' = \left[\begin{array}{c|c} A & \bb \end{array}\right]$ 及 $B' = \left[\begin{array}{c|c} B & \bb' \end{array}\right]$。
若 $\bx$ 滿足 $A\bx = \bb$,則 $B\bx$ 是把 $A\bx = \bb$ 的第 $i$ 項乘上係數 $k$ , 剛好就是 $b'$。
因此 $\bx$ 滿足 $B\bx = \bb'$。所以所有 $A\bx = \bb$ 的解都是 $B\bx = \bb'$ 的解。
由於 $\rho_i: \times k$ 的逆運算是 $\rho_i: \times \frac{1}{k}$,所以 $B\bx = \bb'$ 的解也是 $A\bx = \bb$ 的解。
##### Exercise 4(c)
若 $A$ 經過列運算 $\rho_i: + k\rho_j$ 後得到 $B$。
證明兩增廣矩陣對應到的方程組有一樣的解集合。
$Ans$ :
我們可以令 $A' = \left[\begin{array}{c|c} A & \bb \end{array}\right]$ 及 $B' = \left[\begin{array}{c|c} B & \bb' \end{array}\right]$。
若 $\bx$ 滿足 $A\bx = \bb$,則 $B\bx$ 是把 $A\bx = \bb$ 的第 $i$ 項加上 $k$ 倍 第 $j$ 項, 剛好就是 $b'$。
因此 $\bx$ 滿足 $B\bx = \bb'$。所以所有 $A\bx = \bb$ 的解都是 $B\bx = \bb'$ 的解。
由於 $\rho_i: + k\rho_j$ 的逆運算是 $\rho_i: + (-k)\rho_j$,所以 $B\bx = \bb'$ 的解也是 $A\bx = \bb$ 的解。
##### Exercise 5
依照下面的步驟證明「可化簡到」是一個**等價關係**。
:::warning
- [x] $A$ 可化簡到 $B$ 指的是可以從 $A$ 經過一些列運算得到 $B$。跟乘矩陣沒什麼關係(至少還沒教到,而且要乘也是左乘)。我寫了 5(a) 的例子,請把 5(b), 5(c) 跟著修改。
:::
##### Exercise 5(a)
證明反身性:
$A\rightarrow A$。
$Ans:$
因為 $A$ = $I_mA$,故 $A$ 列等價於 $A$。
Sample:
因為 $A$ 經過 $\rho_i:\times 1$ 的運算以後還是自己,所以 $A$ 可以化簡到 $A$ 自己。
##### Exercise 5(b)
證明對稱性:
若 $A\rightarrow B$,則 $B\rightarrow A$。
$Ans:$
<!--
若 $AM$ = $B$,$M$ 可逆,左右同在右乘 $M^{-1}$ 可得 $BM^{-1}$ = $A$。
-->
在這裡我們討論 $\rho_i \leftrightarrow \rho_j$。
若 $A$ 經過列運算 $\rho_i \leftrightarrow \rho_j$ 得到 $B$,因為 $B$ 可藉由列運算 $\rho_j \leftrightarrow \rho_i$。實際上,其它的列運算的反運算都還是列運算,因此如果 $A$ 可以用列運算得到 $B$,則 $B$ 也可以用列運算得到 $A$。
##### Exercise 5(c)
證明遞移性:
若 $A\rightarrow B$ 且 $B\rightarrow C$﹐則 $A\rightarrow C$。
$Ans:$
<!--
若 $AM$ = $B$,$BN$ = $C$,$M$ 和 $N$ 皆可逆,則$(AM)N$ = $BN$ = $C,其中MN$可逆。
在這裡我們討論 $\rho_i \leftrightarrow \rho_j$。
-->
若 $A$ 經過一系列的列運算而得到 $B$,又 $B$ 經過另一系列的列運算得到 $C$,則自然地,$A$ 可以經過第一系列的列運算(先得到 $B$)再執行另一系列的列運算而得到 $C$。
<!--
列運算 $\rho_i \leftrightarrow \rho_j$ 得到 $B$ 且 $B$ 經過列運算 $\rho_h \leftrightarrow \rho_k$ 得到 $C$,因為 $A$ 可藉由列運算 $\rho_j \leftrightarrow \rho_i$ 及 $\rho_h \leftrightarrow \rho_k$ 得到 $C$,所以若 $A\rightarrow B$ 且 $B\rightarrow C$,則 $A$ 可以化簡到 $C$。
-->
##### Exercise 5(d)
如此一來「可化簡到」可以幫所有 $m\times n$ 矩陣分類:
隨便拿出一個 $m\times n$ 矩陣 $A$﹐取出所有可以從 $A$ 化簡到的矩陣﹐如此一來會形成一個**等價類**。
若 $\mathcal{M}_{m\times n}$ 為所有 $m\times n$ 矩陣的集合﹐
我們通常用 $\mathcal{M}_{m\times n} / \rightarrow$ 來表示所有等價類所形成的集合。
利用最簡階梯形式矩陣是唯一的這個性質﹐來說明怎麼判斷兩個矩陣是否落在同一個等價類中。
:::warning
- [x] 要說明如果 $A$ 和 $B$ 在同一個等價類,則它們的最簡階梯式會相同。而如果 $A$ 和 $B$ 的最簡階梯式相同,也可以證明 $A$ 和 $B$ 在同一個等價類。
:::
$Ans:$
若 $A$ 矩陣以及 $B$ 矩陣為同一個等價類,則 $A \rightarrow B \rightarrow R$,$A$ 可透過列運算變成 $B$ 且 $A$、$B$ 擁有同一個最簡階梯式。
另一方面、若 $A$、$B$ 兩矩陣擁有同一個最簡階梯形式 $R$,則 $A\rightarrow R$ 且 $B\rightarrow R$。因為 $\rightarrow$ 是可逆的,所以我們也有 $R\rightarrow B$ 且 $A\rightarrow R\rightarrow B$,則可證明兩矩陣為同一個等價類。
<!--
若 $A$ 矩陣的最簡階梯式為 $R$,那麼在 $A$ 化成 $R$ 的過程中可以先把其中正在化簡的矩陣 $A_1 \ldots A_m$ 拿出來(其中 $A_1 \ldots A_m$ 為不同矩陣),如此一來,$A_1 \ldots A_m$ 為等價類,而其最簡階梯式皆為 $R$,
又因為 $R$ 這個最簡階梯式是唯一的,
所以我們可以由這些矩陣的最簡階梯式是否相同
來判斷它們是否落在同個等價類中。
也就是說,假設 $A$ 跟 $B$ 落在同個等價類中,則 $A$ 跟 $B$ 的最簡階梯式相同;同理,若 $A$ 跟 $B$ 的最簡階梯式相同,則 $A$ 跟 $B$ 落在同個等價類中。
-->
##### Exercise 6
若 $A$ 是一個 $m\times n$ 矩陣。
證明 $A$ 可以化簡到的最簡階梯形式矩陣是唯一的。
##### Exercise 6(a)
證明「$A$ 可以化簡到的最簡階梯形式矩陣是唯一的。」這個敘述在 $n=1$ 時是正確的。
$Ans:$
$A$ 是一個 $m\times 1$ 矩陣,其中列向量分別為 $(x_1,\ldots, x_{m})$。
那麼,$A$ 有兩種情況, 第一種情況 $:$
有 $x_i\neq 0$,
則可以經由列運算化簡到最簡階梯式 $R$,
其中 $R$ 的列向量為 $({\bf r}_1,\ldots,{\bf r}_m)$,並且 ${\bf r}_1=1$,其餘 $=0$。
此時無論怎麼做列運算都會讓階梯式由簡化繁,
所以這個階梯式是唯一的。
第二種情況 $:$
每一列向量皆為 $0$。因為每一列向量皆為 $0$,無論怎麼做列運算,每一列向量都還是 $0$,
因此 $A$ 已到最簡階梯式,並且此階梯式僅有唯一形式。
##### Exercise 6(b)
假設「$A$ 可以化簡到的最簡階梯形式矩陣是唯一的。」這個敘述在 $n=k$ 時是正確的。
考慮一個 $n=k+1$ 的矩陣 $A$,並它寫成 $A = \begin{bmatrix} A' & {\bf a}\end{bmatrix}$。
根據假設,$A'$ 的最簡階梯式是唯一的,我們把它記作 $R'$。
說明 $A$ 化簡到最簡階梯形式時會是 $\begin{bmatrix} R' & {\bf r}\end{bmatrix}$。
(因此唯一有可能不一樣的就是最後一行。)
$Ans:$
<!--
$\begin{bmatrix}A' & {\bf a} \end{bmatrix}$ 經過列運算之後會得到 $\begin{bmatrix}R' & {\bf r} \end{bmatrix}$,
假設 $\begin{bmatrix}R' & {\bf r} \end{bmatrix}$ 並不是最簡階梯式,則 $\begin{bmatrix}R' & {\bf r} \end{bmatrix}$ 可以繼續化簡。然而 $R'$ 已經化簡完成,假設要再以 ${\bf r}$ 繼續做化簡,會使原本的 $R′$ 從簡化繁,因此此假設錯誤。因此,$\begin{bmatrix}R' & {\bf r} \end{bmatrix}$ 是最簡階梯式。
-->
**更新後答案:**
令 $\begin{bmatrix} R' & \br \end{bmatrix}$ 為 $\begin{bmatrix} A' & \ba \end{bmatrix}$ 的最簡階梯式。可以發現 $R'$ 也是由 $A'$ 經過列運算得到,同時 $R'$ 滿足所有最簡階梯式的條作,所以 $R'$ 是 $A'$ 的最簡階梯式。根據假設,$R'$ 是唯一的。由於 $\br$ 沒有任何限制,所以 $A$ 的最簡階梯式可以表示為 $\begin{bmatrix} R' & \br \end{bmatrix}$,其中 $R'$ 為 $A'$ 的最簡階梯式。
:::warning
令 $\begin{bmatrix} R' & \br \end{bmatrix}$ 為 $\begin{bmatrix} A' & \ba \end{bmatrix}$ 的最簡階梯式。可以發現 $R'$ 也是由 ??? 經過列運算得到,同時 ??? 滿足所有最簡階梯式的條作,所以 ??? 是 ??? 的最簡階梯式。根據假設,??? 是唯一的。由於 $\br$ 沒有任何限制,所以 $A$ 的最簡階梯式可以表示為 $\begin{bmatrix} R' & \br \end{bmatrix}$,其中 $R'$ 為 $A'$ 的最簡階梯式。
:::
##### Exercise 6(c)
我們把 $R'$ 的行寫成 ${\bf u}_1,\ldots,{\bf u}_k$。
考慮兩種狀況:
首先,若 $\operatorname{ker}(A)$ 中有一個向量 ${\bf v} = (c_1,\ldots, c_{k+1})$ 其 $c_{k+1}\neq 0$。
利用 $\operatorname{ker}(A) = \operatorname{ker}\left(\begin{bmatrix} R' & {\bf r} \end{bmatrix}\right)$
說明 ${\bf r} = -\frac{1}{c_{k+1}}(c_1{\bf u}_1 + \cdots + c_k{\bf u}_k)$ 是唯一的選擇。
:::warning
- [x] 令 $R' = ... $句點
- [x] $\ker(A) = A{\bf v}= 0 = \ker(\begin{bmatrix} R' & {\bf r} \end{bmatrix})$, <-- 刪掉
- [x] 假設 $\operatorname{ker}(A)$ 中有一個向量 ${\bf v} = (c_1,\ldots, c_{k+1})$ 其 $c_{k+1}\neq 0$。
- [x] 純量不要粗體
- [x] 兩邊同除 --> 由於 $c_{k+1}\neq 0$,兩邊同除
- [x] $r$ --> $\br$
- [x] 並且 ... 後面的都可以刪掉都解出 $\br$ 了,它自然是唯一的。
:::
$Ans:$
令 $R'$ 的行向量為 $\{{\bf u}_1,\ldots,{\bf u}_k\}$。
假設 $\ker(A)$ 中有一個向量 ${\bf v}=(c_1,\ldots,c_{k+1})$,其 $c_{k+1}=0$。
那麼就可以寫成 $\begin{bmatrix} {\bf u}_1 & \ldots & {\bf u}_k & {\bf r} \end{bmatrix} \begin{bmatrix} c_1 \\ \vdots \\ c_{k+1}\end{bmatrix} = \bzero$,
即 ${\bf u}_1c_1 + \ldots +{\bf u}_kc_k +{\bf r}c_{k+1} = \bzero$,
兩邊同減 ${\bf r}c_{k+1}$ 得 ${\bf u}_1c_1 + \ldots +{\bf u}_kc_k = -{\bf r}c_{k+1}$,
由於 $c_{k+1}\neq 0$,兩邊同除 $-c_{k+1}$ 可得到 ${\bf r} = \frac{-1}{c_{k+1}}({\bf u}_1c_1 + \ldots +{\bf u}_kc_k)$。
##### Exercise 6(d)
第二種狀況,$\operatorname{ker}(A)$ 中的所有向量 ${\bf v} = (c_1,\ldots, c_{k+1})$ 都是 $c_{k+1} = 0$。
說明這種狀況下 ${\bf a}\notin\operatorname{Col}(A')$ 且 ${\bf r}\notin\operatorname{Col}(R')$。
如果 $R'$ 有 $h$ 個非零的列﹐說明 ${\bf r}$ 一定在第 $h+1$ 項是 $1$ 而其它項都是 $0$。
**[由林柏仰同學提供]**
將 $A'$ 的每一行依序看成向量 $\{\bu_1,\ldots,\bu_k\}$ 。
若 $\ba\in\Col(A')$ ,則 $\ba$ 可寫成 $\ba = d_1\bu_1 + d_2\bu_2 + \cdots + d_k\bu_k$ 的形式。
此時若整理此等式,可得到 $d_1\bu_1 + d_2\bu_2 + \cdots + d_k\bu_k - \ba = {\bf 0}$ 。
換句話說,令向量 $\bx = (d_1,d_2,...,d_k,-1) , \bx\in\ker(A)$ 。
但由題目可知,對於所有在 $\ker(A)$ 中的向量 $\bv$ , $\bv$ 的第 $k+1$ 項為 $0$ ,但 $\bx$ 的第 $k+1$ 項為 $-1$ 。
故 $\bx\notin\ker(A)$ 且 $\ba\notin\Col(A')$ 。
而對於 $\br\notin\Col(R')$ 也可用同樣方式說明。
接著我們說明:若 $R'$ 有 $h$ 個非零的列,則 $\br$ 一定在第 $h+1$ 項為 $1$ 且其他項皆為 $0$ 。
首先,因為 $\br\notin\Col(R')$ ,若將 $R$ 的每一行依序看成向量 $\{\bc_{r1},\ldots ,\bc_{rk}\}$ ,則此時 $\br$ 不能寫成 $e_1\bc_{r1} + e_2\bc_{r2} + ... + e_k\bc_{rk}$ 的形式。
換句話說, $\br\in\Col(R)$ 且 $\br\notin\Col(R')$ ,在矩陣上來看相當於 $\br$ 上有軸。
此時,由已知的觀察得知 $\br$ 上有軸,而在最簡階梯型的矩陣上,軸所對應到的行向量只會有一個 $1$ ,其上下皆為 $0$ ,此時因最簡階梯型的矩陣非零列須在全零列上方,因此唯一的可能就是 $\br$ 中的第 $h+1$ 項的值為 $1$ 而其餘項的值為 $0$ 。
:::info
目前 1, 3, 4, 5, 6 都還有問題
但應該可以在檢討的時候改完
改完後只剩 6(d)
目前分數 5/5
:::