Row space, kernel, and their bases
This work by Jephian Lin is licensed under a Creative Commons Attribution 4.0 International License.
$\newcommand{\trans}{^\top} \newcommand{\adj}{^{\rm adj}} \newcommand{\cof}{^{\rm cof}} \newcommand{\inp}[2]{\left\langle#1,#2\right\rangle} \newcommand{\dunion}{\mathbin{\dot\cup}} \newcommand{\bzero}{\mathbf{0}} \newcommand{\bone}{\mathbf{1}} \newcommand{\ba}{\mathbf{a}} \newcommand{\bb}{\mathbf{b}} \newcommand{\bc}{\mathbf{c}} \newcommand{\bd}{\mathbf{d}} \newcommand{\be}{\mathbf{e}} \newcommand{\bh}{\mathbf{h}} \newcommand{\bp}{\mathbf{p}} \newcommand{\bq}{\mathbf{q}} \newcommand{\br}{\mathbf{r}} \newcommand{\bx}{\mathbf{x}} \newcommand{\by}{\mathbf{y}} \newcommand{\bz}{\mathbf{z}} \newcommand{\bu}{\mathbf{u}} \newcommand{\bv}{\mathbf{v}} \newcommand{\bw}{\mathbf{w}} \newcommand{\tr}{\operatorname{tr}} \newcommand{\nul}{\operatorname{null}} \newcommand{\rank}{\operatorname{rank}} %\newcommand{\ker}{\operatorname{ker}} \newcommand{\range}{\operatorname{range}} \newcommand{\Col}{\operatorname{Col}} \newcommand{\Row}{\operatorname{Row}} \newcommand{\spec}{\operatorname{spec}} \newcommand{\vspan}{\operatorname{span}} \newcommand{\Vol}{\operatorname{Vol}} \newcommand{\sgn}{\operatorname{sgn}} \newcommand{\idmap}{\operatorname{id}} \newcommand{\am}{\operatorname{am}} \newcommand{\gm}{\operatorname{gm}} \newcommand{\mult}{\operatorname{mult}} \newcommand{\iner}{\operatorname{iner}}$
from lingeo import random_good_matrix, row_space_matrix, kernel_matrix
You are recommended to read the section Four fundamental subspaces first, where you will find the definition of $\beta_R$, $\beta_K$, $\beta_C$, $\beta_L$.
Let $A$ be a matrix.
Let $\beta_R$ and $\beta_K$ be the standard bases of $\Row(A)$ and $\ker(A)$, respectively.
We have known that
In fact, both $\beta_R$ and $\beta_K$ are linearly independent.
Therefore, it is fine that we call them the standard bases.
Let $V$ be a subspace in $\mathbb{R}^n$ spanned by a finite set of vectors $S$.
Then we may find a basis of $V^\perp$ as follows.
執行下方程式碼。
令 $\left[\begin{array}{c|c} R & B \end{array}\right]$ 為 $\left[\begin{array}{c|c} A & I \end{array}\right]$ 最簡階梯形式矩陣。
令 $S = \{ \br_1, \ldots, \br_3 \}$ 為 $A$ 的各列向量﹐
而 $S' = \{ \br'_1, \ldots, \br'_3 \}$ 為 $R$ 的各列向量。
Run the code below. Let $\left[\begin{array}{c|c} R & B \end{array}\right]$ be the reduced echelon form of $\left[\begin{array}{c|c} A & I \end{array}\right]$. Let $S= \{ \bu_1, \ldots, \bu_3 \}$ be the rows of $A$ and $S' = \{ \br'_1, \ldots, \br'_3 \}$ the rows of $R$.
### code
set_random_seed(0)
print_ans = False
m,n,r = 3,5,2
A = random_good_matrix(m,n,r)
AI = A.augment(identity_matrix(m), subdivide=True)
RB = AI.rref()
B = RB[:,n:]
print("[ A | I ] =")
show(AI)
print("[ R | B ] =")
show(RB)
if print_ans:
for i in range(m):
print( "r'%s = "%(i+1) + " + ".join("%s u%s"%(B[i,k], k+1) for k in range(m)) )
將 $S'$ 中的每一個向量寫成 $S$ 的線性組合。
For each vector in $S'$, write it as a linear combination of $S$.
令 $B$ 的第一列為 $(b_1, \ldots, b_3)$。
說明如果要把 $\left[\begin{array}{c|c} R & B \end{array}\right]$ 的第一列寫成 $\left[\begin{array}{c|c} A & I \end{array}\right]$ 各列的線性組合﹐
使用係數 $b_1, \ldots, b_3$ 是唯一的辦法。
更一般來說﹐說明 $BA = R$。
(提示:令 $\left[\begin{array}{c|c} R & B \end{array}\right]$ 的各列為 $\bw'_1, \ldots, \bw'_3$、
而 $\left[\begin{array}{c|c} A & I \end{array}\right]$ 的各列為 $\bw_1, \ldots, \bw_3$。
解 $x_1\bw_1 + x_2\bw_2 + x_3\bw_3 = \bw'_1$。
只要觀察這個方程式每個項量的最後幾項就好。)
Let $(b_1, \ldots, b_3)$ be the first row of $B$. Explain the only way to write the first row of $\left[\begin{array}{c|c} R & B \end{array}\right]$ as a linear combination of rows of $\left[\begin{array}{c|c} A & I \end{array}\right]$ is by the coefficients $b_1, \ldots, b_3$. More generally, explain why $BA = R$.
Hint: Let $\bw'_1, \ldots, \bw'_3$ be the rows of $\left[\begin{array}{c|c} R & B \end{array}\right]$ and $\bw_1, \ldots, \bw_3$ the rows of $\left[\begin{array}{c|c} A & I \end{array}\right]$. Try to solve $x_1\bw_1 + x_2\bw_2 + x_3\bw_3 = \bw'_1$ for $x_1, x_2, x_3$. Note that you only need to focus on the last few entries.
若 $A$ 是一個 $n\times n$ 矩陣。
而 $\left[\begin{array}{c|c} A & I_n \end{array}\right]$ 的最簡階梯形式矩陣是 $\left[\begin{array}{c|c} I_n & B \end{array}\right]$。
藉由上一小題的結果(再次)證明
若 $B$ 是 $n\times n$ 矩陣使得 $AB = I_n$﹐
則 $BA = I_n$。
Let $A$ be an $n\times n$ matrix. Suppose $\left[\begin{array}{c|c} I_n & B \end{array}\right]$ is the reduced echelon form of $\left[\begin{array}{c|c} A & I_n \end{array}\right]$. Use the observation from the previous problem prove (again) that if $B$ is an $n\times n$ matrix such that $AB = I_n$, then $BA = I_n$.
執行以下程式碼。
其中 $R$ 是 $A$ 的最簡階梯形式矩陣。
Run the code below. Let $R$ be the reduced echelon form of $A$.
### code
set_random_seed(0)
print_ans = False
m,n,r = 4,5,2
A = random_good_matrix(m,n,r)
R = A.rref()
print("A =")
show(A)
print("R =")
show(R)
if print_ans:
print("A basis of the row space can be the set of rows of")
show(row_space_matrix(A))
print("A basis of the kernel can be the set of columns of")
show(kernel_matrix(A))
令
$$ A = \begin{bmatrix} 1 & 1 & 0 \\ -1 & 0 & 1 \\ 0 & -1 & -1 \\ \end{bmatrix} $$且 $S = \{\br_1,\ldots,\br_3\}$ 為其各列向量。
令 $V = \vspan(S)$,
求 $V^\perp$ 的一組基底。
Let
$$ A = \begin{bmatrix} 1 & 1 & 0 \\ -1 & 0 & 1 \\ 0 & -1 & -1 \\ \end{bmatrix} $$and $S = \{\br_1,\ldots,\br_3\}$ its rows. Let $V = \vspan(S)$. Find a basis of $V^\perp$.
利用 zero forcing 的方法來說明 $\beta_R$ 是線性獨立的。
Use zero forcing to show that $\beta_R$ is linearly independent.
利用 zero forcing 的方法來說明 $\beta_K$ 是線性獨立的。
Use zero forcing to show that $\beta_K$ is linearly independent.
令 $A$ 為一 $m \times n$ 矩陣。
若 $E$ 是一個 $m\times m$ 可逆矩陣且 $B = EA$。
Let $A$ be an $m\times n$ matrix. Suppose $E$ is an $m\times m$ invertible matrix and $B = EA$.
證明 $\Row(A) = \Row(B)$。
(提示:可以把 $E$ 拆成基本矩陣當做列運算。
另一個方法是說明 $B$ 的每一列都可以 $A$ 的各列的線性組合,而且反之亦然。)
Show that $\Row(A) = \Row(B)$.
Hint: You may write $E$ as the product of some elementary matrices. Alternatively, you may show that each row of $B$ is a linear combination of $A$, and vice versa.
證明以下敘述等價:
(提示:證明 $\Col(A)^\perp = \{\bzero\}$ 和 $\Col(B)^\perp = \{\bzero\}$ 等價。)
Show that the following are equivalent:
Hint: You may show that $\Col(A)^\perp = \{\bzero\}$ and $\Col(B)^\perp = \{\bzero\}$ are equivalent.
總結來說,
證明若 $A$ 的各列集合是 $\Row(A)$ 的一組基底,
則 $B$ 的各列集合也是 $\Row(A)$ 的一組基底。
In summary, if the rows of $A$ form a basis of $\Row(A)$, then the rows of $B$ also form a basis of $\Row(A)$.