Jephian Lin
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 反矩陣 ![Creative Commons License](https://i.creativecommons.org/l/by/4.0/88x31.png) 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_good_matrix ``` ## Main idea ##### Matrix-matrix multipliciation (by column) Let $A$ be an $m\times n$ matrix. Let $B$ be an $n\times \ell$ matrix whose columns are ${\bf u}_1,\ldots,{\bf u}_\ell$. Then the columns of $AB$ are $A{\bf u}_1, \ldots, A{\bf u}_\ell$. Recall that an $n\times n$ matrix $A$ is invertible if there is a matrix $B$ such that $AB = BA = I_n$. Indeed, an $n\times n$ matrix is invertible if and only if it is nonsingular. **invertible $\implies$ nonsingular** Suppose $A$ and $B$ are $n\times n$ matrices such that $AB = I_n$. Then both $A$ and $B$ are nonsingular. **nonsingular $\implies$ invertible** Suppose $A$ is an $n\times n$ nonsingular matrix. Let ${\bf e}_1,\ldots,{\bf e}_n$ be the columns of $I_n$. Since $A$ is nonsingular and $\operatorname{Col}(A) = \mathbb{R}^n$, the equation $A{\bf x} = {\bf e}_i$ has a solution ${\bf x} = {\bf b}_i$ for each $i = 1,\ldots, n$. Let $B$ be the matrix whose columns are ${\bf b}_1,\ldots,{\bf b}_n$. Then $AB = I_n$. Here is a way to calculate $B$ at once: 1. Consider the $n\times 2n$ augmented matrix $\left[\begin{array}{c|c} A & I_n \end{array}\right]$. 2. Since $A$ is nonsingular, necessarily 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]$ for some $B$. 3. Thus, $AB = I_n$. Suppose $A$ and $B$ be $n\times n$ matrices such that $AB = I_n$. Then $BA = I_n$. Therefore, if $AB = I_n$, then both $A$ and $B$ are invertible and they are the inverse of each other. Suppose $A$, $B$, and $C$ are $n\times n$ matrices such that $CA = I_n$ and $AB = I_n$. Then $C = B$. Therefore, each matrix only has one inverse. ## Side stories - `is_invertible` - `inverse` - inverse algebra ## Experiments :::warning 整體建議: 1. 向量粗體、純量不用 2. 句子完整、加標點 ::: ##### Exercise 1 執行下方程式碼。 矩陣 $\left[\begin{array}{c|c} I & B \end{array}\right]$ 是 $\left[\begin{array}{c|c} A & I \end{array}\right]$ 的最簡階梯形式矩陣。 ```python ### code set_random_seed(0) print_ans = False A = random_good_matrix(4,4,4) AI = A.augment(identity_matrix(4), subdivide=True) IB = AI.rref() B = IB[:,4:] print("[ A | I ] =") show(AI) print("[ I | B ] =") show(IB) ``` ##### Exercise 1(a) 令 ${\bf b}_i$ 為 $B$ 的第 $i$ 個行向量。 令 ${\bf e}_i$ 為 $I$ 的第 $i$ 個行向量。 驗證是否 $A{\bf b}_i = {\bf e}_i$。 說明為什麼。 ***Ans:*** $$A{\bf b}_1 = \begin{bmatrix} 1 & 3 & 5 & -5\\ -3 & -8 & -20 & 15\\ 15 & 41 & 96 & -72\\ 43 & 118 & 272 & -208 \end{bmatrix} \begin{bmatrix} -208\\ 48\\ 9\\ -4 \end{bmatrix} = \begin{bmatrix} -208 + 3 \times 48 + 5 \times 9 + (-5) \times (-4)\\ (-3) \times (-208) + (-8) \times 48 + (-20) \times 9 + 15 \times (-4)\\ 15 \times (-208) + 41 \times 48 + 96 \times 9 + (-72) \times (-4)\\ 43 \times (-208) + 118 \times 48 + 272 \times 9 + (-208) \times (-4) \end{bmatrix} = \begin{bmatrix} 1\\ 0\\ 0\\ 0 \end{bmatrix} = {\bf e}_1.$$ $$A{\bf b}_2 = \begin{bmatrix} 1 & 3 & 5 & -5\\ -3 & -8 & -20 & 15\\ 15 & 41 & 96 & -72\\ 43 & 118 & 272 & -208 \end{bmatrix} \begin{bmatrix} 112\\ -24\\ -5\\ 3 \end{bmatrix} = \begin{bmatrix} 112 + 3 \times (-24) + 5 \times (-5) + (-5) \times 3\\ (-3) \times 112 + (-8) \times (-24) + (-20) \times (-5) + 15 \times 3\\ 15 \times 112 + 41 \times (-24) + 96 \times (-5) + (-72) \times 3\\ 43 \times 112 + 118 \times (-24) + 272 \times (-5) + (-208) \times 3 \end{bmatrix} = \begin{bmatrix} 0\\ 1\\ 0\\ 0 \end{bmatrix} = {\bf e}_2.$$ $$A{\bf b}_3 = \begin{bmatrix} 1 & 3 & 5 & -5\\ -3 & -8 & -20 & 15\\ 15 & 41 & 96 & -72\\ 43 & 118 & 272 & -208 \end{bmatrix} \begin{bmatrix} -150\\ 35\\ 7\\ -2 \end{bmatrix} = \begin{bmatrix} (-150) + 3 \times 35 + 5 \times 7 + (-5) \times (-2)\\ (-3) \times (-150) + (-8) \times 35 + (-20) \times 7 + 15 \times (-2)\\ 15 \times (-150) + 41 \times 35 + 96 \times 7 + (-72) \times (-2)\\ 43 \times (-150) + 118 \times 35 + 272 \times 7 + (-208) \times (-2) \end{bmatrix} = \begin{bmatrix} 0\\ 0\\ 1\\ 0 \end{bmatrix} = {\bf e}_3.$$ $$A{\bf b}_4 = \begin{bmatrix} 1 & 3 & 5 & -5\\ -3 & -8 & -20 & 15\\ 15 & 41 & 96 & -72\\ 43 & 118 & 272 & -208 \end{bmatrix} \begin{bmatrix} 65\\ -15\\ -3\\ 1 \end{bmatrix} = \begin{bmatrix} 65 + 3 \times (-15) + 5 \times (-3) + (-5) \\ (-3) \times 65 + (-8) \times (-15) + (-20) \times (-3) + 15 \\ 15 \times 65 + 41 \times (-15) + 96 \times (-3) + (-72) \\ 43 \times 65 + 118 \times (-15) + 272 \times (-3) + (-208) \end{bmatrix} = \begin{bmatrix} 0\\ 0\\ 0\\ 1 \end{bmatrix} = {\bf e}_4 .$$ 由於矩陣 $\left[\begin{array}{c|c} I & B \end{array}\right]$ 是 $\left[\begin{array}{c|c} A & I \end{array}\right]$ 的最簡階梯形式矩陣。 而$AB = I_n$。 因此$A{\bf b}_i$ 僅是從整體$AB = I_n$分割出來的, 所以$A{\bf b}_i = {\bf e}_i$。 ##### Exercise 1(b) 驗證是否 $AB = I_n$。 ***Ans:*** $AB = \begin{bmatrix} 1 & 3 & 5 & -5\\ -3 & -8 & -20 & 15\\ 15 & 41 & 96 & -72\\ 43 & 118 & 272 & -208 \end{bmatrix} \begin{bmatrix} -208& 112 & -150 & 65\\ 48 & -24 & 35 & -15\\ 9 & -5 & 7 & -3\\ -4 & 3 & -2 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}.$ ## Exercises ##### Exercise 2 令 $A$ 和 $B$ 為 $n\times n$ 矩陣。 驗證以下反矩陣的性質。 ##### Exercise 2(a) 若 $A$ 可逆。 如果 $X$ 和 $B$ 是 $n\times m$ 矩陣且 $AX = B$ 則 $X = A^{-1}B$。 如果 $X$ 和 $B$ 是 $m\times n$ 矩陣且 $XA = B$ 則 $X = BA^{-1}$。 :::warning - [x] 加入適當標點,展示數學裡可以用半型沒關係,好像很多題都有這個問題 ::: ***Ans:*** 若 $A$ 可逆 則存在反矩陣 $A^{-1}$,使得 $$AA^{-1} = A^{-1}A = I_n。$$ 將方程式$$AX = B,$$ 同時左乘 $A^{-1}$ $$X = A^{-1}B $$ 得證第一小題 。 將方程式 $$XA = B,$$ 同時右乘 $A^{-1}$ $$X = BA^{-1}$$ 得證第二小題 。 ##### Exercise 2(b) 若 $A$ 和 $B$ 都可逆 則 $AB$ 也可逆且 $(AB)^{-1} = B^{-1}A^{-1}$。 :::warning - [x] 可以直接驗證 $B^{-1}A^{-1}AB = I$ 和 $ABB^{-1}A^{-1} = I$ 就好。 ::: ***Ans:*** 因為 $A$ 和 $B$ 都可逆, 則存在 $A^{-1}$ 和 $B^{-1}$, 因此 $B^{-1} A^{-1}$ 也存在, 則可將 $AB$ 和 $B^{-1} A^{-1}$ 相乘, $$AB B^{-1} A^{-1} = A I_n A^{-1} = I_n. $$ 又 $$B^{-1} A^{-1} AB = B^{-1} I_n B = I_n.$$ 因此 $$AB B^{-1} A^{-1} = B^{-1} A^{-1} AB = I_n. $$ 得證 $AB$ 可逆且 $(AB)^{-1} = B^{-1}A^{-1}$。 ##### Exercise 2(c) 若 $AB$ 可逆﹐ 則 $A$ 和 $B$ 都可逆。 :::warning - [x] 因為 invertible $\iff$ nonsingular --> 因為當 $M$ 為方陣時「$M$ 可逆」和「$\ker(M) = \{\bzero\}$」等價 - [x] 又如果有 $\bx_2$ 使得 $A{\bf x}_2 = {\bf 0}$。因為已知 $B$ 可逆,所以 $\Col(B) = \mathbb{R}^n$,可假設 ${\bf x}_2 = B{\bf x}_3$。 - [x] 句子不完整 ::: ***Ans:*** 1. 因為**當 $M$ 為方陣時「$M$ 可逆」和「$\ker(M) = \{\bzero\}$」等價**, 因此若 $AB$ 可逆, 則 $\operatorname{ker}(AB) = \{{\bf 0}\}。$ 也就是說 $AB{\bf x} = {\bf 0}$,只有 ${\bf 0}$ 帶入 ${\bf x}$ 時成立。 且已知 $B{\bf 0} = {\bf 0}$ , $A{\bf 0} = {\bf 0}$, 因此若有其他 ${\bf x}_1 \not = {\bf 0}$ 滿足 $B{\bf x}_1 = {\bf 0}$, 則存在${\bf x}_1 \not = {\bf 0}$ ,使 $AB{\bf x}_1 = A{\bf 0} = {\bf 0}$ , 與前提 $\operatorname{ker}(AB) = \{{\bf 0}\}$ 矛盾 , 因此只有 ${\bf x} = {\bf 0}$ 滿足 $B{\bf x} = {\bf 0}$ , 所以 $\operatorname{ker}(B) = \{{\bf 0}\}$. 則根據 : **當 $M$ 為方陣時「$M$ 可逆」和「$\ker(M) = \{\bzero\}$」等價,** 因此 $B$ 也可逆。 2. 又如果有 ${\bf x}_2$ 使得 $A{\bf x}_2 = {\bf 0}$。 因為已知 $B$ 可逆,所以 $\Col(B) = \mathbb{R}^n$, 可假設 ${\bf x}_2 = B{\bf x}_3$ ,使 $A{\bf x}_2 = AB{\bf x}_3 = {\bf 0}$ 。 且 $\operatorname{ker}(AB) = \{{\bf 0}\}$. 因此當 $AB{\bf x}_3 = {\bf 0}$ 時,唯有 ${\bf x}_3 = {\bf 0}$ 成立, 則 ${\bf x}_2 = B{\bf x}_3$ ,${\bf x}_3$ 只能為 ${\bf 0}$ , 所以 ${\bf x}_2$ 只能為 $B{\bf 0} = {\bf 0}$, 因此 $A{\bf x}_2 = {\bf 0}$ ,唯有 ${\bf x}_2 = {\bf 0}$ 成立, 也就是說 $\operatorname{ker}(A) = \{{\bf 0}\}$. 則根據 : **當 $M$ 為方陣時「$M$ 可逆」和「$\ker(M) = \{\bzero\}$」等價,** 因此 $A$ 也可逆 。 **得證 : 若 $AB$ 可逆 ,則 $A$ 和 $B$ 都可逆。** ##### Exercise 2(d) 若 $A$ 可逆且 $B = A^{-1}$﹐ 則 $B$ 也可逆且 $A = B^{-1}$。 :::warning - [x] 因為$A^{-1}$可逆且反矩陣為$A$ , 又$B = A^{-1}$ 所以$B$ 也可逆且 $B^{-1} = A$。 --> 令 $B = A^{-1}$ 並改寫上式,可得 $$AB = BA = I_n$$ 所以$B$ 也可逆且 $B^{-1} = A$。 ::: ***Ans:*** 若 $A$ 可逆 則存在反矩陣 $A^{-1}$,使得 $$AA^{-1} = A^{-1}A = I_n$$ 令 $B = A^{-1}$ 並改寫上式,可得 $$AB = BA = I_n $$ 所以$B$ 也可逆且 $B^{-1} = A$。 ##### Exercise 2(e) 若 $A$ 可逆﹐ 則 $A^\top$ 也可逆且 $(A^\top)^{-1} = (A^{-1})^\top$。 :::warning - [x] 直接說明為什麼 $A\trans(A^{-1})\trans = (A^{-1})\trans A\trans = I_n$ 就好 ::: ***Ans:*** 因為 $A\trans(A^{-1})\trans=(A^{-1}A)^\top=I_n$ 且 $(A^{-1})\trans A\trans=(AA^{-1})^\top=I_n$, 所以 $A\trans$ 的反矩陣 $(A^\top)^{-1}$ 為$(A^{-1})\trans$。 先證: $(AB)^\top=(B^\top)(A^\top)$ $(AB)_{ij}$ = $\sum_{\substack{1\le k\le n}}$ $a_{ik} b_{kj}$ $\implies(AB)^\top_{ij} = (AB)_{ji}$ $=\sum_{\substack{1\le k\le n}}$ $a_{jk} b_{ki}$ $=\sum_{\substack{1\le k\le n}}$ $b_{ki} a_{jk}$ $=\sum_{\substack{1\le k\le n}}$ $(B^\top)_{ik} (A^\top)_{kj}$ $=((B^\top)(A^\top))_{ij}$。 ##### Exercise 3 令 $A$ 是一個 $m\times n$ 矩陣。 以下討論 $A^\top A$ 是否可逆。 ##### Exercise 3(a) 證明以下敘述等價: 1. $\operatorname{ker}(A) = \{{\bf 0}\}$(因此必有 $m\geq n$)。 2. $A^\top A$ 可逆。 ***Ans:*** 1. **先證 「$\operatorname{ker}(A) = \{{\bf 0}\}$」 可推得 「$A^\top A$ 可逆」。** 設 $\mathbb{R}^m$ 中存在向量 ${\bf w} , {\bf h}$ ,且 ${\bf w} \in \Col(A)$ , ${\bf h} \in \ker(A^\top)$ ,設向量 ${\bf v} = {\bf w} + {\bf h}$ 。 由於 ${\bf h} \in \ker(A^\top)$ , 也就是說 $A^\top {\bf h} = {\bf 0}$ , 則 $A^\top {\bf v} = A^\top ({\bf w} + {\bf h}) = A^\top {\bf w} + A^\top {\bf h} = A^\top {\bf w}$ 。 又因為 ${\bf w} \in \Col(A)$ , 因此可設 $\mathbb{R}^n$ 中存在向量 ${\bf b}$ ,滿足 ${\bf w} = A {\bf b}$ , 則 $A^\top {\bf v} = A^\top {\bf w} = A^\top A{\bf b}$。 又 ${\bf v}$ 可以為 $\mathbb{R}^m$ 中任意向量, 且 $\operatorname{ker}(A)$ 與 $\Col(A^\top)$ 互為垂直補集, 所以當 $\operatorname{ker}(A) = \{{\bf 0}\}$ 時, $\Col(A^\top) = \mathbb{R}^n$ , 因此 $A^\top {\bf v}$ 可以為 $\mathbb{R}^n$ 中任意向量。 則 $A^\top A {\bf b}$ 也可以為 $\mathbb{R}^n$ 中任意向量。 也就是說 $\Col(A^\top A) = \mathbb{R}^n$ 。 又 $A^\top A$ 是 $n \times n$ 矩陣, 因此 $A^\top A$ 可逆。 2. **再證 「$A^\top A$ 可逆」 可推得 「$\operatorname{ker}(A) = \{{\bf 0}\}$」。** **當 $M$ 為方陣時「$M$ 可逆」和「$\ker(M) = \{\bzero\}$」等價**, 因此若 $A^\top A$ 可逆,則 $\operatorname{ker}(A^\top A) = \{{\bf 0}\}$. 也就是說 $A^\top A{\bf x} = {\bf 0}$,只有 ${\bf 0}$ 帶入${\bf x}$時成立。 且已知 $A^\top {\bf 0} = {\bf 0} , A{\bf 0} = {\bf 0}$ , 因此若有其他 ${\bf x}_1 \not = {\bf 0}$ 滿足 $A{\bf x}_1 = {\bf 0}$ , 則存在 ${\bf x}_1 \not = {\bf 0}$ ,使 $A^\top A{\bf x}_1 = A^\top {\bf 0} = {\bf 0}$ , 與前提 $\operatorname{ker}(A^\top A) = \{{\bf 0}\}$ 矛盾, 因此只有 ${\bf x} = {\bf 0}$ 滿足 $A{\bf x} = {\bf 0}$ , 也就是說 $\operatorname{ker}(A) = \{{\bf 0}\}$. **得證 「$\operatorname{ker}(A) = \{{\bf 0}\}$」 等價於 「$A^\top A$ 可逆」。** 另解 **[由張朔祐同學提供]** **Ans:** 首先我們證明 $\ker(A) = \ker(A\trans A)$。 令 $\bv\in\ker(A)$,則 $A\bv = \bzero$。 所以 $A^\top A\bv = A\trans\bzero = \bzero$。 如此說明了 $\operatorname{ker}(A)$ 包含於 $\operatorname{ker}(A^\top A)$。 假設 $\bv$ 屬於 $\operatorname{ker}(A^\top A)$, 所以 $A^\top A\bv=\bzero$。 在兩邊最左邊同乘 $\bv^\top$, 即為 $(\bv^\top A^\top) A\bv=0$, 而 $(\bv^\top A^\top)=(A\bv)^\top$。 因為 $0 = (A\bv)\trans A\bv = \inp{A\bv}{A\bv} = \|A\bv\|^2$, 所以 $A\bv = \bzero$。 說明了 $\operatorname{ker}(A^\top A)$ 包含於 $\operatorname{ker}(A)$。 因為 $\operatorname{ker}(A)$ 和 $\operatorname{ker}(A^\top A)$互相包於所以得證 $\operatorname{ker}(A^\top A) =\operatorname{ker}(A)$。 **從 1 推到 2** 因為 $\operatorname{ker}(A) = \operatorname{ker}(A^\top A)$, 又 $\operatorname{ker}(A)=\{{\bf 0}\}=\operatorname{ker}(A^\top A)$, 得證$A^\top A$ 可逆。 **再從 2 推到 1** 因為 $A^\top A$ 可逆, 所以 $\operatorname{ker}(A^\top A)=\{{\bf 0}\}$, 又 $\operatorname{ker}(A^\top A) = \operatorname{ker}(A)=\{{\bf 0}\}$, 得證 $A^\top A$ 可逆則 $\operatorname{ker}(A) = \{{\bf 0}\}$。 ##### Exercise 3(b) 證明若 $m < n$ 則 $A^\top A$ 不可逆。 ***Ans:*** 當 $m < n$ 時, $A$ 經過列運算後得出的最簡階梯式中,必有自由變數, 因此 $\ker(A) \not = \{{\bf 0}\}.$ 因此必有 ${\bf x} \not = {\bf 0}$ ,使 $A{\bf x} = {\bf 0}.$ 且已知 $A^\top {\bf 0} ={\bf 0}$ , 則 必有 ${\bf x} \not = {\bf 0}$ ,使 $A^\top A{\bf x} = A^\top {\bf 0} = {\bf 0}.$ 也就是說 $\ker(A^\top A) \not = \{{\bf 0}\}.$ 且 $A^\top A$ 是 $n \times n$ 矩陣, 因此根據 : **當 $M$ 為方陣時「$M$ 可逆」和「$\ker(M) = \{\bzero\}$」等價,** $A^\top A$ 不可逆。 ##### Exercise 4 令 $A$ 和 $B$ 為 $n\times n$ 矩陣。 依照以下步驟證明 若 $AB = I_n$ 則 $BA = I_n$。 ##### Exercise 4(a) 若 $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]$。 :::warning - [x] 前提是 $AB = I$,但你們用到的是 $BA = I$。 ::: ***Ans:*** 令$$B = \begin{bmatrix} | & ~ & | \\ \bv_1 & \cdots & \bv_n \\ | & ~ & | \\ \end{bmatrix}$$ $AB=I_n$ 看成 $$A\begin{bmatrix} | & ~ & | \\ \bv_1 & \cdots & \bv_n \\ | & ~ & | \\ \end{bmatrix}=\begin{bmatrix} | & ~ & | \\ {\bf e}_1 & \cdots & {\bf e}_n \\ | & ~ & | \\ \end{bmatrix}, $$ 也就是對任何 $i = 1,\ldots, n$ 都有 $A\bv_i = \be_i$。 另一方面,從 $$\left[\begin{array}{c|c} A & I_n \end{array}\right] $$ 可化簡得到 $$\left[\begin{array}{c|c} I_n & B \end{array}\right]$$ 這個結果可以看出 $B$ 的第 $i$ 行就是, $A\bx = \be_i$ 的解,也就是 $\bx=\bv_i$。 :::info **以下論證可以說明** 若 $BA = I_n$ 則增廣矩陣 $\left[\begin{array}{c|c} A & I_n \end{array}\right]$ 的最簡階梯形式矩陣 一定是 $\left[\begin{array}{c|c} I_n & B \end{array}\right]$。 (搭配這題要證的,就可以說明左反矩陣等於右反陣。 **論證:** 因為 $A$ 有反矩陣 所以 $A$ 亦是 nonsingular 因此 $A$ 的最簡矩陣是 $I_n$ 每次 $A$ 經過一次列運算都會有一個基本矩陣 $E$ $E_k\dots E_1A$=$I_n$$\implies$$I_n=E_1^{-1}\dots E_K^{-1}I_n$ 可知$B=E_1^{-1}\dots E_K^{-1}$ 得證$\left[\begin{array}{c|c} A & I_n \end{array}\right]$ 的最簡階梯形式矩陣為$\left[\begin{array}{c|c} I_n & B \end{array}\right]$ ::: ##### Exercise 4(b) 令 ${\bf e}_i$ 為 $I_n$ 的第 $i$ 個行向量。 令 ${\bf a}_i$ 為 $A$ 的第 $i$ 個行向量。 說明對每個 $i = 1,\ldots, n$ 都有 $$\left[\begin{array}{c|c} A & I_n \end{array}\right] \begin{bmatrix} {\bf e}_i \\ -{\bf a}_i \end{bmatrix} = {\bf 0},$$ 因此也有 $$\left[\begin{array}{c|c} I_n & B \end{array}\right] \begin{bmatrix} {\bf e}_i \\ -{\bf a}_i \end{bmatrix} = {\bf 0}. $$ :::warning - [x] 可以把一些 $\cdots$ 改成 $\vdots$ 或 $\ddots$ - [x] 有數學式打錯 ::: ***Ans:*** $$\left[\begin{array}{c|c} A & I_n \end{array}\right] \begin{bmatrix} {\bf e}_i \\ -{\bf a}_i \end{bmatrix} = {\bf 0}$$ 可寫成 $$\left[\begin{array}{cccc|ccccc} a_{11} & a_{12} & \ldots & a_{1n} & 1 & 0 & 0 & \ldots & 0 \\ a_{21} & a_{22} & \ldots & a_{2n} & 0 & 1 & 0 & \ldots & 0 \\ a_{31} & a_{32} & \ldots & a_{3n} & 0 & 0 & 1 & \ldots & 0 \\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \ldots & a_{nn} & 0 & 0 & 0 & \cdots & 1 \end{array}\right] \begin{bmatrix} 0 \\ 0 \\ \vdots \\0 \\ 1 \\ 0 \\ \vdots \\ 0 \\ 0 \\ -a_{1i} \\ -a_{2i} \\ \vdots \\ -a_{ni} \end{bmatrix} = \bzero.$$ 由此可知 $$a_{1i}-a_{1i}+a_{2i}-a_{2i}+\ldots+a_{ii}-a_{ii}+0+0+\ldots+0=0,$$ 因此$$\left[\begin{array}{c|c} A & I_n \end{array}\right] \begin{bmatrix} {\bf e}_i \\ -{\bf a}_i \end{bmatrix} = {\bf 0},$$ 又已知$\left[\begin{array}{c|c} A & I_n \end{array}\right]$ 的最簡階梯形式矩陣為 $$\left[\begin{array}{c|c} I_n & B \end{array}\right],$$ 故可知$$\left[\begin{array}{c|c} I_n & B \end{array}\right] \begin{bmatrix} {\bf e}_i \\ -{\bf a}_i \end{bmatrix} = {\bf 0}. $$ ##### Exercise 4(c) 因為對每個 $i = 1,\ldots, n$ 都有 $$\left[\begin{array}{c|c} I_n & B \end{array}\right] \begin{bmatrix} {\bf e}_i \\ -{\bf a}_i \end{bmatrix} = {\bf 0}. $$ 說明對每個 $i = 1,\ldots, n$ 都有 $B{\bf a}_i = {\bf e}_i$、 因此 $BA = I_n$。 :::warning - [x] 有數學式打錯 ::: ***Ans:*** $$\left[\begin{array}{c|c} I_n & B \end{array}\right] \begin{bmatrix} {\bf e}_i \\ -{\bf a}_i \end{bmatrix} = {\bf 0}. $$ 可寫成 $$\left[\begin{array}{ccccc|cccc} 1 & 0 & 0 & \ldots & 0 & b_{11} & b_{12} & \ldots & b_{1n} \\ 0 & 1 & 0 & \ldots & 0 & b_{21} & b_{22} & \ldots & b_{2n}\\ 0 & 0 & 1 & \ldots & 0 & b_{31} & b_{32} & \ldots & b_{3n}\\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & 0 & \ldots & 1 & b_{n1} & b_{n2} & \ldots & b_{nn}\end{array}\right]\begin{bmatrix} 0 \\ 0 \\ \vdots \\ 0 \\ 1 \\ 0 \\ \vdots \\ 0 \\ 0 \\ -a_{1i} \\ -a_{2i} \\ \vdots \\ -a_{ni} \end{bmatrix}= \bzero,$$ 由此可知 $$\begin{cases} -b_{11} a_{1i}-b_{12} a_{2i}-b_{13}a_{3i}- \ldots -b_{ii} a_{ii} =0 \\ -b_{21}a_{1i}-b_{22}a_{2i}-b_{23}a_{3i}- \ldots -b_{2i}a_{ii}=0 \\ \vdots \\ 1-b_{i1}a_{1i}-b_{i2}a_{2i}-b_{i3}a_{3i}- \ldots -b_{ii}a_{ii}=1\\ \vdots \\ -b_{ni}a_{1i}-b_{n2}a_{2i}-b_{n3}a_{3i}- \ldots -b_{ni}a_{ii}=0\end{cases}$$ 因此 $$B{\bf a}_{i}={\bf e}_{i},$$ 又由 $$\left[\begin{array}{c|c} A & I_n \end{array}\right] \begin{bmatrix} {\bf e}_i \\ -{\bf a}_i \end{bmatrix} = {\bf 0},$$ 可知 $$A{\bf e}_{i}={\bf a}_i,$$ 則 $$BA {\bf e}_i={\bf e}_i,$$ 因此 $$BA=I_n。$$ ##### Exercise 4(d) 找一組例子使得 $A$ 是 $n\times m$ 矩陣、 $B$ 是 $m\times n$ 矩陣、 $AB = I_n$、 但是 $BA \neq I_m$。 ***Ans:*** 當 $A = \begin{bmatrix} 1 & 4 & 0 \\ -1 & 1 & 1 \end{bmatrix}.$ 且 $B = \begin{bmatrix} -5 & 0 \\ -1 & 0 \\ 6 & 1 \end{bmatrix}.$ 則 $AB = \begin{bmatrix} 1 & 4 & 0 \\ -1 & 1 & 1 \end{bmatrix}\begin{bmatrix} -5 & 0 \\ -1 & 0 \\ 6 & 1 \end{bmatrix}=\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}.$ 但 $BA = \begin{bmatrix} 5 & 0 \\ -1 & 0 \\ 6 & 1 \end{bmatrix}\begin{bmatrix} 1 & 4 & 0 \\ -1 & 1 & 1 \end{bmatrix}=\begin{bmatrix} 5 & 20 & 0 \\ -1 & -4 & 0 \\ 5 & 25 & 1 \end{bmatrix}.$ ##### Exercise 5 令 $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$ 且 $\det(A) \neq 0$。 證明 $A^{-1} = \frac{1}{\det(A)}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}$。 :::info 其實可以直接拿 $A$ 和 $A^{-1}$ 相乘就好。 ::: ***Ans:*** **當 $ad \neq 0$ 時**, $a \neq 0 , d \neq 0$ 。 以列運算求 $A^{-1}$ $$\left[\begin{array}{cc|cc} a & b & 1 & 0\\ c & d & 0 & 1 \end{array}\right]. $$ 將第二列乘上 $a$ $$\left[\begin{array}{cc|cc} a & b & 1 & 0\\ ac & ad & 0 & a \end{array}\right]. $$ 第二列減去第一列乘以 $c$ $$\left[\begin{array}{cc|cc} a & b & 1 & 0\\ 0 & ad-bc & -c & a \end{array}\right]. $$ 第二列除以 $ad-bc$ $$\left[\begin{array}{cc|cc} a & b & 1 & 0\\ 0 & 1 & \frac{-c}{ad-bc} & \frac{a}{ad-bc} \end{array}\right]. $$ 第一列減去第二列乘以 $b$ $$\left[\begin{array}{cc|cc} a & 0 & \frac{ad}{ad-bc} & \frac{-ab}{ad-bc}\\ 0 & 1 & \frac{-c}{ad-bc} & \frac{a}{ad-bc} \end{array}\right]. $$ 第一列除以 $a$ $$\left[\begin{array}{cc|cc} 1 & 0 & \frac{d}{ad-bc} & \frac{-b}{ad-bc}\\ 0 & 1 & \frac{-c}{ad-bc} & \frac{a}{ad-bc} \end{array}\right]. $$ 得 $$A^{-1} = \left[\begin{array}{cc} \frac{d}{ad-bc} & \frac{-b}{ad-bc}\\ \frac{-c}{ad-bc} & \frac{a}{ad-bc} \end{array}\right] = \frac{1}{ad-bc} \left[\begin{array}{cc} d & -b\\ -c & a \end{array}\right] = \frac{1}{\det(A)} \left[\begin{array}{cc} d & -b\\ -c & a \end{array}\right]. $$ **當 $ad = 0$ 時**, 因為 $\det(A) \neq 0$ $$ad-bc = 0-bc = -bc \neq 0.$$ 因此 $b \neq 0 , c \neq 0$ 。 以列運算求 $A^{-1}$ $$\left[\begin{array}{cc|cc} a & b & 1 & 0\\ c & d & 0 & 1 \end{array}\right]. $$ 將第一列與第二列互換 $$\left[\begin{array}{cc|cc} c & d & 0 & 1\\ a & b & 1 & 0 \end{array}\right]. $$ 第二列乘上 $c$ $$\left[\begin{array}{cc|cc} c & d & 0 & 1\\ ac & bc & c & 0 \end{array}\right]. $$ 第二列減去第一列乘以 $a$ $$\left[\begin{array}{cc|cc} c & d & 0 & 1\\ 0 & -(ad-bc) & c & -a \end{array}\right]. $$ 第二列除以 $-(ad-bc)$ $$\left[\begin{array}{cc|cc} c & d & 0 & 1\\ 0 & 1 & \frac{-c}{ad-bc} & \frac{a}{ad-bc} \end{array}\right]. $$ 第一列減去第二列乘以 $d$ $$\left[\begin{array}{cc|cc} c & 0 & \frac{cd}{ad-bc} & \frac{-bc}{ad-bc}\\ 0 & 1 & \frac{-c}{ad-bc} & \frac{a}{ad-bc} \end{array}\right]. $$ 第一列除以 $c$ $$\left[\begin{array}{cc|cc} 1 & 0 & \frac{d}{ad-bc} & \frac{-b}{ad-bc}\\ 0 & 1 & \frac{-c}{ad-bc} & \frac{a}{ad-bc} \end{array}\right]. $$ 得 $$A^{-1} = \left[\begin{array}{cc} \frac{d}{ad-bc} & \frac{-b}{ad-bc}\\ \frac{-c}{ad-bc} & \frac{a}{ad-bc} \end{array}\right] = \frac{1}{ad-bc} \left[\begin{array}{cc} d & -b\\ -c & a \end{array}\right] = \frac{1}{\det(A)} \left[\begin{array}{cc} d & -b\\ -c & a \end{array}\right]. $$ 因此無論 $ad$ 是否為 $0$ , $$A^{-1} = \frac{1}{\det(A)} \left[\begin{array}{cc} d & -b\\ -c & a \end{array}\right]. $$ :::info 很有想法,也都近乎正確 目前分數 6.5/5 :::

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully