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
    # 對稱矩陣與正規矩陣 Symmetric matrices and normal matrices ![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}} \newcommand{\mult}{\operatorname{mult}} \newcommand{\iner}{\operatorname{iner}}$ ```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 eigenbasis over $\mathbb{C}$. ##### 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 eigenbasis over $\mathbb{C}$ 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 eigenbasis over $\mathbb{R}$ and its eigenvalues are all real. ## Side stories - spectrum of a unitary/orthogonal matrix ## Experiments ##### Exercise 1 執行以下程式碼。 <!-- eng start --> Run the code below. <!-- eng end --> ```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) ``` By setting `seed=603`. $A= \begin{bmatrix} -2 & 2\\ 2 & 1 \end{bmatrix}.$ --- ##### Exercise 1(a) 求 $A$ 的所有特徵值。 <!-- eng start --> Find the spectrum of $A$. <!-- eng end --> ##### Exercise 1(a) - answer Solving $\det(A - xI) = 0$, we find that the eigenvalues of $A$ are $2$ and $-3$. --- ##### Exercise 1(b) 找一個實垂直矩陣 $Q$ 使得 $Q\trans AQ$ 為一對角矩陣。 <!-- eng start --> Find a real orthogonal matrix $Q$ such that $Q\trans AQ$ is a diagonal matrix. . <!-- eng end --> ##### Exercise 1(b) - answer $\lambda=2$ and $A\bv=2\bv$, the eigenvector is $\bv=\begin{bmatrix} 1 \\ 2 \end{bmatrix}$. Let $\bu=\begin{bmatrix} -2 \\ 1 \end{bmatrix}$ be a vector orthogonal to $\bv$. We can construct a matrix $Q$ as follows: $$ Q = \begin{bmatrix} | ~ & | \\ \frac{\bv}{\lVert\bv\rVert} & \frac{\bu}{\lVert\bv\rVert} \\ | ~ & | \\ \end{bmatrix}= \begin{bmatrix} \frac{1}{\sqrt{5}} & \frac{-2}{\sqrt{5}}\\ \frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}} \end{bmatrix},\\ Q^{-1} = Q\trans = \begin{bmatrix} \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}}\\ \frac{-2}{\sqrt{5}} & \frac{1}{\sqrt{5}} \end{bmatrix}.\\ $$ $$ Q^{-1}AQ= \begin{bmatrix} \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}}\\ \frac{-2}{\sqrt{5}} & \frac{1}{\sqrt{5}} \end{bmatrix} \begin{bmatrix} -2 & 2\\ 2 & 1 \end{bmatrix} \begin{bmatrix} \frac{1}{\sqrt{5}} & \frac{-2}{\sqrt{5}}\\ \frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}} \end{bmatrix}= \begin{bmatrix} 2 & 0\\ 0 & -3 \end{bmatrix}. $$ --- :::info What do the experiments try to tell you? (open answer) If $A$ is an real symmetric matrix, there exist an orthogonal matrix $Q$ such that $Q\trans AQ$ is diagonal. ::: ## Exercises ##### Exercise 2 將以下矩陣以實垂直矩陣對角化。 <!-- eng start --> Diagonalize the following matrices by real orthogonal matrices. <!-- eng end --> ##### Exercise 2(a) $$ A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}. $$ ##### Exercise 2(a) - answer Solving $\det(A - xI) = 0$, we find that the eigenvalues of $A$ are $1$ and $-1$. Choosing $\lambda=1$, one eigenvector is $\bv=\begin{bmatrix} 1 \\ 1 \end{bmatrix}$. Let $\bu=\begin{bmatrix} -1 \\ 1 \end{bmatrix}$ be a vector orthogonal to $\bv$. By setting $\frac{\bv}{\|\bv\|}$ and $\frac{\bu}{\|\bu\|}$ as the columns, we can construct a matrix $$ Q= \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{-1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{bmatrix},\, Q^{-1}= \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\ \frac{-1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{bmatrix}. $$ $$ Q^{-1}AQ= \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\\ \frac{-1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{-1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{bmatrix}= \begin{bmatrix} 1 & 0\\ 0 & -1 \end{bmatrix}. $$ :::warning - [x] Suggestion: By setting $\frac{\bv}{\|\bv\|}$ and $\frac{\bu}{\|\bu\|}$ as the columns, we can construct a matrix ::: --- ##### Exercise 2(b) $$ A = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}. $$ ##### Exercise 2(b) - answer Characteristic polynomial is: $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 1-x & 1\\ 1 & 1-x\\ \end{bmatrix}=x^2-2x=x(x-2). $$ Eigenvalues are $0$ and $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}}). $$ We get, $$ 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}, $$ Such that $D = Q^{-1}AQ$. ##### Exercise 2(c) $$ A = \begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}. $$ **[由孫心提供]** The characteristic polynomial is $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 1-x & -1\\ -1 & 1-x\\ \end{bmatrix}=x^2-2x=x(x-2). $$ The eigenvalues are $0$ and $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}}) $$ , then we can get $$ 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}. $$ It makes $D = Q^{-1}AQ$. ##### Exercise 2(d) $$ A = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}. $$ ##### Exercise 2(d) - answer $p_A = x^2 -5x = x(x-5)$. So the eigenvalues of $A$ are $0$ and $5$. $\lambda_1=0, \bv_1 = (-\frac{2}{\sqrt{5}},\frac{1}{\sqrt{5}})$ $\lambda_2=5, \bv_1 = (\frac{1}{\sqrt{5}},\frac{2}{\sqrt{5}})$ $$ Q= \begin{bmatrix} -\frac{2}{\sqrt{5}}& \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}}& \frac{2}{\sqrt{5}} \\ \end{bmatrix}, Q^{-1} \begin{bmatrix} -\frac{2}{\sqrt{5}}& \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}}& \frac{2}{\sqrt{5}} \\ \end{bmatrix} $$ $$ Q^{-1}AQ= \begin{bmatrix} -\frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{bmatrix} \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix} \begin{bmatrix} -\frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{bmatrix}= \begin{bmatrix} 0 & 0\\ 0 & 5 \end{bmatrix}= \begin{bmatrix} \lambda_1& 0\\ 0& \lambda_2 \\ \end{bmatrix}= D. $$ ##### Exercise 3 將以下矩陣以么正矩陣對角化。 <!-- eng start --> Diagonalize the following matrices by unitary matrices. <!-- eng end --> ##### Exercise 3(a) $$ A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}. $$ ##### Exercise 3(a) - answer The characteristic polynomial is $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} -x & -1\\ 1 & -x\\ \end{bmatrix}=x^2+1. $$ The eigenvalues are $i$ and $-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}}). $$ , then we can get $$ 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}. $$ It makes $D = Q^{-1}AQ$. ##### Exercise 3(b) $$ A = \begin{bmatrix} 1 & i \\ -i & 1 \end{bmatrix}. $$ ##### Exercise 3(b) - answer The characteristic polynomial is $$ p_A(x)=\det (A-xI)= \det \begin{bmatrix} 1-x & i\\ -i & 1-x\\ \end{bmatrix}=x^2-2x. $$ The eigenvalues are $0$ and $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}}). $$ , then we can get $$ 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}. $$ It makes $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}. $$ ##### Exercise 3(c) - answer The characteristic polynomial is $$ 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. $$ The eigenvalues are $\frac{\sqrt{2}(1+i)}{2}$ and $\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}}). $$ , then we can get $$ 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}. $$ It makes $D = Q^{-1}AQ$. ##### Exercise 4 將 $$ A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix} $$ 以實垂直矩陣對角化。 <!-- eng start --> Diagonalize $$ A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix} $$ by a real orthogonal matrix. <!-- eng end --> **[由蔡睿丞提供]** Ans: According to $$ 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) $$ we can find that $$\spec(A) = \{0,0,3\}$$ Find the eigenvector $$\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), $$ Let the length of $\bv_1,\bv_2,\bv_3$ equal to 1. $$\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}, $$ Thus, $D = Q^{-1}AQ$. **[由孫心提供]** The characteristic polynomial is $$ 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) $$ The eigenvalues are $0$, $0$, and $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). $$ Unitize $\bv_1,\bv_2,\bv_3$ to get $$\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}. $$ It makes $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} $$ 以實垂直矩陣對角化。 <!-- eng start --> Diagonalize $$ A = \begin{bmatrix} 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 \\ \end{bmatrix} $$ by a real orthogonal matrix. <!-- eng end --> **[由孫心提供]** The characteristic polynomial is $$ 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). $$ The eigenvalues are $0$, $-2$, and $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). $$ Unitize $\bv_1,\bv_2,\bv_3,\bv_4$ to get $$\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}). $$ Then we can get $$ 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}. $$ It makes $D = Q^{-1}AQ$. ##### Exercise 6 令 $T$ 為一上三角複矩陣。 <!-- eng start --> Let $T$ be a complex upper triangular matrix. <!-- eng end --> ##### Exercise 6(a) 證明以下敘述等價: 1. $T$ 是正規矩陣。 2. $T$ 是對角矩陣。 <!-- eng start --> Prove that the following are equivalent: 1. $T$ is a normal matrix. 2. $T$ is a diagonal matrix. <!-- eng end --> ##### Exercise 6(b) 證明以下敘述等價: 1. $T$ 是自伴矩陣。 2. $T$ 是對角矩陣且對角線項均為實數。 <!-- eng start --> Prove that the following are equivalent: 1. $T$ is a Hermitian matrix. 2. $T$ is a real diagonal matrix. <!-- eng end --> ##### Exercise 7 利用第 6 題及薛爾上三角化證明以下定理。 <!-- eng start --> Use 6 and the Schur triangulation lemma to prove the following theorems. <!-- eng end --> ##### 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. <!-- eng start --> Prove: ##### 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. <!-- eng end --> ##### 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. <!-- eng start --> Prove: ##### 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. <!-- eng end --> ##### 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. <!-- eng start --> Prove: ##### 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. <!-- eng end --> ##### Exercise 8 實際上,要證明一個自伴矩陣的特徵值均為實數 不一定要用到譜定理。 令 $A$ 為一自伴矩陣。 若 $A\bx = \lambda \bx$,考慮 $\bx^* A \bx$ 及其共軛轉置。 藉此說明 $A$ 的特徵值均為實數。 <!-- eng start --> Indeed, we do not really need the spectral theorem to show that the eigenvalues of a Hermitian matrix are real. Let $A$ be a Hermitian matrix. Suppose $A\bx = \lambda \bx$. Then consider $\bx^* A \bx$ and its conjugate transpose. Show that the eigenvalues of a Hermitian matrix are real. <!-- eng end --> ##### Exercise 9 以下練習探討么正矩陣和實垂直矩陣的相關性質。 <!-- eng start --> The following exercises studies the basic properties of unitary matrices and real orthogonal matrices. <!-- eng end --> ##### Exercise 9(a) 說明么正矩陣是正規矩陣。 藉此說明么正矩陣可以被么正矩陣對角化。 並證明其特徵值的絕對值均為 $1$。 <!-- eng start --> Show that any unitary matrix is a normal matrix. Then show that any unitary matrix can be diagonalized by a unitary matrix, and its eigenvalues all have absolute value $1$. <!-- eng end --> ##### Exercise 9(b) 說明實垂直矩陣可以被么正矩陣對角化、 其特徵值的絕對值均為 $1$、 而且其特徵值對實軸對稱。 <!-- eng start --> Show that any real orthogonal matrix can be diagonalized by a unitary matrix, and it eigenvalues all have absolute value $1$. Moreover, its eigenvalues are symmetric along the real axis. <!-- eng end --> :::info collaboration: 1 4 problems: 4 - 2abd, 3a extra: 1 - 3bc moderator: 1 qc: 1 :::

    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