Rank and nullity
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
Recall that the number of of pivots of a matrix is the number of nonzero rows in its reduced echelon form.
Let $A$ be an $m\times n$ matrix with $r$ pivots.
Since we know bases of its four fundamental subspaces, we have
The value $r$ is the rank of $A$, denoted as $\rank(A)$,
the value $n - r$ is the nullity of $A$, denoted as $\nul(A) = n - r$,
while $m - r$ is usually referred to as the left nullity of $A$.
Note that $r$ is also the number of leading variables, and $n - r$ is also the number of free variables.
Let $A$ be an $m\times n$ matrix.
Then $\rank(A) + \nul(A) = n$, the number of columns.
執行下方程式碼。
試著看出 $A$ 的秩、核數、以及左核數。
Run the code below. Find the rank, nullity, and the left nullity of $A$.
### code
set_random_seed(0)
print_ans = False
r = choice([3,2,1,0])
m,n,r = 3,4,r
A = random_good_matrix(m,n,r)
print("A =")
show(A)
if print_ans:
print("rank =", r)
print("nullity =", n - r)
print("left nullity =", m - r)
令 $A$ 為一矩陣且其秩為 $r$。
回顧 $r$ 同時是列空間和行空間的維度。
以下討論秩的一些基本性質。
Let $A$ be a matrix of rank $r$. Recall that $r$ is the dimension of $\Col(A)$ and the dimension of $\Row(A)$. Here we study some basic properties of rank.
說明 $\rank \begin{bmatrix} A & O \end{bmatrix} =
\rank \begin{bmatrix} A \\ O \end{bmatrix} = r$。
更一般來說 $\rank \begin{bmatrix} A & O \\ O & O \end{bmatrix} = r$。
Explain why $\rank \begin{bmatrix} A & O \end{bmatrix} = \rank \begin{bmatrix} A \\ O \end{bmatrix} = r$. More generally, $\rank \begin{bmatrix} A & O \\ O & O \end{bmatrix} = r$.
說明對大小適當的矩陣 $B,C,D$ 來說﹐
$\rank \begin{bmatrix} A & B \end{bmatrix} \geq r$ 且
$\rank \begin{bmatrix} A \\ C \end{bmatrix} \geq r$。
更一般來說 $\rank \begin{bmatrix} A & B \\ C & D \end{bmatrix} \geq r$。
For matrices $B$, $C$, and $D$ of appropriate sizes, show that $\rank \begin{bmatrix} A & B \end{bmatrix} \geq r$ and $\rank \begin{bmatrix} A \\ C \end{bmatrix} \geq r$. More generally, $\rank \begin{bmatrix} A & B \\ C & D \end{bmatrix} \geq r$.
證明所有秩為 $1$ 的 $m\times n$ 矩陣 $A$ 都可寫成 $A = \bu\bv\trans$﹐
其中 $\bu\in\mathbb{R}^m$ 而 $\bv\in\mathbb{R}^n$ 被視為是行向量。
Show that every $m\times n$ matrix of rank $1$ can be written as $\bu\bv\trans$ for some column vectors $\bu\in\mathbb{R}^m$ and $\bv\in\mathbb{R}^n$.
如果沒有先前的理論證明﹐很難想像列空間和行空間的維度永遠是一樣的。
(而且它們還一個在 $\mathbb{R}^m$ 中、另一個在 $\mathbb{R}^n$ 裡!)
依照以下的方式再次看出這兩個空間的維度相同。
Without the theoretical foundation, it is hard to believe that the row space and the column space have the same dimension. (In particular, the row space is in $\mathbb{R}^m$, while the column space is in $\mathbb{R}^n$!) Use the given instructions to show again that their dimensions are the same.
令 $A$ 為一 $m\times n$ 矩陣、
$Q$ 為一 $m\times m$ 可逆矩陣、
$P$ 為一 $n\times n$ 可逆矩陣。
回顧為什麼 $QA$ 和 $A$ 的列空間相同。
同理 $AP$ 和 $A$ 的行空間相同。
Let $A$ be an $m\times n$ matrix, $Q$ an $m\times m$ invertible matrix, and $P$ an $n\times n$ invertible matrix. Review why $QA$ and $A$ has the same row space, while $AP$ and $A$ have the same column space.
令 $Q$ 為一可逆矩陣且
$S = \{\bu_1,\ldots,\bu_k\}$ 是線性獨立的向量集合。
證明 $\{ Q\bu_1,\ldots,Q\bu_k \}$ 也線性獨立。
令 $A$ 為一 $m\times n$ 矩陣、
$Q$ 為一 $m\times m$ 可逆矩陣、
$P$ 為一 $n\times n$ 可逆矩陣。
藉此證明 $AP$ 和 $A$ 的列空間維度相同。
同理 $QA$ 和 $A$ 的行空間維度相同。
Let $Q$ be an invertible matrix and $S = \{\bu_1,\ldots,\bu_k\}$ a linearly independent set of vectors. Show that $\{ Q\bu_1,\ldots,Q\bu_k \}$ is also linearly independent.
Let $A$ be an $m\times n$ matrix, $Q$ an $m\times m$ invertible matrix, and $P$ an $n\times n$ invertible matrix. Show that the row spaces of $AP$ and $A$ have the same dimension, while the column spaces of $QA$ and $A$ have the same dimension.
說明任一個 $m\times n$ 矩陣 $A$ 都可以利用列運算及行算運變成
$$ R = \begin{bmatrix} I_r & O_{r, n-r} \\ O_{m-r, r} & O_{m-r, n-r} \\ \end{bmatrix}. $$藉由基本矩陣的幫忙﹐可以找到
$m\times m$ 的可逆矩陣 $E$ 和
$n\times n$ 的可逆矩陣 $F$
使得 $R = E A F$。
Explain why every $m\times n$ matrix $A$ reduces to
$$ R = \begin{bmatrix} I_r & O_{r, n-r} \\ O_{m-r, r} & O_{m-r, n-r} \\ \end{bmatrix} $$by some row operations and column operations.
By recording the corresponding elementary matrices, one may find an $m\times m$ invertible matrix $E$ and an $n\times n$ invertible matrix such that $R = E A F$.
可以看出 $R$ 的行空間和列空間維度相同。
證明 $A$ 的行空間和列空間維度也相同。
It is not hard to see that the row space and the column space of $R$ have the same dimension. Use this fact to show that the row space and the column space of $A$ have the same dimension.
證明 $\rank(A + B) \leq \rank(A) + \rank(B)$。
Prove that $\rank(A + B) \leq \rank(A) + \rank(B)$.
證明 $\rank(AB) \leq \min \{\rank(A), \rank(B)\}$。
Prove that $\rank(AB) \leq \min \{\rank(A), \rank(B)\}$.