Elementary matrices
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_int_list, random_good_matrix
Let $A$ be an $m\times n$ matrix whose rows are $\br_1\trans,\ldots,\br_m\trans$.
Let $B$ be an $n\times \ell$ matrix.
Then the rows of $AB$ are $\br_1\trans A, \ldots, \br_m\trans A$.
Let $A$ be an $m\times n$ matrix.
One may perform a row operation on $A$ to obtained $A'$.
These matrices $E$ generated from $I_n$ by performing one row operation are called elementary matrices.
The inverse of an elementary matrix is also an elementary matrix, which corresponds to the inverse operation.
If $A$ reduces to $R$, then there are $E_1,\ldots,E_k$, each corresponding to a row operation, such that
$$E_k\cdots E_1A = R.$$
In particualr, $R$ can be chosen as the reduced echelon form of $A$.
If $A$ is invertible, then its reduced echelon form is $I_n$.
Therefore, there are elementary matrices $E_1,\ldots,E_k$ such that $E_k\cdots E_1A = I_n$.
That is, every invertible matrix can be written as the product of a sequence of elementary matrices $E_1^{-1}\cdots E_k^{-1}$.
執行下方程式碼。
矩陣 $A$ 經過給定的列運算後得到 $B$。
求出一個基本矩陣 $E$ 使得 $EA = B$。
Run the code below. It is known that $B$ is obtained from $A$ by applying the given row operation. Find an elementary matrix $E$ such that $EA = B$.
### code
set_random_seed(0)
print_ans = False
A = matrix(3, random_int_list(12))
print("A =")
show(A)
B = copy(A)
E = identity_matrix(3)
t = choice([1,2,3])
rows = list(range(3))
shuffle(rows)
i,j = rows[:2]
k = choice([-2,-3,2,3])
if t == 1:
print("row operation -- row%s <--> row%s"%(i+1,j+1))
B.swap_rows(i,j)
E.swap_rows(i,j)
if t == 2:
print("row operation -- row%s: *%s"%(i+1,k))
B.rescale_row(i,k)
E.rescale_row(i,k)
if t == 3:
print("row operation -- row%s: +%srow%s"%(i+1,k,j+1))
B.add_multiple_of_row(i,j,k)
E.add_multiple_of_row(i,j,k)
print("B =")
show(B)
if print_ans:
print("E =")
show(E)
執行以下程式碼。
已知 $A$ 是可逆的
(所以它的最簡階梯形式是 $I_3$)。
寫出一群基本矩陣 $E_1,\ldots,E_k$
使得 $E_k\cdots E_1 A = I_3$。
(注意先做的列運算
它的基本矩陣要寫在比較靠近 $A$ 的位置
也就是右邊。)
Run the code below. It is known that $A$ is invertible (so its reduced echelon form is $I_3$). Find a sequence of elementary matrices $E_1,\ldots, E_k$ such that $E_k\cdots E_1 A = I_3$. (Notice that the elementary matrix corresponding to the first row operation applied to $A$ should be the closest to $A$, which is the rightmost position.)
### code
set_random_seed(0)
A = random_good_matrix(3,3,3)
print("A =")
show(A)
寫出 $\rho_1\leftrightarrow\rho_2$ 所對應的基本矩陣、
以及它的反矩陣。
Write down the elementary matrix of $\rho_1\leftrightarrow\rho_2$, and find its inverse.
寫出 $\rho_1: \times 3$ 所對應的基本矩陣、
以及它的反矩陣。
Write down the elementary matrix of $\rho_1: \times 3$, and find its inverse.
寫出 $\rho_1: +2\rho_2$ 所對應的基本矩陣、
以及它的反矩陣。
Write down the elementary matrix of $\rho_1: +2\rho_2$, and find its inverse.
若矩陣 $M$ 被分割四塊如下
$$ \begin{bmatrix} A & B \\ C & D \end{bmatrix}, $$其中 $A$ 為 $m\times m$ 方陣並且可逆、
而 $C$ 的高度為 $n$。
驗證等式
$$ \begin{bmatrix} I_m & O \\ -CA^{-1} & I_n \end{bmatrix}\begin{bmatrix} A & B \\ C & D \end{bmatrix} = \begin{bmatrix} A & B \\ O & D - CA^{-1}B \end{bmatrix}. $$這個可視為是對一塊一塊的矩陣做列運算。
Suppose a matrix $M$ can be written as
$$ \begin{bmatrix} A & B \\ C & D \end{bmatrix}, $$where $A$ is an $m\times m$ matrix and $C$ is of height $n$.
Verify the identity
$$ \begin{bmatrix} I_m & O \\ -CA^{-1} & I_n \end{bmatrix}\begin{bmatrix} A & B \\ C & D \end{bmatrix} = \begin{bmatrix} A & B \\ O & D - CA^{-1}B \end{bmatrix}. $$This can be viewed as a block row operation.
令 $A$ 和 $B$ 為 $n\times n$ 矩陣。
以下步驟提供另一種方式證明︰
若 $AB = I_n$ 則 $BA = I_n$。
Let $A$ and $B$ be $n\times n$ matrices. The following provide a different way to show that $AB = I_n$ if and only if $BA = I_n$.
若 $AB = I_n$。
證明增廣矩陣 $\left[\begin{array}{c|c} A & I_n \end{array}\right]$ 的最簡階梯形式矩陣
一定是 $\left[\begin{array}{c|c} I_n & B \end{array}\right]$。
Suppose $AB = I_n$. Show that the reduced echelon form of $\left[\begin{array}{c|c} A & I_n \end{array}\right]$ is $\left[\begin{array}{c|c} I_n & B \end{array}\right]$.
記錄所有的列運算可以得到一群基本矩陣 $E_1,\ldots, E_k$。
說明 $E_k\cdots E_1 A = I_n$ 且 $E_k\cdots E_1 I_n = B$﹐
因此 $BA = I_n$。
By recording the row operations, we may obtain a sequence of elementary matrices $E_1,\ldots, E_k$. Explain why $E_k\cdots E_1 A = I_n$ and $E_k\cdots E_1 I_n = B$. Therefore, $BA = I_n$.
相對於列運算﹐
我們也可以自然地定義 行運算 :
令 $A$ 為一 $m\times n$ 矩陣。
若 $A$ 經過某一行運算以後得到 $A'$。
而 $I_n$ 經過同一行運算以後得到 $E$。
則 $AE = A'$。
(注意列運算基本矩陣乘在左邊﹐用來控制右邊矩陣的列;
而行運算基本矩陣乘在右邊﹐用來控制左邊矩陣的行。)
考慮 $5\times 5$ 的基本矩陣。
Analogously, we may define a column operation as one of the following:
Let $A$ be an $m\times n$ matrix. Suppose $A'$ is obtained from $A$ by applying a column operation. Let $E$ be the matrix obtained from $I_n$ by applying the same column operation. Then $AE = A'$. (Notice that the row elementary matrix is put on the left of the target matrix to control its row, while the column elementary matrix is put on the right of the target matrix to control its column.)
Consider a $5\times 5$ elementary matrix.
寫出 $\kappa_1\leftrightarrow\kappa_2$ 所對應的基本矩陣、
以及它的反矩陣。
Write down the elementary matrix of $\kappa_1\leftrightarrow\kappa_2$, and find its inverse.
寫出 $\kappa_1: \times 3$ 所對應的基本矩陣、
以及它的反矩陣。
Write down the elementary matrix of $\kappa_1: \times 3$, and find its inverse.
寫出 $\kappa_1: +2\kappa_2$ 所對應的基本矩陣、
以及它的反矩陣。
Write down the elementary matrix of $\kappa_1: +2\kappa_2$, and find its inverse.
令
$$ J = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix} $$且
$$ D = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{bmatrix}. $$求一可逆矩陣 $E$ 使得 $E\trans JE = D$。
Let
$$ J = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix} $$and
$$ D = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{bmatrix}. $$Find an invertible matrix $E$ such that $E\trans JE = D$.