shaoeChen
    • 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 No publishing access yet

      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.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      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
    • Make a copy
    • 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 Make a copy 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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    # 李宏毅_Linear Algebra Lecture 15: Inverse of Matrix ###### tags: `Hung-yi Lee` `NTU` `Linear Algebra Lecture` [課程撥放清單](https://www.youtube.com/playlist?list=PLJV_el3uVTsNmr39gwbyV-0KjULUsN7fW) ## Linear Algebra Lecture 15: Inverse of Matrix [課程連結](https://www.youtube.com/watch?v=fOK-bLERPUM&list=PLJV_el3uVTsNmr39gwbyV-0KjULUsN7fW&index=16&t=0s) 課程主要說明矩陣的Inverse ### Inverse of Function ![](https://i.imgur.com/gMSlBC0.png) 假設有兩個function-f、g,它們互為inverse,那麼它滿足以下條件: * input-$v$經過function-f得到$x$,再經過function-g會得到$y$,這個$y$就是原始的$v$ * 相反的先經過function-g再經過function-f也可以得到原始的結果 * 不管你的順序為何,只要經過兩個function就一定可以還原為原始的輸入 這時候我們說,f與g互為inverse,也就是f=g^-1^,g=f^-1^,而矩陣的inverse其道理一樣,因為我們可以將matrix視為一個linear function。 ### Inverse of Matrix ![](https://i.imgur.com/SuINp8L.png) 相同於function,matrix的互為inverse也是一樣的道理。只要經過兩個function,不管順序都會得到原始的輸入。 以另一種角度來說,$AB=I$且$BA=I$~(I為identity matrix)~,那它們就互為inverse。 ### Inverse of Matrix ![](https://i.imgur.com/Z7szmPE.png) 如果有一個matrix-B,而$AB=I$且$BA=I$,那A是invertible(可逆的),而B就是A的inverse,即$B=A^{-1}$,而inverse是互相的,也就是$A=B^{-1}$。 如果matrix是invertible,那它就是non-singular,這只是一個換句話說,singular有單獨的意思,而invertible代表它有一個伴,也就non-singular了。 ### Inverse of Matrix ![](https://i.imgur.com/cezxT0W.png) 特別注意到的是,如果matrix並非方形(即nxm且n<>m),那它就一定不是invertible,也就是一定不可逆。 ### Inverse of Matrix ![](https://i.imgur.com/4KujeSM.png) 這邊用一個案例說明非方形一定不可逆,主要在於低維轉高維的時候是無法還原的,這種情況下相乘是不會產生identity matrix,自然也就不可逆。 ### Inverse of Matrix ![](https://i.imgur.com/m7SdNDW.png) 上圖的上方案例說明著,並非所有方形的矩陣都是可逆的。 上圖的下方案例說明著,inverse是唯一的,也代表著$AB=I, BA=I$,不會出現$AB=I, AC=I$的情況。 ### Inverse for matrix product ![](https://i.imgur.com/uhRud8b.png) 這邊是更多性質的說明: * 當AB皆為invertible的nxn矩陣的時候,那AB也會是invertible * 證明:$(AB)^{-1} = B^{-1} A^{-1}$,然後乘上$AB$,$B^{-1} A^{-1}(AB)=B^{-1}(A^{-1}A)B=B^{-1}B=I$,反過來也是一樣,$(AB)B^{-1}A^{-1}=A(BB^{-1})A^{-1}=AA^{-1}=I$ * 相同的證明可以推廣到$K$個invertible matrix * $(A_1A_2A_3...A_K)^{-1}=(A_K)^{-1}(A_{K-1})^{-1}...(A_1)^{-1}$ ### Inverse for matrix product ![](https://i.imgur.com/964MPi5.png) * 如果A是invertible,那A^T^也會是invertible,也就是$(A^T)^{-1}=(A^{-1})^T$ * 證明:$A^{-1}A \rightarrow I=(A^{-1}A)^T=I \rightarrow A^T(A^{-1})^T=I$ * 對identity matrix做transpose還是identity matrix * 反過來證明:$AA^{-1}=I \rightarrow (AA^{-1})^T=I \rightarrow (A^{-1})^TA^T=I$ ### Inverse for matrix transpose ![](https://i.imgur.com/IW2212O.png) * 如果$A$是invertible,那$A^T$也是invertible,即$(A^T)^{-1} = (A^{-1})^T$ * 這只要證明$A^T(A^{-1})^T$是否為identity matrix就可以 * 證明:$(A^{-1}A)=I \rightarrow (A^{-1}A)^T=I \rightarrow A^T(A^{-1})^T=I$ * 反過來證明:$AA^{-1}=I \rightarrow (AA^{-1})^T=I \rightarrow (A^{-1})^TA^T=I$ ### Solving Linear Equations ![](https://i.imgur.com/html8xX.png) matrix的逆比較直觀的作用是拿來解system of linear equation: * 假設$Ax=b$,並且$A$是可逆的~(invertible)~ * 兩邊同乘$A^{-1}$,即$A^{-1}A(Ax)=A^{-1}b$ * 然後抵消$A^{-1}A$,就可以得到$I_nx=a^{-1}b$,也就是$x = A^{-1}b$ 概念上類似於代數運算,左右同時做某種數值上的操作,只是因為matrix沒有倒數,因此以inverse作為倒數。 實務上並不會用這種方法來求解,因為求inverse的過程需要執行RREF,既然還要執行RREF那就一開始直接用RREF求解即可。 ### Input-output Model ![](https://i.imgur.com/NIPlR5I.png) 上面給出一個應用範例,可自行參閱。 其中將生產每單位需求的資源做為矩陣,稱為Consumption matrix-$C$,想生產的為$x$,須投入的資源則為$Cx$。 ### Input-output Model ![](https://i.imgur.com/IqZdcox.png) 利用模型可以很快速的計算須投入的成本,但考量產出所投入的成本之後,淨收益為$x - Cx$,稱為Demand Vector ### Input-output Model ![](https://i.imgur.com/dtKgkrJ.png) 實務上我們可能會希望直接求得淨收益的部份,即$x - Cx = d$: * $x$乘上identity matrix,這並不影響結果,$Ix - Cx = d$ * 提出$x$,$(I - C)x =d$ * 而$Ax = b$,將$I-C$視為$A$,$A=I-C$,而$b = d$,$x$為$(I-C)^{-1}d$ ### Input-output Model ![](https://i.imgur.com/gtj0yGS.png) 如果想提升一單位食物的淨產值,需要多生產多少資源? * 已知$(I-C)x=d \rightarrow x = (I-C)^{-1}d$ * $d$則需要加上一個standard vector,即$d+e_1$ * 代入公式,$x'=(I-C)^{-1}(d+e_1)$ * 分別乘開,得$(I-C)^{-1}d + (I-C)^{-1}e_1$ * $(I-C)^{-1}d$是原本的$x$,而$(I-C)^{-1}e_1$是多出來的部份,也就是要是升一單位食物的淨產值所需要的資源,也就是$x$的第一個column

    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
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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