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/). $\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}}$ ```python from lingeo import random_int_list ``` ## Main idea Let $A$ be a complex matrix. If $A^* = A$, then $A$ is **Hermitian** . If $A^*A = AA^*$, then $A$ is **normal** . Following the Schur triangulation theorem, these matrices can be diagonalized nicely. ##### Spectral theorem (normal matrix) Let $A$ be a normal matrix. Then there is a unitary matrix $Q$ such that $Q^* AQ$ is diagonal. Equivalently, $A$ has an orthonormal basis. ##### Spectral theorem (Hermitian matrix) Let $A$ be a Hermitian matrix. Then there is a unitary matrix $Q$ such that $Q^* AQ$ is diagonal and real. Equivalently, $A$ has an orthonormal basis and its eigenvalues are all real. ##### Remark Let $A$ be a real matrix. Then $A$ is normal if and only if $A\trans A = AA\trans$. Thus, $A$ has an orthonormal basis over $\mathbb{C}$ (not necessarily over $\mathbb{R}$). Similarly, $A$ is Hermitian if and only if $A\trans = A$. That is, $A$ is a symmetric matrix. The spectral theorem ensures that $A$ has an orthonormal basis over $\mathbb{C}$ and its all eigenvalues real. It requires a few more steps to say the basis can actually be taken over $\mathbb{R}$. ##### Spectral theorem (symmetric matrix) Let $A$ be a real symmetric matrix. Then there is a real orthogonal matrix $Q$ such that $Q\trans AQ$ is diagonal and real. Equivalently, $A$ has an orthonormal basis over $\mathbb{R}$ and its eigenvalues are all real. ## Side stories - spectrum of a unitary/orthogonal matrix ## Experiments ##### Exercise 1 執行以下程式碼。 ```python ### code set_random_seed(0) print_ans = False while True: eigs = random_int_list(2) v1 = vector(random_int_list(2)) if eigs[0] != eigs[1] and v1.is_zero() == False: break v2 = vector([-v1[1], v1[0]]) Q = matrix([v1.normalized(), v2.normalized()]).transpose() A = Q * diagonal_matrix(eigs) * Q.inverse() pretty_print(LatexExpr("A ="), A) if print_ans: print("eigenvalues of A:", eigs) pretty_print(LatexExpr("Q ="), Q) ``` 藉由 `seed = 10`得到 $$A=\begin{bmatrix} 1 & 0\\ 0 & 4\\ \end{bmatrix}. $$ ##### Exercise 1(a) 求 $A$ 的所有特徵值。 答: 特徵多項式為 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 1-x & 0\\ 0 & 4-x\\ \end{bmatrix}=(1-x)(4-x). $$ 特徵值為 $1$、$4$。 ##### Exercise 1(b) 找一個實垂直矩陣 $Q$ 使得 $Q\trans AQ$ 為一對角矩陣。 $$\lambda_1=1, \ker (A-1I)= \ker \begin{bmatrix} 0 & 0\\ 0 & 3\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} 1 \\ 0 \end{bmatrix} \right\},\bv_1=(1,0), $$ $$\lambda_2=4, \ker (A-4I)= \ker \begin{bmatrix} -3 & 0\\ 0 & 0\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} 0 \\ 1 \end{bmatrix} \right\},\bv_2=(0,1). $$ 得到 $$ Q= \begin{bmatrix} | & | \\ \bv_1& \bv_2 \\ | & | \\ \end{bmatrix}= \begin{bmatrix} 1 & 0\\ 0 & 1\\ \end{bmatrix}= Q\trans、 $$ $$ D= \begin{bmatrix} \lambda_1& 0\\ 0& \lambda_2 \\ \end{bmatrix}=\begin{bmatrix} 1 & 0 \\ 0 & 4 \\ \end{bmatrix}, $$ 使得 $D = Q\trans AQ$。 :::success Good ::: ## Exercises ##### Exercise 2 將以下矩陣以實垂直矩陣對角化。 ##### Exercise 2(a) $$ A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}. $$ :::warning - [x] $Q$ 不是垂直矩陣(題目有錯... 後來把對稱矩陣改成垂直矩陣) ::: $Ans:$ 特徵多項式為 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 0-x & 1\\ 1 & 0-x\\ \end{bmatrix}=x^2-1=(x+1)(x-1). $$ 特徵值為 $1$、$-1$。 $$\lambda_1=1, \ker (A-I)= \ker \begin{bmatrix} -1 & 1\\ 1 & -1\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix} \right\},\bv_1=(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}), $$ $$\lambda_2=-1, \ker (A+I)= \ker \begin{bmatrix} 1 & 1\\ 1 & 1\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{bmatrix} \right\},\bv_2=(\frac{1}{\sqrt{2}},-\frac{1}{\sqrt{2}}). $$ 得到 $$ Q= \begin{bmatrix} | & | \\ \bv_1& \bv_2 \\ | & | \\ \end{bmatrix}= \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}\\ \end{bmatrix}、 $$ $$ D= \begin{bmatrix} \lambda_1& 0\\ 0& \lambda_2 \\ \end{bmatrix}=\begin{bmatrix} 1 & 0 \\ 0 & -1 \\ \end{bmatrix}, $$ 使得 $D = Q^{-1}AQ$。 ##### Exercise 2(b) $$ A = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}. $$ :::warning - [x] $Q$ 不是垂直矩陣(題目有錯... 後來把對稱矩陣改成垂直矩陣) ::: $Ans:$ 特徵多項式為 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 1-x & 1\\ 1 & 1-x\\ \end{bmatrix}=x^2-2x=x(x-2). $$ 特徵值為 $0$、$2$。 $$\lambda_1=0, \ker (A-0I)= \ker \begin{bmatrix} 1 & 1\\ 1 & 1\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix} \right\},\bv_1=(-\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}), $$ $$\lambda_2=2, \ker (A-2I)= \ker \begin{bmatrix} -1 & 1\\ 1 & -1\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix} \right\},\bv_2=(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}). $$ 得到 $$ Q= \begin{bmatrix} | & | \\ \bv_1& \bv_2 \\ | & | \\ \end{bmatrix}= \begin{bmatrix} -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\ \end{bmatrix}、 $$ $$ D= \begin{bmatrix} \lambda_1& 0\\ 0& \lambda_2 \\ \end{bmatrix}=\begin{bmatrix} 0 & 0 \\ 0 & 2 \\ \end{bmatrix}, $$ 使得 $D = Q^{-1}AQ$。 ##### Exercise 2(c) $$ A = \begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}. $$ :::warning - [x] $Q$ 不是垂直矩陣(題目有錯... 後來把對稱矩陣改成垂直矩陣) ::: $Ans:$ 特徵多項式為 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 1-x & -1\\ -1 & 1-x\\ \end{bmatrix}=x^2-2x=x(x-2). $$ 特徵值為 $0$、$2$。 $$\lambda_1=0, \ker (A-0I)= \ker \begin{bmatrix} 1 & -1\\ -1 & 1\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix} \right\},\bv_1=(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}), $$ $$\lambda_2=2, \ker (A-2I)= \ker \begin{bmatrix} -1 & -1\\ -1 & -1\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{bmatrix} \right\},\bv_2=(\frac{1}{\sqrt{2}},-\frac{1}{\sqrt{2}}). $$ 得到 $$ Q= \begin{bmatrix} | & | \\ \bv_1& \bv_2 \\ | & | \\ \end{bmatrix}= \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}\\ \end{bmatrix}、 $$ $$ D= \begin{bmatrix} \lambda_1& 0\\ 0& \lambda_2 \\ \end{bmatrix}=\begin{bmatrix} 0 & 0 \\ 0 & 2 \\ \end{bmatrix}, $$ 使得 $D = Q^{-1}AQ$。 ##### Exercise 2(d) $$ A = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}. $$ :::warning - [x] $Q$ 不是垂直矩陣(題目有錯... 後來把對稱矩陣改成垂直矩陣) ::: $Ans:$ 特徵多項式為 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 1-x & 2\\ 2 & 4-x\\ \end{bmatrix}=x^2-5x=x(x-5). $$ 特徵值為 $0$、$5$。 $$\lambda_1=0, \ker (A-0I)= \ker \begin{bmatrix} 1 & 2\\ 2 & 4\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} -\frac{2}{\sqrt{5}} \\ \frac{1}{\sqrt{5}} \end{bmatrix} \right\},\bv_1=(-\frac{2}{\sqrt{5}},\frac{1}{\sqrt{5}}), $$ $$\lambda_2=5, \ker (A-5I)= \ker \begin{bmatrix} -4 & 2\\ 2 & -1\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} \frac{1}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} \end{bmatrix} \right\},\bv_2=(\frac{1}{\sqrt{5}},\frac{2}{\sqrt{5}}). $$ 得到 $$ Q= \begin{bmatrix} | & | \\ \bv_1& \bv_2 \\ | & | \\ \end{bmatrix}= \begin{bmatrix} -\frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}}\\ \end{bmatrix}、 $$ $$ D= \begin{bmatrix} \lambda_1& 0\\ 0& \lambda_2 \\ \end{bmatrix}=\begin{bmatrix} 0 & 0 \\ 0 & 5 \\ \end{bmatrix}, $$ 使得 $D = Q^{-1}AQ$。 ##### Exercise 3 將以下矩陣以么正矩陣對角化。 ##### Exercise 3(a) $$ A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}. $$ :::warning - [x] $Q$ 不是么正矩陣,行向是的長度要除掉 ::: $Ans$ 特徵多項式 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} -x & -1\\ 1 & -x\\ \end{bmatrix}=x^2+1. $$ 特徵值為 $i$ 和 $-i$ $$\lambda_1=i, \ker (A-iI)= \ker \begin{bmatrix} -i & -1\\ 1 & -i\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} 1 \\ -i \end{bmatrix} \right\},\bv_1=(\frac{1}{\sqrt{2}},\frac{-i}{\sqrt{2}}), $$ $$\lambda_2=-i, \ker (A+iI)= \ker \begin{bmatrix} i & -1\\ 1 & i\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} i \\ -1 \end{bmatrix} \right\},\bv_2=(\frac{i}{\sqrt{2}},\frac{-1}{\sqrt{2}}). $$ 得到 $$ Q= \begin{bmatrix} | & | \\ \bv_1& \bv_2 \\ | & | \\ \end{bmatrix}= \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{i}{\sqrt{2}}\\ \frac{-i}{\sqrt{2}} & \frac{-1}{\sqrt{2}}\\ \end{bmatrix}、 $$ $$ D= \begin{bmatrix} \lambda_1& 0\\ 0& \lambda_2 \\ \end{bmatrix}=\begin{bmatrix} i & 0 \\ 0 & -i \\ \end{bmatrix}, $$ 使得 $D = Q^{-1}AQ$。 ##### Exercise 3(b) $$ A = \begin{bmatrix} 1 & i \\ -i & 1 \end{bmatrix}. $$ :::warning - [x] $Q$ 不是么正矩陣,行向是的長度要除掉 ::: $Ans$ 特徵多項式 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 1-x & i\\ -i & 1-x\\ \end{bmatrix}=x^2-2x. $$ 特徵值為 $0$ 和 $2$ $$\lambda_1=0, \ker (A-0I)= \ker \begin{bmatrix} 1 & i\\ -i & 1\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} 1 \\ i \end{bmatrix} \right\},\bv_1=(\frac{1}{\sqrt{2}},\frac{i}{\sqrt{2}}), $$ $$\lambda_2=2, \ker (A-2I)= \ker \begin{bmatrix} -1 & i\\ -i & -1\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} i \\ 1 \end{bmatrix} \right\},\bv_2=(\frac{i}{\sqrt{2}},\frac{1}{\sqrt{2}}). $$ 得到 $$ Q= \begin{bmatrix} | & | \\ \bv_1& \bv_2 \\ | & | \\ \end{bmatrix}= \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{i}{\sqrt{2}}\\ \frac{i}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\ \end{bmatrix}、 $$ $$ D= \begin{bmatrix} \lambda_1& 0\\ 0& \lambda_2 \\ \end{bmatrix}=\begin{bmatrix} 0 & 0 \\ 0 & 2 \\ \end{bmatrix}, $$ 使得 $D = Q^{-1}AQ$。 ##### Exercise 3(c) $$ A = \begin{bmatrix} \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{bmatrix}. $$ :::warning - [x] $Q$ 不是么正矩陣,行向是的長度要除掉 ::: $Ans$ 特徵多項式 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} \frac{1}{\sqrt{2}}-x & -\frac{1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}-x\\ \end{bmatrix}=x^2-\sqrt{2}x+1. $$ 特徵值為 $\frac{\sqrt{2}(1+i)}{2}$ 和 $\frac{\sqrt{2}(1-i)}{2}$ $$\lambda_1=\frac{\sqrt{2}(1+i)}{2}, \ker (A-\frac{\sqrt{2}(1+i)}{2}I)= \ker \begin{bmatrix} \frac{1}{\sqrt{2}}-\frac{\sqrt{2}(1+i)}{2} & -\frac{1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}-\frac{\sqrt{2}(1+i)}{2}\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} -1 \\ i \end{bmatrix} \right\},\bv_1=(\frac{-1}{\sqrt{2}},\frac{i}{\sqrt{2}}), $$ $$\lambda_2=\frac{\sqrt{2}(1-i)}{2}, \ker (A-\frac{\sqrt{2}(1-i)}{2}I)= \ker \begin{bmatrix} \frac{1}{\sqrt{2}}-\frac{\sqrt{2}(1-i)}{2} & -\frac{1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}-\frac{\sqrt{2}(1-i)}{2}\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} i \\ -1 \end{bmatrix} \right\},\bv_2=(\frac{i}{\sqrt{2}},\frac{-1}{\sqrt{2}}). $$ 得到 $$ Q= \begin{bmatrix} | & | \\ \bv_1& \bv_2 \\ | & | \\ \end{bmatrix}= \begin{bmatrix} \frac{-1}{\sqrt{2}} & \frac{i}{\sqrt{2}}\\ \frac{i}{\sqrt{2}} & \frac{-1}{\sqrt{2}}\\ \end{bmatrix}、 $$ $$ D= \begin{bmatrix} \lambda_1& 0\\ 0& \lambda_2 \\ \end{bmatrix}=\begin{bmatrix} \frac{1+i}{\sqrt{2}} & 0 \\ 0 & \frac{1-i}{\sqrt{2}} \\ \end{bmatrix}, $$ 使得 $D = Q^{-1}AQ$。 ##### Exercise 4 將 $$ A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix} $$ 以實垂直矩陣對角化。 :::warning - [x] $Q$ 不是垂直矩陣(題目有錯... 後來把對稱矩陣改成垂直矩陣) ::: $Ans:$ 特徵多項式為 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 1-x & 1 & 1\\ 1 & 1-x & 1\\ 1 & 1 & 1-x\\ \end{bmatrix}=-x^3+3x^2=-x^2(x-3) $$ 特徵值為 $0$、$0$、$3$。 $$\lambda_1,\lambda_2=0, \ker (A-0I)= \ker \begin{bmatrix} 1 & 1 & 1\\ 1 & 1 & 1\\ 1 & 1 & 1\\ \end{bmatrix}= \vspan\left\{ \begin{bmatrix} -1 \\ 1 \\ 0 \end{bmatrix},\ \begin{bmatrix} -1 \\ -1 \\ 2 \end{bmatrix}\right\},\bv_1=(-1,1,0),\bv_2=(-1,-1,2) $$ $$\lambda_3=3, \ker (A-3I)= \ker \begin{bmatrix} -2 & 1 & 1\\ 1 & -2 & 1\\ 1 & 1 & -2\\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} \right\},\bv_3=(1,1,1), $$ 將 $\bv_1,\bv_2,\bv_3$ 單位化得到 $$\bv_1=(-\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},0).$$ $$\bv_2=(-\frac{1}{\sqrt{6}},-\frac{1}{\sqrt{6}},\frac{2}{\sqrt{6}}).$$ $$\bv_3=(\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}}).$$ $$ Q= \begin{bmatrix} | & | & |\\ \bv_1& \bv_2 & \bv_3\\ | & | & |\\ \end{bmatrix}= \begin{bmatrix} -\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{6}} &\frac{1}{\sqrt{3}}\\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} \\ 0 &\frac{2}{\sqrt{6}} & \frac{1}{\sqrt{3}} \\ \end{bmatrix} $$ $$ D= \begin{bmatrix} \lambda_1& 0 & 0\\ 0& \lambda_2 & 0\\ 0 & 0 & \lambda_3\\ \end{bmatrix}=\begin{bmatrix} 0 & 0 & 0\\ 0 & 0 & 0 \\ 0 & 0 & 3 \\ \end{bmatrix}, $$ 使得 $D = Q^{-1}AQ$。 ##### Exercise 5 將 $$ A = \begin{bmatrix} 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 \\ \end{bmatrix} $$ 以實垂直稱矩陣對角化。 答: 特徵多項式為 $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 0-x & 0 & 1 & 1 \\ 0 & 0-x & 1 & 1 \\ 1 & 1 & 0-x & 0 \\ 1 & 1 & 0 & 0-x \\ \end{bmatrix}=x^4-4x^2=x^2(x+2)(x-2). $$ 特徵值為 $0$、$-2$、$2$。 $$\lambda_1=\lambda_2=0, \ker (A-0I)= \ker \begin{bmatrix} 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 \\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} -1 \\ 1 \\ 0 \\ 0 \end{bmatrix} \begin{bmatrix} 0 \\ 0 \\ -1 \\ 1 \end{bmatrix} \right\},\bv_1=(-1,1,0,0),\bv_2=(0,0,-1,1) $$ $$\lambda_3=-2, \ker (A+2I)= \ker \begin{bmatrix} 2 & 0 & 1 & 1 \\ 0 & 2 & 1 & 1 \\ 1 & 1 & 2 & 0 \\ 1 & 1 & 0 & 2 \\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} -1 \\ -1 \\ 1 \\ 1 \end{bmatrix} \right\},\bv_3=(-1,-1,1,1). $$ $$\lambda_4=2, \ker (A-2I)= \ker \begin{bmatrix} -2 & 0 & 1 & 1 \\ 0 & -2 & 1 & 1 \\ 1 & 1 & -2 & 0 \\ 1 & 1 & 0 & -2 \\ \end{bmatrix}= \operatorname{span}\left\{ \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} \right\},\bv_4=(1,1,1,1). $$ 將 $\bv_1,\bv_2,\bv_3,\bv_4$ 單位化得到 $$\bv_1=(-\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},0,0).$$ $$\bv_2=(0,0,-\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}).$$ $$\bv_3=(-\frac{1}{2},-\frac{1}{2},\frac{1}{2},\frac{1}{2}).$$ $$\bv_4=(\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2}). $$ 得到 $$ Q= \begin{bmatrix} | & | & | & | \\ \bv_1& \bv_2 &\bv_3& \bv_4\\ | & | & | & | \\ \end{bmatrix}= \begin{bmatrix} -\frac{1}{\sqrt{2}} & 0 & -\frac{1}{2} & \frac{1}{2}\\ \frac{1}{\sqrt{2}} & 0 & -\frac{1}{2} &\frac{1}{2}\\ 0 & -\frac{1}{\sqrt{2}} & \frac{1}{2} & \frac{1}{2}\\ 0 & \frac{1}{\sqrt{2}} & \frac{1}{2} & \frac{1}{2}\\ \end{bmatrix}、 $$ $$ D= \begin{bmatrix} \lambda_1& 0 &0&0\\ 0& \lambda_2 &0&0\\ 0&0&\lambda_3&0\\ 0&0&0&\lambda_4 \end{bmatrix}=\begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & -2 & 0 \\ 0 & 0 & 0 & 2 \\ \end{bmatrix}, $$ 使得 $D = Q^{-1}AQ$。 ##### Exercise 6 令 $T$ 為一上三角複矩陣。 ##### Exercise 6(a) 證明以下敘述等價: 1. $T$ 是正規矩陣。 2. $T$ 是對角矩陣。 **[由林柏仰同學提供]** 假設 $T$ 為正規矩陣。 令 $$ T = \begin{bmatrix} t_{11} & t_{12} & ... & t_{1n} \\ ~ & t_{22} & ... & t_{2n} \\ ~ & ~ & \ddots & \vdots \\ O & ~ & ~ & t_{nn} \end{bmatrix}. $$ 因為 $T$ 是正規矩陣,可知 $T^*T = TT^*$。 可得等式 $$ t_{11}\overline{t_{11}} = t_{11}\overline{t_{11}} + t_{12}\overline{t_{12}} +\ ...\ + t_{1n}\overline{t_{1n}}. $$ 因為對於任何的複數 $z$ ,皆會滿足 $z\overline{z} \geq 0$ 。 故可知若 $t_{12}\overline{t_{12}} + ... + t_{1n}\overline{t_{1n}} = 0$ ,當且僅當 $t_{12} = ... = t_{1n} = 0$ 。 而在知道 $t_{12} = 0$ 之後,也可知道 $$ t_{22}\overline{t_{22}} = t_{22}\overline{t_{22}} + t_{23}\overline{t_{23}} +\ ...\ + t_{2n}\overline{t_{2n}} $$ 即 $t_{23} = ... = t_{2n} = 0$ 。 重複以上動作可推出 $T$ 在對角線上的元素皆為 $0$ 。 故 $T$ 為對角矩陣。 假設 $T$ 為對角矩陣,顯而易見的, $T^*T = TT^*$ 。 即 $T$ 為正規矩陣。 **[由黃立帆同學提供]** $2\rightarrow1$ Assume $T=\begin{bmatrix} t_{11} & & 0\\ &\ddots&\\ 0 & & t_{nn} \end{bmatrix}$. Clearly, $t_{ii}\overline{t_{ii}}=\overline{t_{ii}}t_{ii}$, for $i=1,\dots,n$, so we can conclude $T^{*}T=TT^{*}$. $1\rightarrow2$ Assume $T^{*}T=TT^{*}=L$. $l_{ii}=\sum_{k=1}^{n}t_{ik}t_{ki}^{*}=\sum_{k=1}^{n}t_{ik}^{*}t_{ki}$. Because $T$ is upper triangular, $t_{ij}=0$ if $i>j$ and $t_{ij}^{*}=0$ if $j>i$. Then we have $l_{11}=t_{11}t_{11}^{*}+\dots+t_{1n}t_{n1}^{*}=t_{11}t_{11}^{*}$. And we find $t_{11}t_{11}^{*}+\dots+t_{1n}t_{n1}^{*}=|t_{12}|^{2}+\dots+|t_{1n}|^{2}=0$, so $t_{12}=\dots=t_{1n}=0$. Next, we discuss $l_{22},\dots,l_{nn}$ by similar way, we can find $T$ is diagonal. ##### Exercise 6(b) 證明以下敘述等價: 1. $T$ 是自伴矩陣。 2. $T$ 是對角矩陣且對角線項均為實數。 **[由林柏仰同學提供]** 以 $3\times 3$ 為例,觀察 $T$。 假設 $T$ 為自伴矩陣。 令 $$ T = \begin{bmatrix} t_{11} & t_{12} & ... & t_{1n} \\ ~ & t_{22} & ... & t_{2n} \\ ~ & ~ & \ddots & \vdots \\ O & ~ & ~ & t_{nn} \end{bmatrix}. $$ 已知 $T = T^*$ ,即 $$ \begin{bmatrix} t_{11} & t_{12} & ... & t_{1n} \\ ~ & t_{22} & ... & t_{2n} \\ ~ & ~ & \ddots & \vdots \\ O & ~ & ~ & t_{nn} \end{bmatrix} = \begin{bmatrix} \overline{t_{11}} & ~ & ~ & O \\ \overline{t_{12}} & \overline{t_{22}} & ~ & ~ \\ \vdots & \vdots & \ddots & ~ \\ \overline{t_{1n}} & \overline{t_{2n}} & ... & \overline{t_{nn}} \end{bmatrix}. $$ 顯而易見, $T$ 在非對角線上的元素皆為 $0$ 。 且由於 $t_{11} = \overline{t_{11}},\ t_{22} = \overline{t_{22}},\ ...\ ,t_{nn} = \overline{t_{nn}}$ ,可知 $t_{11},t_{22},\ ...\ ,t_{nn}$ 都是實數。 即 $T$ 為對角矩陣且對角項均為實數。 假設 $T$ 為對角矩陣且對角項均為實數。 顯而易見, $T$ 會滿足 $T = T^*$ 。 即 $T$ 為自伴矩陣。 **[由黃立帆同學提供]** $2\rightarrow1$ $T$ is real symmetric and diagonal, so $T=T^{*}$. $1\rightarrow2$ Because $T=T^{*}$, clearly, $T$ is normal, and $t_{ii}$ is real, for $i=1,...,n$. By 6(a), we know $T$ is diagonal, so we finish our proof. ##### Exercise 7 利用第 6 題及薛爾上三角化證明以下定理。 ##### Exercise 7(a) 證明: ##### Spectral theorem (normal matrix) Let $A$ be a normal matrix. Then there is a unitary matrix $Q$ such that $Q^* AQ$ is diagonal. Equivalently, $A$ has an orthonormal basis. :::warning - [x] 中英數間空格 ::: $Ans:$ 根據薛爾上三角定理,存在一個么正矩陣 $Q$ 使得 $Q^* AQ=T$ 是上三角矩陣。 又因為 $A$ 是正規矩陣,符合 $$A^* A=A A^* $$ 由上式可推得 $$T^* T=Q^* A^*Q Q^* AQ=Q^* A^* AQ=Q^* A A^*Q=Q^* AQ Q^* A^*Q=T T^* $$ $T$ 也是正規矩陣,根據 6(a) ,可推得 $Q^* AQ$ 是對角矩陣。 ##### Exercise 7(b) 證明: ##### Spectral theorem (Hermitian matrix) Let $A$ be a Hermitian matrix. Then there is a unitary matrix $Q$ such that $Q^* AQ$ is diagonal and real. Equivalently, $A$ has an orthonormal basis and its eigenvalues are all real. :::warning - [x] 哈密頓 --> 自伴(哈密頓是 Hamilton) ::: $Ans:$ 根據薛爾上三角定理,存在一個么正矩陣 $Q$ 使得 $Q^* AQ=T$ 是上三角矩陣。 又因為 $A$ 是自伴矩陣,符合 $$A=A^* $$ 由上式可推得 $$T^*=Q^* A^*Q=Q^* AQ=T $$ 符合以上結果的 $Q^* AQ$ 一定是實數對角矩陣。 ##### Exercise 7(c) 證明: ##### Spectral theorem (symmetric matrix) Let $A$ be a real symmetric matrix. Then there is a real orthogonal matrix $Q$ such that $Q\trans AQ$ is diagonal and real. Equivalently, $A$ has an orthonormal basis over $\mathbb{R}$ and its eigenvalues are all real. :::warning - [x] 最前面加:因為 $A$ 是實對稱矩陣,也是自伴矩陣,所以根據 7(b) 或 8 可知 $A$ 的特徵值均為實數。 - [x] 根據薛爾上三角定理(特徵值均為實數的實矩陣版本),存在一個垂直矩陣 $Q$ 使得 $Q\trans AQ=T$ 是上三角矩陣。~~取 $Q$ 為實數正交矩陣~~ - [x] $^T$ --> $\trans$ - [x] 中英數之間空格 ::: $Ans:$ 因為 $A$ 是實對稱矩陣,也是自伴矩陣,所以根據 7(b) 或 8 可知 $A$ 的特徵值均為實數。 根據薛爾上三角定理(特徵值均為實數的實矩陣版本),存在一個實垂直矩陣 $Q$ 使得 $Q\trans AQ=T$ 是上三角矩陣。 故 $$Q^*=Q\trans $$ 此題的薛爾上三角矩陣可以改寫成 $$Q\trans AQ=T $$ $A$ 為對稱矩陣,故 $$A=A\trans $$ 由上式可推得 $$T\trans=Q\trans A\trans Q=Q\trans AQ=T $$ 又因為 $Q$ 跟 $A$ 都是實數矩陣,故可得 $Q\trans AQ$ 為實數對角矩陣。 ##### Exercise 8 實際上,要證明一個自伴矩陣的特徵值均為實數 不一定要用到譜定理。 令 $A$ 為一自伴矩陣。 若 $A\bx = \lambda \bx$,考慮 $\bx^* A \bx$ 及其共軛轉置。 藉此說明 $A$ 的特徵值均為實數。 :::warning - [x] 標點 ::: $Ans:$ 因為 $A$ 是一個自伴矩陣,所以 $A = A^*$。 考慮 $(\bx^*A\bx)^* = \bx^*A^*(\bx^*)^* = \bx^*A\bx$, 因為 $\bx^*A\bx$ 與其共軛轉置相等,所以 $\bx^*A\bx$ 為實數。 利用特徵值性質為 $A\bx = \lambda \bx$,等號兩側左乘 $\bx^*$,就有 $\bx^*A\bx = \bx^*\lambda\bx= \lambda\bx^*\bx$。 又因為 $\bx^*A\bx$ 為實數,$\bx^*\bx=||\bx||^2$ 是非零向量 $\bx$ 的長度平方,故為一正數。 因此,$\lambda =\frac {\bx^*A\bx} {\bx^*\bx}$ 是一個實數。 ##### Exercise 9 以下練習探討么正矩陣和實垂直矩陣的相關性質。 ##### Exercise 9(a) 說明么正矩陣是正規矩陣。 藉此說明么正矩陣可以被么正矩陣對角化。 並證明其特徵值的絕對值均為 $1$。 :::warning - [x] 假設存在另一個么正矩陣 $Q$ ,根據定義令 $A$ 為正規矩陣,則存在么正矩陣 $Q$ 使得 $Q^*AQ=D$ 可對角化,因為 $A$ 同時也是么正矩陣,所以可以得出結論,任意的么正矩陣都可以被么正矩陣對角化。<-- 這段我不懂... 一旦是正規矩陣就可以用定理了 ::: 答: 假設 $A$ 是么正矩陣,因此 $A$ 會有性質 $$A^*A=AA^*=I,A^{-1}=A^*,$$ 並且正規矩陣會有性質 $$A^*A=AA^*,$$ 所以么正矩陣是正規矩陣。 根據譜定理,任意的正規矩陣都可以被么正矩陣對角化,因為么正矩陣同時也是正規矩陣,所以么正矩陣可以被么正矩陣對角化。 用特徵值的性質 $A\bv = \lambda \bv$, $$\\||A\bv||^2 = (A\bv)^*(A\bv) = \bv^*A^*A\bv = \bv^*I\bv=\bv^*\bv=||\bv||^2=|\lambda|^2||\bv||^2=||\lambda\bv||^2, $$ 所以得到 $|\lambda|^2=1$,$|\lambda|=1$,證明么正矩陣特徵值的絕對值均為 $1$。 ##### Exercise 9(b) 說明實垂直矩陣可以被么正矩陣對角化、 其特徵值的絕對值均為 $1$、 而且其特徵值對實軸對稱。 :::warning - [x] 跟上一題狀況一樣 ::: 答: 假設 $A$ 是實垂直矩陣,因此 $A$ 會有性質 $$A{\trans}A=AA\trans=I,A^{-1}=A\trans, $$ 並且正規矩陣會有性質 $$A\trans A=AA\trans, $$ 所以實垂直矩陣是正規矩陣。 根據譜定理,任意的正規矩陣都可以被么正矩陣對角化,因為實垂直矩陣同時也是正規矩陣,所以實垂直矩陣可以被么正矩陣對角化。 用特徵值的性質 $A\bv = \lambda \bv$, $$\\||A\bv||^2 = (A\bv){\trans}(A\bv) = \bv{\trans}A{\trans}A\bv = \bv{\trans}I\bv=\bv{\trans}\bv=||\bv||^2=|\lambda|^2||\bv||^2=||\lambda\bv||^2,$$ 所以得到 $|\lambda|^2=1$,$|\lambda|=1$,證明實垂直矩陣特徵值的絕對值均為 $1$。 假如特徵方程式有複數根的話,因為特徵方程式為實係數多項式,必滿足虛根成雙定理,且兩根必定對稱於實數軸。 :::info 分數 = 6.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