將可逆矩陣展開為基本矩陣的乘積¶

Invertible matrix as the product of elementary matrices

Creative Commons License
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}}$

In [ ]:
from lingeo import random_good_matrix, row_operation_process

Main idea¶

Recall that the elementary matrix of a row operation is the resulting matrix of performing the row opertion on the identity matrix.
(See Section 113 for more details.)

Let $A$ be a matrix and $R$ its reduced echelon form.
Then one may perform row operations on $A$ to obtain $R$.
Therefore, there is a sequence of elementary matrices $E_1, \ldots, E_k$ such that

$$ E_k\cdots E_1 A = R. $$

Since any row operation is revertible,

$$ E_1^{-1}\cdots E_k^{-1} R = A $$

where $E_i^{-1}$ is the elementary matrix of the reverse row operation corresponding to $E_i$.

When $A$ is a square matrix and is invertible, its reduced echelon form is the identity matrix $I_n$.
Therefore, $A$ can be written as the product of a sequence of elementary matrices

$$ A = F_1 \cdots F_k. $$

Note that this decomposition is not unique.
In particular, any swapping operation

$$ \rho_i\leftrightarrow\rho_j $$

can be replaced by

$$ \begin{aligned} \rho_j&: + \rho_i, \\ \rho_i&: - \rho_i, \\ \rho_j&: + \rho_i,\text{ and} \\ \rho_i&: \times (-1) \end{aligned} $$

in order.

Side stories¶

  • column operation
  • congruent
  • swap variables

Experiments¶

Exercise 1¶

執行以下程式碼。

Run the code below.

In [ ]:
### code
set_random_seed(0)
print_ans = False
n = 3
A = random_good_matrix(n,n,n)

print("A")
pretty_print(A)

if print_ans:
    elems = row_operation_process(A, inv=True)
    pretty_print(elems)
Exercise 1(a)¶

將 $A$ 用列運算化簡為單位矩陣,
並將過程依序記錄下來。

Apply row operations to $A$ and record each step of how it becomes an identity matrix.

Exercise 1(b)¶

將 $A$ 寫成基本矩陣的乘積。

Write $A$ as a product of elementary matrices.

Exercises¶

Exercise 2¶

執行以下程式碼。

Run the code below.

In [ ]:
### code
set_random_seed(0)
print_ans = False
n = 3
A, R, pvts = random_good_matrix(n,n + 1,n, return_answer=True)

print("A")
pretty_print(A)
print("R")
pretty_print(R)

if print_ans:
    elems = row_operation_process(A)
    pretty_print(*(elems[::-1]), A, LatexExpr("="), R)
    elems = row_operation_process(A, inv=True)
    pretty_print(*elems, R, LatexExpr("="), A)
Exercise 2(a)¶

找出一些基本矩陣 $E_1,\ldots, E_k$ 使得 $E_k\cdots E_1 A = R$。

Find some elementary matrices $E_1,\ldots, E_k$ such that $E_k\cdots E_1 A = R$.

Exercise 2(b)¶

找出一些基本矩陣 $F_1,\ldots, F_k$ 使得 $F_1\cdots F_k R = A$。

Find some elementary matrices $F_1,\ldots, F_k$ such that $F_1\cdots F_k R = A$.

Exercise 3¶

執行以下程式碼。

Run the code below.

In [ ]:
### code
set_random_seed(0)
print_ans = False
n = 3
A, R, pvts = random_good_matrix(n,n + 1,n - 1, return_answer=True)

print("A")
pretty_print(A)
print("R")
pretty_print(R)

if print_ans:
    elems = row_operation_process(A)
    pretty_print(*(elems[::-1]), A, LatexExpr("="), R)
    elems = row_operation_process(A, inv=True)
    pretty_print(*elems, R, LatexExpr("="), A)
Exercise 3(a)¶

找出一些基本矩陣 $E_1,\ldots, E_k$ 使得 $E_k\cdots E_1 A = R$。

Find some elementary matrices $E_1,\ldots, E_k$ such that $E_k\cdots E_1 A = R$.

Exercise 3(b)¶

找出一些基本矩陣 $F_1,\ldots, F_k$ 使得 $F_1\cdots F_k R = A$。

Find some elementary matrices $F_1,\ldots, F_k$ such that $F_1\cdots F_k R = A$.

Exercise 4¶

將

$$ A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} $$

寫成基本矩陣的乘積,
且所用到的基本矩陣沒有對應到「兩列交換」這個動作。

Write

$$ A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} $$

as a product of elementary matrices in a way that none of the elementary matrices corresponds to "swapping two rows".

Exercise 5¶

列運算所對應到的基本矩陣會乘在左邊,
而行運算所對應到的基本矩陣會乘在右邊。
(參考 113-6。)

令

$$ A = \begin{bmatrix} 1 & 1 & 1 & 1 \\ 1 & 2 & 2 & 2 \\ 1 & 2 & 3 & 3 \\ 1 & 2 & 3 & 4 \end{bmatrix}. $$

找出一些基本矩陣 $E_1,\ldots, E_k$ 使得 $E_k\cdots E_1 A E_1\trans\cdots E_k\trans = I_4$。

A row operation corresponds to an elementary matrix to be multiplied on the left hand side, while a column operation corresponds to an elementary matrix to be multiplied on the right hand side. (See 113-6.)

Let

$$ A = \begin{bmatrix} 1 & 1 & 1 & 1 \\ 1 & 2 & 2 & 2 \\ 1 & 2 & 3 & 3 \\ 1 & 2 & 3 & 4 \end{bmatrix}. $$

Find some elementary matrices $E_1,\ldots, E_k$ such that $E_k\cdots E_1 A E_1\trans\cdots E_k\trans = I_4$.