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
    • 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 Versions and GitHub Sync Note Insights 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 矩陣指數 ![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/). $\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}}$ ```python from lingeo import random_int_list ``` ## Main idea We know the exponential function can be written as $$ e^x = \frac{1}{0!} + \frac{1}{1!}x + \frac{1}{2!}x^2 + \cdots. $$ In a similar way, the **matrix exponential** of a square matrix $A$ is defined as $$ e^A = \frac{1}{0!}I + \frac{1}{1!}A + \frac{1}{2!}A^2 + \cdots. $$ The computation of the matrix exponential can be a tedious work, at least by hand. However, when $D$ is a diagonal matrix, its matrix exponential can be easily obtained by $$ \begin{aligned} e^D &= \frac{1}{0!}I + \frac{1}{1!}D + \frac{1}{2!}D^2 + \cdots \\ &= \frac{1}{0!} \begin{bmatrix} 1 & ~ & ~ \\ ~ & \ddots & ~ \\ ~ & ~ & 1 \end{bmatrix} + \frac{1}{1!} \begin{bmatrix} \lambda_1 & ~ & ~ \\ ~ & \ddots & ~ \\ ~ & ~ & \lambda_n \end{bmatrix} + \frac{1}{2!} \begin{bmatrix} \lambda_1^2 & ~ & ~ \\ ~ & \ddots & ~ \\ ~ & ~ & \lambda_n^2 \end{bmatrix} + \cdots \\ &= \begin{bmatrix} \frac{1}{0!} + \frac{1}{1!}\lambda_1 + \frac{1}{2!}\lambda_1^2 + \cdots & ~ & ~ \\ ~ & \ddots & ~ \\ ~ & ~ & \frac{1}{0!} + \frac{1}{1!}\lambda_n + \frac{1}{2!}\lambda_n^2 + \cdots \end{bmatrix} \\ &= \begin{bmatrix} e^{\lambda_1} & ~ & ~ \\ ~ & \ddots & ~ \\ ~ & ~ & e^{\lambda_n} \end{bmatrix}. \end{aligned} $$ Moreover, suppose $A$ is diagonalizable as $D = Q^{-1}AQ$ and $A = QDQ^{-1}$. Then the matrix exponential can be computed as $$ \begin{aligned} e^A &= \frac{1}{0!}I + \frac{1}{1!}A + \frac{1}{2!}A^2 + \cdots \\ &= \frac{1}{0!}I + \frac{1}{1!}QAQ^{-1} + \frac{1}{2!}QA^2Q^{-1} + \cdots \\ &= Q\left(\frac{1}{0!}I + \frac{1}{1!}D + \frac{1}{2!}D^2 + \cdots \right)Q^{-1} \\ &= Qe^DQ^{-1}. \end{aligned} $$ ## Side stories - Taylor expansion - Cayley transform - solution to $\dot{\bx} = A\bx$ ## Experiments ##### Exercise 1 執行以下程式碼。 令 $s_k = \sum_{r = 0}^k \frac{1}{r!}A^r$ 為計算 $e^A$ 時的部份和。 定義 $\|B - C\|^2$ 為 $B - C$ 矩陣各項的平方和。 ```python ### code set_random_seed(0) print_ans = False n = 2 A = matrix(n, random_int_list(n^2, 3)) pretty_print(LatexExpr("A ="), A) tk = [identity_matrix(n), A] for k in range(2,16): tk.append(tk[-1] * A / k) sk = tk[:1] for k in range(1,16): sk.append(sk[-1] + tk[k]) pretty_print(LatexExpr("s_{5} ="), N(sk[5])) pretty_print(LatexExpr("s_{10} ="), N(sk[10])) pretty_print(LatexExpr("s_{15} ="), N(sk[15])) if print_ans: print("| s5 - s10 |^2 =", (sk[5] - sk[10]).norm("frob")) print("| s10 - s15 |^2 =", (sk[10] - sk[15]).norm("frob")) ``` ##### Exercise 1(a) 計算 $\|s_5 - s_{10}\|^2$。 :::warning - [x] 用 `aligned` 環境將等號對齊 - [x] 把長度符號拉高 $\left\| \begin{bmatrix} 15.9417 & −3.3\\ 3.3 & −0.5583\\ \end{bmatrix} - \begin{bmatrix} 17.0342 & −3.5204\\ 3.5204 & −0.568\\ \end{bmatrix} \right\|^2$ ::: $Ans:$ 當 `seed=1` 時, $A = \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}$, $$ \begin{aligned}s_5 = \sum_{r = 0}^5 \frac{1}{r!}A^r &= \frac 1 {0!} \begin{bmatrix} 1 & 0\\ 0 & 1\\ \end{bmatrix} + \frac 1 {1!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix} + \frac 1 {2!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^2 + \frac 1 {3!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^3 + \frac 1 {4!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^4 + \frac 1 {5!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^5\\ &= \begin{bmatrix} 15.9417 & −3.3\\ 3.3 & −0.5583\\ \end{bmatrix} \end{aligned} $$ $$ \begin{aligned}s_{10} = \sum_{r = 0}^{10} \frac{1}{r!}A^r &= \frac 1 {0!} \begin{bmatrix} 1 & 0\\ 0 & 1\\ \end{bmatrix} + \frac 1 {1!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix} + \frac 1 {2!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^2 + \cdots + \frac 1 {9!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^9 + \frac 1 {10!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^{10}\\ &= \begin{bmatrix} 17.0342 & −3.5204\\ 3.5204 & −0.568\\ \end{bmatrix} \end{aligned} $$ $$ \left\|s_5 - s_{10}\right\|^2= \left\| \begin{bmatrix} 15.9417 & −3.3\\ 3.3 & −0.5583\\ \end{bmatrix} - \begin{bmatrix} 17.0342 & −3.5204\\ 3.5204 & −0.568\\ \end{bmatrix} \right\|^2 = \left\|\begin{bmatrix} -1.0925 & 0.2204\\ -0.2204 & 0.0097\\ \end{bmatrix} \right\|^2 = 1.1361 $$ ##### Exercise 1(b) 計算 $\|s_{10} - s_{15}\|^2$。 :::warning - [x] 同上題 ::: $Ans:$ 當 `seed=1` 時, $A = \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}$ $$ \begin{aligned}s_{10} = \sum_{r = 0}^{10} \frac{1}{r!}A^r &= \frac 1 {0!} \begin{bmatrix} 1 & 0\\ 0 & 1\\ \end{bmatrix} + \frac 1 {1!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix} + \frac 1 {2!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^2 + \cdots + \frac 1 {9!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^9 + \frac 1 {10!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^{10}\\ &= \begin{bmatrix} 17.0342 & −3.5204\\ 3.5204 & −0.568\\ \end{bmatrix} \end{aligned} $$ $$ \begin{aligned}s_{15} = \sum_{r = 0}^{15} \frac{1}{r!}A^r &= \frac 1 {0!} \begin{bmatrix} 1 & 0\\ 0 & 1\\ \end{bmatrix} + \frac 1 {1!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix} + \frac 1 {2!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^2 + \cdots + \frac 1 {14!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^{14} + \frac 1 {15!} \begin{bmatrix} 3 & -1\\ 1 & -2\\ \end{bmatrix}^{15}\\ &= \begin{bmatrix} 17.0369 & −3.521\\ 3.521 & −0.5681\\ \end{bmatrix} \end{aligned} $$ $$ \left\|s_{10} - s_{15}\right\|^2= \left\| \begin{bmatrix} 17.0342 & −3.5204\\ 3.5204 & −0.568\\ \end{bmatrix} - \begin{bmatrix} 17.0369 & −3.521\\ 3.521 & −0.5681\\ \end{bmatrix} \right\|^2 = \left\|\begin{bmatrix} -0.0027 & 0.0006\\ -0.0006 & 0.0001\\ \end{bmatrix} \right\|^2 = 0.0028 $$ ##### Remark 在高等微積分會算到,在一個完備的空間裡 (像是 $\mathbb{R}$ 或是 $\mathbb{R}^n$ 或是跟矩陣長很像的 $\mathbb{R}^{n^2}$), 如果一個數列有 $\| s_n - s_m \|$ 隨著 $n,m$ 變大而距離愈來愈小, 則 $s_n$ 數列會收斂。 ## Exercises ##### Exercise 2 令 $O_n$ 為 $n\times n$ 的零矩陣,用定義計算 $e^{O_n}$。 :::warning - [x] $a_n$ 為什麼不寫矩陣 $A$ 就好? - [x] 零矩陣用 $O_n$ ::: $Ans:$ 依照定義 $e^A$ 為 $$ e^A = \frac 1 {0!}I + \frac 1 {1!}A + \frac 1 {2!} A^2 + \frac 1 {3!} A^3 +\cdots. $$ 因此 $e^{O_n}$ 為 $$ e^{O_n} = \frac 1 {0!}I + \frac 1 {1!} {O_n} + \frac 1 {2!} {O_n}^2 + \frac 1 {3!} {O_n}^3 +\cdots = I_n + O_n + O_n + O_n + \cdots = I_n. $$ ##### Exercise 3 令 $$ A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}. $$ 依照以下步驟求出 $e^{tA}$,其中 $t$ 是變數。 ##### Exercise 3(a) 計算 $A, A^2, A^3, A^4$ 並找出 $A^n$ 的規律。 :::warning - [x] 中文字不要丟在數學模式裡 - [x] 標點 - [x] 中英數之間空格 ::: $Ans:$ $$ A= \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}, A^2=\begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}=-I, $$ $$ A^3=\begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}=-A, A^4=\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}=I。 $$ $A^n$ 規律 $:n$ 取連續四個為一循環。 ##### Exercise 3(b) 利用定義求出 $e^{tA}$,並 $t$ 在旋轉矩陣中扮演的角色。 :::warning - [x] 偶數項的第二行的第二個等式不對 $I[\frac{1}{0!} + \frac{-t^2}{2!} +\cdots] \neq I \begin{bmatrix} \frac{e^t+e^{-t}}{2} \\ \end{bmatrix}$ 奇數項也有同樣的狀況 - [x] 中文字不要丟在數學模式裡 - [x] 標點 - [x] 中英數之間空格 - [x] $cos$ --> $\cos$ - [x] $sin$ --> $\sin$ ::: $Ans:$ $$ e^{tA} = \frac {1} {0!} I + \frac {t} {1!} A + \frac {t^2} {2!} A^2 + \frac {t^3} {3!} A^3 +\cdots. $$ 可拆成奇數項與偶數項, 偶數項: $$ \begin{aligned} &= \frac {1} {0!} I + \frac {t^2} {2!} A^2 +\cdots \\ &=I [\frac {1} {0!} + \frac {-t^2} {2!} +\cdots] \\ &= I \cos t \end{aligned} $$ 奇數項: $$ \begin{aligned} &= \frac {t} {1!} A + \frac {t^3} {3!} A^3 + \cdots\\ &= A [\frac {t} {1!} + \frac {-t^3} {3!} + \cdots]\\ &= A \sin t \end{aligned} $$ 總和可表示成 $e^{tA} = I\cos t+A \sin t$, 帶入 $I$ 與 $A$ 矩陣 $=\begin{bmatrix} \cos t & -\sin t \\ \sin t&\cos t\\ \end{bmatrix}$, $t$ 為旋轉矩陣的角度。 ##### Exercise 4 對以下矩陣 $A$ 求出 $e^A$。 ##### Exercise 4(a) 已知 $$ \begin{bmatrix} 4 & 0 \\ 0 & 6 \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}^{-1} \begin{bmatrix} 5 & -1 \\ -1 & 5 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}. $$ 令 $$ A = \begin{bmatrix} 5 & -1 \\ -1 & 5 \end{bmatrix}. $$ :::warning - [x] 加文字敘述 - [x] $Q$ 是什麼 ::: $Ans:$ 題目以 $D = Q^{-1} A Q$ 形式來看,$Q$ 為一可逆矩陣,使得 $A = Q D Q^{-1}$ , $D$ 是對角矩陣, 則 $e^A = Qe^DQ^{-1}$。 $$ \begin{bmatrix} 5 & -1 \\ -1 & 5 \end{bmatrix} = \begin{bmatrix} 1 &1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} 4 & 0 \\ 0 & 6 \end{bmatrix} \begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix}^{-1} $$ $$ A = QDQ^{-1},Q = \begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix} $$ $$ e^A = Qe^DQ^{-1}=\begin{bmatrix} 1 &1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} e^4 & 0 \\ 0 & e^6 \end{bmatrix} \begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix}^{-1} $$ $$ =\begin{bmatrix} \frac{e^4+e^6}{2} & \frac{e^4-e^6}{2} \\ \frac{-e^4-e^6}{2} & \frac{e^4+e^6}{2} \\ \end{bmatrix} . $$ ##### Exercise 4(b) 已知 $$ \begin{bmatrix} 4 & 0 \\ 0 & -6 \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}^{-1} \begin{bmatrix} -1 & 5 \\ 5 & -1 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}. $$ 令 $$ A = \begin{bmatrix} -1 & 5 \\ 5 & -1 \end{bmatrix}. $$ :::warning - [x] 同上題 ::: $Ans:$ 題目以 $D = Q^{-1} A Q$ 形式來看,$Q$ 為一可逆矩陣,使得 $A = Q D Q^{-1}$ , $D$ 是對角矩陣, 則 $e^A = Qe^DQ^{-1}$。 $$ \begin{bmatrix} -1 & 5 \\ 5 & -1 \end{bmatrix} = \begin{bmatrix} 1 &1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} 4 & 0 \\ 0 & -6 \end{bmatrix} \begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix}^{-1} $$ $$ A = QDQ^{-1},Q =\begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix} $$ $$ e^A = Qe^DQ^{-1}=\begin{bmatrix} 1 &1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} e^4 & 0 \\ 0 & e^{-6} \end{bmatrix} \begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix}^{-1} $$ $$ =\begin{bmatrix} \frac{-e^4-e^{-6}}{2} & \frac{-e^4+e^{-6}}{2} \\ \frac{-e^4+e^{-6}}{2} & \frac{-e^4-e^{-6}}{2} \\ \end{bmatrix} . $$ ##### Exercise 4(c) 已知 $$ \begin{bmatrix} 2 & 0 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}^{-1} \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}. $$ 令 $$ A = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}. $$ :::warning - [x] 同上題 ::: $Ans:$ 題目以 $D = Q^{-1} A Q$ 形式來看,$Q$ 為一可逆矩陣,使得 $A = Q D Q^{-1}$ , $D$ 是對角矩陣, 則 $e^A = Qe^DQ^{-1}$。 $$ \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 1 &1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix}^{-1} $$ $$ A = QDQ^{-1},Q = \begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix} $$ $$ e^A = Qe^DQ^{-1}=\begin{bmatrix} 1 &1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} e^2 & 0 \\ 0 & e^0 \end{bmatrix} \begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix}^{-1} $$ $$ =\begin{bmatrix} \frac{-e^2-1}{2} & \frac{-e^2+1}{2} \\ \frac{-e^2+1}{2} & \frac{-e^2-1}{2} \\ \end{bmatrix} . $$ :::warning - [x] 同上題 ::: ##### Exercise 5 對以下矩陣 $A$ 求出 $e^A$。 ##### Exercise 5(a) 已知 $$ \begin{bmatrix} 3 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 6 \end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix}^{-1} \begin{bmatrix} 4 & 0 & -1 \\ 0 & 4 & -1 \\ -1 & -1 & 5 \end{bmatrix} \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix}. $$ 令 $$ A = \begin{bmatrix} 4 & 0 & -1 \\ 0 & 4 & -1 \\ -1 & -1 & 5 \end{bmatrix}. $$ :::warning - [x] 同上題 ::: $Ans:$ 題目以 $D = Q^{-1} A Q$ 形式來看,$Q$ 為一可逆矩陣,使得 $A = Q D Q^{-1}$ , $D$ 是對角矩陣, 則 $e^A = Qe^DQ^{-1}$。 $$ \begin{bmatrix} 4 & 0 & -1 \\ 0 & 4 & -1 \\ -1 & -1 & 5 \end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix} \begin{bmatrix} 3 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 6 \end{bmatrix} \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix}^{-1}. $$ $$ A = QDQ^{-1},Q = \begin{bmatrix} 1 & 1 & 1\\ 1 & -1 & 1\\ 1 & 0 & -2 \end{bmatrix} $$ $$ e^A = Qe^DQ^{-1}=\begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix} \begin{bmatrix} e^3 & 0 & 0 \\ 0 & e^4 & 0 \\ 0 & 0 & e^6 \end{bmatrix} \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix}^{-1} $$ $$ =\begin{bmatrix} \frac{e^3}{3}+\frac{e^4}{2}+\frac{e^6}{6} & \frac{e^3}{3}-\frac{e^4}{2}+\frac{e^6}{6} & \frac{e^3}{3}-\frac{e^6}{3} \\ \frac{e^3}{3}-\frac{e^4}{2}+\frac{e^6}{6} & \frac{e^3}{3}+\frac{e^4}{2}+\frac{e^6}{6} & \frac{e^3}{3}-\frac{e^6}{3} \\ \frac{e^3}{3}-\frac{e^6}{3} & \frac{e^3}{3}-\frac{e^6}{3} & \frac{e^3}{3}-\frac{2e^6}{3} \end{bmatrix} . $$ ##### Exercise 5(b) 已知 $$ \begin{bmatrix} 3 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & -6 \end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix}^{-1} \begin{bmatrix} 2 & -2 & 3 \\ -2 & 2 & 3 \\ 3 & 3 & -3 \end{bmatrix} \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix}. $$ 令 $$ A = \begin{bmatrix} 2 & -2 & 3 \\ -2 & 2 & 3 \\ 3 & 3 & -3 \end{bmatrix}. $$ :::warning - [x] 同上題 ::: $Ans:$ 題目以 $D = Q^{-1} A Q$ 形式來看,$Q$ 為一可逆矩陣,使得 $A = Q D Q^{-1}$ , $D$ 是對角矩陣, 則 $e^A = Qe^DQ^{-1}$。 $$ \begin{bmatrix} 2 & -2 & 3 \\ -2 & 2 & 3 \\ 3 & 3 & -3 \end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix} \begin{bmatrix} 3 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & -6 \end{bmatrix} \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix}^{-1} , $$ $$ A = QDQ^{-1},Q = \begin{bmatrix} 1 & 1 & 1\\ 1 & -1 & 1\\ 1 & 0 & -2 \end{bmatrix} $$ $$ e^A = Qe^DQ^{-1}=\begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix} \begin{bmatrix} e^3 & 0 & 0 \\ 0 & e^4 & 0 \\ 0 & 0 & e^{-6} \end{bmatrix} \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 0 & -2 \end{bmatrix}^{-1} $$ $$ =\begin{bmatrix} \frac{e^3}{3}+\frac{e^4}{2}+\frac{e^{-6}}{6} & \frac{e^3}{3}-\frac{e^4}{2}+\frac{e^{-6}}{6} & \frac{e^3}{3}-\frac{e^{-6}}{3} \\ \frac{e^3}{3}-\frac{e^4}{2}+\frac{e^{-6}}{6} & \frac{e^3}{3}+\frac{e^4}{2}+\frac{e^{-6}}{6} & \frac{e^3}{3}-\frac{e^{-6}}{3} \\ \frac{e^3}{3}-\frac{e^{-6}}{3} & \frac{e^3}{3}-\frac{e^{-6}}{3} & \frac{e^3}{3}-\frac{2e^{-6}}{3} \end{bmatrix} . $$ ##### Exercise 6 對以下矩陣 $A$ 求出 $e^A$。 ##### Exercise 6(a) 已知 $$ \begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 3 & 2 \end{bmatrix}^{-1} \begin{bmatrix} 0 & 1 \\ -6 & 5 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 3 & 2 \end{bmatrix}. $$ 令 $$ A = \begin{bmatrix} 0 & 1 \\ -6 & 5 \end{bmatrix}. $$ :::warning - [x] 同上題 ::: $Ans:$ Let $$ A = QDQ^{-1} = \begin{bmatrix} 1 & 1 \\ 3 & 2 \\ \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & 3 \\ \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 3 & 2 \\ \end{bmatrix}^{-1}$$,where$$Q=\begin{bmatrix} 1 & 1 \\ 3 & 2 \\ \end{bmatrix}. $$ Then we have$$ e^A = Qe^DQ^{-1} = \begin{bmatrix} 1 & 1 \\ 3 & 2 \\ \end{bmatrix} \begin{bmatrix} e^2 & 0 \\ 0 & e^3 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 3 & 2 \\ \end{bmatrix}^{-1}\\ = \begin{bmatrix} -2e^2+3e^3 & {e^2}-e^3 \\ -6e^2+6e^3 & 3e^2-2e^3 \\ \end{bmatrix} . $$ ##### Exercise 6(b) 已知 $$ \begin{bmatrix} 2 & 0 \\ 0 & -2 \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 2 & -2 \end{bmatrix}^{-1} \begin{bmatrix} 0 & 1 \\ -4 & 0 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 2 & -2 \end{bmatrix}. $$ 令 $$ A = \begin{bmatrix} 0 & 1 \\ -4 & 0 \end{bmatrix}. $$ :::warning - [x] 同上題 ::: $Ans:$ Let$$A = QDQ^{-1}= \begin{bmatrix} 1 & 1 \\ 2 & -2 \\ \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & -2 \\ \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 2 & -2 \\ \end{bmatrix}^{-1},$$ where $$ Q=\begin{bmatrix} 1 & 1 \\ 2 & -2 \\ \end{bmatrix}. $$ Then we have$$ e^A = Qe^DQ^{-1} = \begin{bmatrix} 1 & 1 \\ 2 & -2 \\ \end{bmatrix} \begin{bmatrix} e^2 & 0 \\ 0 & e^{-2} \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 2 & -2 \\ \end{bmatrix}^{-1}\\ = \begin{bmatrix} \frac {e^2+e^{-2}} 2 & \frac {e^2-e^{-2}} 4 \\ e^2-e^{-2} & \frac {e^2+e^{-2}} 2 \\ \end{bmatrix} . $$ ##### Exercise 6(c) 已知 $$ \begin{bmatrix} 2 & 1 \\ 0 & 2 \end{bmatrix} = \begin{bmatrix} 2 & -1 \\ 4 & 0 \end{bmatrix}^{-1} \begin{bmatrix} 0 & 1 \\ -4 & 4 \end{bmatrix} \begin{bmatrix} 2 & -1 \\ 4 & 0 \end{bmatrix}. $$ 令 $$ A = \begin{bmatrix} 0 & 1 \\ -4 & 4 \end{bmatrix}. $$ :::warning - [x] 同上題 - [x] 解釋 $e^D$ 怎麼算的 ::: $Ans:$ Hint: (We only discuss 2 by 2 Jordan form here and notate that $J$ is the Jordan form of a matrix.) $f(J)=\begin{bmatrix} f(\lambda) & f'(\lambda) \\ 0 & f(\lambda)\\ \end{bmatrix}$, where $J=\begin{bmatrix} \lambda & 1 \\ 0 & \lambda\\\end{bmatrix}.$ Let $$ A = QJQ^{-1} = \begin{bmatrix} 2 & -1 \\ 4 & 0 \\ \end{bmatrix} \begin{bmatrix} 2 & 1 \\ 0 & 2 \\ \end{bmatrix} \begin{bmatrix} 2 & -1 \\ 4 & 0 \\ \end{bmatrix}^{-1}, $$ where $$ Q=\begin{bmatrix} 2 & -1 \\ 4 & 0 \\ \end{bmatrix}. $$ We choose $f(x)=e^x$, and by the hint, we can get $e^J= \begin{bmatrix} e^{2} & e^{2} \\ 0 & e^{2} \end{bmatrix}.$ Then we have$$ e^A = Qe^JQ^{-1} = \begin{bmatrix} 2 & -1 \\ 4 & 0 \\ \end{bmatrix} \begin{bmatrix} e^{2} & e^{2} \\ 0 & e^{2} \end{bmatrix} \begin{bmatrix} 2 & -1 \\ 4 & 0 \\ \end{bmatrix}^{-1}\\ = \begin{bmatrix} -e^2 & e^{2} \\ -e^{2} & 3e^2 \\ \end{bmatrix} . $$ ##### Exercise 6(d) 已知 $$ \begin{bmatrix} 3 & 1 \\ 0 & 3 \end{bmatrix} = \begin{bmatrix} 3 & -1 \\ 9 & 0 \end{bmatrix}^{-1} \begin{bmatrix} 0 & 1 \\ -9 & 6 \end{bmatrix} \begin{bmatrix} 3 & -1 \\ 9 & 0 \end{bmatrix}. $$ 令 $$ A = \begin{bmatrix} 0 & 1 \\ -9 & 6 \end{bmatrix}. $$ :::warning - [x] 同上題 ::: $Ans:$ Let $$ A = QJQ^{-1} = \begin{bmatrix} 3 & -1 \\ 9 & 0 \\ \end{bmatrix} \begin{bmatrix} 3 & 1 \\ 0 & 3 \\ \end{bmatrix} \begin{bmatrix} 3 & -1 \\ 9 & 0 \\ \end{bmatrix}^{-1},$$ where $$Q=\begin{bmatrix} 3 & -1 \\ 9 & 0 \\ \end{bmatrix}. $$ By the hint from 6(c), we have $$ e^A = Qe^JQ^{-1} = \begin{bmatrix} 3 & -1 \\ 9 & 0 \\ \end{bmatrix} \begin{bmatrix} e^3 & e^{3} \\ 0 & e^3 \end{bmatrix} \begin{bmatrix} 3 & -1 \\ 9 & 0 \\ \end{bmatrix}^{-1}\\ = \begin{bmatrix} -2e^3 & e^3 \\ -9e^{3} & 2e^3 \\ \end{bmatrix} . $$ ##### Exercise 7 經由以下步驟說明 $\dot{\bx} = A\bx$ 的解就是 $e^{tA}\bc$, 其中 $\bc = (c_1,\ldots, c_n)$ 是一個控制常數的向量。 ##### Exercise 7(a) 若 $A$ 可被對角化為 $D = Q^{-1}AQ$。 令 $Q\by = \bx$。 首先說明 $\dot{\by} = D\by$ 的解就是 $e^{Dt}\bd$, 其中 $\bd = (d_1,\ldots, d_n)$ 可以是任何常數。 **[由林柏仰同學提供]** 令 $$ \by = \begin{bmatrix} y_1 \\ \vdots \\ y_n \end{bmatrix},\ D = \begin{bmatrix} c_1 & 0 & \ldots & 0 \\ 0 & c_2 & ~ & \vdots \\ \vdots & ~ & \ddots & 0 \\ 0 & \ldots & 0 & c_n \end{bmatrix}. $$ 由於 $\dot{\by} = D\by$ ,可知 $$ \dot{y_1} = c_1y_1\ ,\\ \vdots\\ \dot{y_n} = c_ny_n\ . $$ 即 $$ y_1 = d_1e^{c_1t}\ ,\\ \vdots\\ y_n = d_ne^{c_nt}\ . $$ 觀察 $e^{Dt}$ ,依照定義 $$ e^{Dt} = \begin{bmatrix} e^{c_1t} & 0 & \ldots & 0 \\ 0 & e^{c_2t} & ~ & \vdots \\ \vdots & ~ & \ddots & 0 \\ 0 & \ldots & 0 & e^{c_nt} \end{bmatrix}. $$ 則 $$ e^{Dt}\bd = \begin{bmatrix} d_1e^{c_1t} \\ \vdots \\ d_ne^{c_nt} \end{bmatrix}. $$ 故 $\dot{\by} = D\by$ 的解為 $\by = e^{Dt}\bd$ 。 **[由廖和寬同學提供]** 若 $\dot{x} = ax$ 且 $a$ 為任一個常數, 則 $x$ 的解為 $x = e^{at}$。 因為 $D$ 是對角矩陣,下面以 $3$ 階矩陣為例: $$ D = \begin{bmatrix} a_1 & 0 & 0 \\ 0 & a_2 & 0 \\ 0 & 0 & a_3 \\ \end{bmatrix}. $$ 如此一來, $\dot {\by} = D \by$ 可寫成 $$ \dot{\begin{bmatrix} \by_1 \\ \by_2 \\ \by_3 \end{bmatrix} } = \begin{bmatrix} a_1 & 0 & 0 \\ 0 & a_2 & 0 \\ 0 & 0 & a_3 \\ \end{bmatrix} \begin{bmatrix} \by_1 \\ \by_2 \\ \by_3 \end{bmatrix}. $$ 由上述可推出 $\dot \by_i = a_i \by_i$ , $i = 1,\ldots, n$ ; $\by_i = e^{a_it} d_i$ , $i = 1,\ldots, n$ 。 展開 $e^D$ ,以 $3$ 階矩陣為例: $$ e^D =\begin{bmatrix} e^{a_1} & 0 & 0\\ 0 & e^{a_2} & 0\\ 0 & 0 & e^{a_3} \end{bmatrix}. $$ 則帶入 $\by_i = e^{a_it} d_i$ , $i = 1,\ldots, n$。 $$ e^{Dt} \bd = \begin{bmatrix} e^{{a_1}t} & 0 & 0\\ 0 & e^{{a_2}t} & 0\\ 0 & 0 & e^{{a_3}t} \end{bmatrix} \begin{bmatrix} d_1 \\ d_2 \\ d_3 \end{bmatrix} = \begin{bmatrix} d_1 e^{{a_1}t} \\ d_2 e^{{a_2}t} \\ d_3 e^{{a_3}t} \end{bmatrix}. $$ 推得 $\dot \by = D\by$ 的解為 $\by = e^{Dt} \bd$。 ##### Exercise 7(b) 藉由 $\bx = Q\by$ 來得到 $\bx = e^{tA}\bc$, 其中 $\bc = Q\bd$ 是一組獨立的常數(因為 $Q$ 可逆)。 $Ans:$ 由 $\by = e^{Dt}\bd$, 將等號兩邊同乘 $Q$ 得到 $\bx = Q\by = Qe^{Dt}\bd$, 又 $D = Q^{-1}AQ$, 則 $\bx = Qe^{Q^{-1}AQt}\bd$。 再將 $e$ 次方上的 $Q^{-1}$ 跟 $Q$ 搬下來得到 $\bx = e^{At}Q\bd$, 整理後 $\bx = e^{tA}Q\bd = e^{tA}\bc$, 其中 $\bc = Q\bd$ 是一組獨立的常數(因為 $Q$ 可逆)。 ##### Remark 如果 $A$ 不可對角化則必須仰賴喬丹標準型,但 $e^{tA}\bc$ 這個公式還是正確的。 :::info 目前分數 = 5 × 檢討 = 6 :::

    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