FANFNA
    • 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
    # CHAPTER 6 Orthogonal Projection - [現代啟示錄 ](https://ccjou.wordpress.com/2010/04/22/gram-schmidt-%E6%AD%A3%E4%BA%A4%E5%8C%96%E8%88%87-qr-%E5%88%86%E8%A7%A3/) ## .1 Introduction ### 範數 1. 考慮 V 為一個向量空間(Vector space),則我們說 Norm 為一個函數滿足下列性質: 2. 嚴格正定性: ||v||≥0, ||v||=0⇔v=0 3. 正齊次性: 對所有的 α∈R,v∈V, ||αv||=|α|⋅||v|| 4. 次可加性:對任意 v1,v2∈V , ||v1+v2||≤||v1||+||v2|| (三角不等式) 5. Norm為長度的推廣 - 下圖顯示不同P-範數的「單位圓」 ![](https://i.imgur.com/Fprku99.png) ### 正交相關 :::info - 正交 (orthogonal) : 垂直這一直觀概念的推廣。作為一個形容詞,只有在一個確定的內積空間中才有意義。若內積空間中兩向量的內積為0,則稱它們是正交的。如果能夠定義向量間的夾角,則正交可以直觀的理解為垂直。 ::: :::danger 零向量正交必獨立 獨立未必正交 ::: :::info - 單範正交 (orthonormal) : 若每對向量均為正交且每個向量均為單位向量則稱S為單範正交。 正交集合為線性獨立 : 若S = {v1,v2,v3...vn}為內積空間V上一些非零向量所構成的正交集合,則S為線性獨立 ::: ## 6.2 Orthogonal Matrix :::success Orthogonal Matrix 若 A^−1^ = A^T^ 則稱 A 是正交矩陣,此時 A^T^A = I。要驗證是不是正交矩陣,檢查 A^−1^ = A^T^ 比較慢,算 A^T^A = I 比較快 作為一個線性映射,正交矩陣保持距離不變,所以它是一個保距映射,具體例子為旋轉與鏡射。 ::: :::info Gram-Schmidt process Gram-Schmidt正交化提供了一種方法,能夠通過這一子空間上的一個基得出子空間的一個orthogonal basis,並可進一步求出對應的orthonormal basis。在數值計算中,Gram-Schmidt正交化是數值不穩定的,計算中累積的捨入誤差會使最終結果的正交性變得很差。因此在實際應用中通常使用豪斯霍爾德變換或Givens旋轉進行正交化。 ::: 例題 ![](https://i.imgur.com/v94lvlu.png=300x300) ![](https://i.imgur.com/6ncX5hm.png=300x300) :::info 1. 會用積分來映射 <f,g>=$\int_{a}^{b}f(x)g(x)dt$ ::: :::danger 所以這邊附上積分公式 $\int_{a}^{b}x(t)dt$ $\int_{a}^{b}cX^{r}$ $ie:\frac c{r+1}X^{r+1}\left. \right| ^{b}_{a}=[\frac c{r+1}b^{r+1}]-[\frac c{r+1}a^{r+1}]$ ::: :::info 2. inner product <f,g>=f^T^*g 歐空間 ::: ### QR分解法 :::success QR分解法是三種將矩陣分解的方式之一。這種方式,把矩陣分解成一個半正交矩陣與一個上三角矩陣的積。QR分解的實際計算有很多方法,例如Givens旋轉、Householder變換,以及Gram-Schmidt正交化等等。 ::: 例題 ![](https://i.imgur.com/zXIXWA3.jpg=300x300) ![](https://i.imgur.com/csqYGMs.png) ![](https://i.imgur.com/mwqA7zz.png) ## 6.3 Least Squares Solution ### least squares problem :::danger Ax = b為線性方程式系統 - 如果此系統為**一致性**,我們可以使用高斯消去法與反代法解x - 當系統為**不一致性**時,如何找出最可能解,其中一個方法就是在Rn中找出使得Ax-b的範數||Ax - b||為最小的向量x 。這個定義即是最小平方問題的核心。 ::: ### least squares solution 對於任一線性系統Ax = b,這其所相對的Normal Equation為 A^T^Ax = A^T^b為一致性系統,且一般方程式的所有解是Ax=b 的最小平方解。 假如W是A的行空間,且x是Ax=b 的任一最小平方解,則b正交投影到W是projwb = Ax,若A為一具有線性獨立行向量之mxn的矩陣,則對於每一個mx1的矩陣b,線性系統 Ax=b 有一唯一最小平方解。 example: a~1~=(1,1) a~2~=(2,5) a~3~=(-1,-2) 1. A= (X,X^2^) b=(y) 2. A^T^AX=A^T^b 3. X =(A^T^A)^-1^A^T^b ![](https://i.imgur.com/CvUhFEB.png =300x300) ![](https://i.imgur.com/dxvGNIH.png) ### Normal Equation 求 least squares solution的幾何意義 Ax=b想要有解,b必須落在Ax的column space中。 b 若不落在Ax的column space中,至少b的投影 projection必然落在此空間當中。 試圖尋找x使得Ax-b的長度最小。上述誤差的最小值正好發生在誤差向量與A的column space垂直時,也就是說希望誤差向量落在A'的 null space。 ## Jordan ![](https://i.imgur.com/9xJtbVJ.png) 這邊是我們看到他的 對角組成成的 jordanblock ![](https://i.imgur.com/rBgbhsc.png) 這個 block 的組合方式有三種`1+1+1`=`2+1`=`3` ![](https://i.imgur.com/a8z0v3M.png) ![](https://i.imgur.com/k9luuC6.png) 4 =1+1+1+1 = 2+2 =1+3 =2+1+1 ![](https://i.imgur.com/pH4SVO0.png) ![](https://i.imgur.com/oMiiLKV.png) ![](https://i.imgur.com/D8shw15.png) 當我們算出特徵值 帶入 會獲得 ![](https://i.imgur.com/3a4xvr2.png) 這邊一樣會有幾種組合 ![](https://i.imgur.com/LEg5y2P.png) ![](https://i.imgur.com/Qd1xm8R.png) 當我們知道這個組合後就是會得 jordan normal block ![](https://i.imgur.com/se1EvGg.png) ![](https://i.imgur.com/njhCJrq.png) 2+1 我們獲得這個 normal block ![](https://i.imgur.com/S6AagYw.png)

    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