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}} \newcommand{\am}{\operatorname{am}} \newcommand{\gm}{\operatorname{gm}} \newcommand{\iner}{\operatorname{iner}}$ ```python from lingeo import random_int_list, random_good_matrix from sym import inertia ``` ## Main idea A real symmetric matrix $A$ is said to be **positive definite** or **positive semidefinite** if $$ \bx\trans A\bx > 0 \quad\text{ or }\quad \bx\trans A\bx \geq 0, $$ respectively, for any nonzero vector $\bx$. A matrix $A$ is **negative definite** or **negative semidefinite** if $-A$ is positive definite or positive semidefinite, respectively. ##### Remark In general, only positivity of a matrix only focus on real symmetric matrices (or complex Hermitian matrices). That is, when we say a matrix is positive (semi)definite, we automatically assume it is symmetric. It is known that a matrix $A$ is positive definite if and only if all its eigenvalues are positive. Similarly, $A$ is positive semidefinite if and only if all its eigenvalues are nonnegative. Note that an $n\times n$ positive semidefinite matrix $A$ is positive definite if and only if $\rank(A) = n$. Let $A$ be an $n\times n$ positive semidefinite matrix of $\rank(A) = k$. One may diagonalize it as $A = QDQ\trans$ by some orthogonal matrix $Q$ and diagonal matrix $D$. Let $\lambda_1,\ldots,\lambda_k$ be the nonzero eigenvalues of $A$. Then we have $$ A = Q\begin{bmatrix} \lambda_1 & ~ & ~ & ~ \\ ~ & \ddots & ~ & O_{r,n-r} \\ ~ & ~ & \lambda_r & ~ \\ ~ & O_{n-r,r} & ~ & O_{n-r,n-r} \end{bmatrix} Q\trans = Q\begin{bmatrix} \sqrt{\lambda_1} & ~ & ~ \\ ~ & \ddots & ~ \\ ~ & ~ & \sqrt{\lambda_r} \\ ~ & O_{n-r,r} & ~ \end{bmatrix}\begin{bmatrix} \sqrt{\lambda_1} & ~ & ~ & ~ \\ ~ & \ddots & ~ & O_{r,n-r} \\ ~ & ~ & \sqrt{\lambda_r} & ~ \\ \end{bmatrix} Q\trans = MM\trans $$ for some $k\times n$ matrix $M$. If a matrix $A$ can be written as $A = MM\trans$ for some matrix $M$, then $A$ is called a **Gram** matrix. If $\br_1,\ldots,\br_n$ are the rows of $M$, then this means $A$ is a matrix of inner products; that is, $A = \begin{bmatrix} \inp{\br_i}{\br_j} \end{bmatrix}$. Indeed, a matrix is a Gram matrix if and only if it is positive semidefinite. ## Side stories - square root of a matrix - inner product space ## Experiments ##### Exercise 1 執行以下程式碼。 ```python ### code set_random_seed(0) print_ans = False n = 3 while True: eigs = random_int_list(n, 1) if not all(eig == 0 for eig in eigs): break Q = random_good_matrix(n,n,n,2) A = Q * diagonal_matrix(eigs) * Q.transpose() pretty_print(LatexExpr("A ="), A) print("eigenvalues =", A.eigenvalues()) if print_ans: iner = inertia(A) if iner[0] > 0: while True: x = vector(random_int_list(n)) if x.inner_product(A * x) > 0: break if iner[1] > 0: while True: y = vector(random_int_list(n)) if y.inner_product(A * y) < 0: break if iner[1] == 0: if iner[2] == 0: print("positive definite") if iner[2] > 0: print("positive semidefinite") print("x =", x) if iner[0] == 0: if iner[2] == 0: print("negative definite") if iner[2] > 0: print("negative semidefinite") print("y =", y) if iner[0] > 0 and iner[1] > 0: print("none above") print("x =", x) print("y =", y) ``` ##### Exercise 1(a) 判斷 $A$ 是否為正定、半正定、負定、半負定、或是皆不是。 :::warning - [x] 其特徵值為 $(-0.006, 4.400, 39.606)$,--> 其特徵值為 $-0.006, 4.400, 39.606$,其中有正有負, ::: $Ans:$ \ 執行 ``` seed = 0 ```,得到 $$ \begin{aligned} A= \begin{bmatrix} 3 & -5 & -4 \\ -5 & 12 & 16 \\ -4 & 16 & 29 \end{bmatrix} \end{aligned} $$ 其特徵值為 $-0.006, 4.400, 39.606$,其中有正有負,所以皆不是。 ##### Exercise 1(b) 若 $A$ 為正定或半正定,找一個非零向量 $\bf{x}$ 使得 $\bx\trans A\bx > 0$。 若 $A$ 為負定或半負定,找一個非零向量 $\bf{y}$ 使得 $\by\trans A\by < 0$。 若以上皆不是,找兩個非零向量 $\bf{x}$ 和 $\bf{y}$ 使得 $\bx\trans A\bx > 0$ 而 $\by\trans A\by < 0$。 :::warning - [ ] 向量用粗體 ::: $Ans :$ \ 令一矩陣 $Q = \begin{bmatrix} x \\ y \\ z \end{bmatrix}$ ,有一個 $\ Q \trans = \begin{bmatrix} x & y & z \end{bmatrix}$。 帶入 $Q\trans AQ = \begin{bmatrix} x & y & z \end{bmatrix} \begin{bmatrix} 3 & -5 & -4 \\ -5 & 12 & 16 \\ -4 & 16 & 29 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} \\ =3x^2+12y^2+29z^2-10xy+32yz-8xz.$ 找非零向量 $\bf{x}$ 使得 $\bx\trans A\bx > 0$ ,為此取其 $\lambda_1 = 4.400$ 時之特徵向量 $\bv_1 =(1.392,-1.190,1)$ 帶入可得, \ $\bx\trans A\bx = 19.154 > 0$ 。 \ 而找非零向量 $\by$ 使得 $\bx\trans A\bx < 0$ ,取 $\lambda_2=-0.006$ 時之特徵向量 $\bv_2=(-2.884,2.534,1)$ , 將其帶入可得 $\ Q\trans AQ = -0.0903 <0$。 ## Exercises ##### Exercise 2 判斷以下矩陣是否為正定、半正定、皆不是。 ##### Exercise 2(a) $$ A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}. $$ :::warning - [x] 中英數之間空格 - [x] 因為若 $\ x$ 和 $\ y$ 都不為$0$ --> 因為若 $(x,y) \neq \bzero$ - [x] $\ x$ --> $x$(看原始碼,$x$ 前面不用再加空格,請把後面都改掉) ::: $Ans$ 令一矩陣 $Q = \begin{bmatrix} x \\ y \end{bmatrix}$ ,有一個 $\ Q \trans = \begin{bmatrix} x & y \end{bmatrix}$。 帶入$\ Q\trans AQ = \begin{bmatrix} x & y \end{bmatrix} \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \ (x+y)^2 + \ x^2 + \ y^2$, 因為若 $(x,y) \neq \bzero$ ,那麼 $\ (x+y)^2 + \ x^2 + \ y^2$ 恆大於 $0$,所以 $A$ 正定矩陣。 ##### Exercise 2(b) $$ A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}. $$ $Ans$ 令一矩陣 $Q = \begin{bmatrix} x \\ y \end{bmatrix}$ ,有一個 $\ Q \trans = \begin{bmatrix} x & y \end{bmatrix}$。 帶入$\ Q\trans AQ = \begin{bmatrix} x & y \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \ 2xy$, 因為若 $\ x$ 和 $\ y$ 帶入$\begin{bmatrix} 1 \\ 0 \end{bmatrix}$,那麼 $\ 2xy = 0$,若 $x$ 和 $y$ 帶入 $\begin{bmatrix} -1 \\ 1 \end{bmatrix}$ ,那麼 $\ 2xy = -2$,所以 $A$ 皆不是正定或半正定。 ##### Exercise 2(c) $$ A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix}. $$ $Ans$ 令一矩陣 $Q = \begin{bmatrix} x \\ y \\ z \end{bmatrix}$ ,有一個 $\ Q \trans = \begin{bmatrix} x & y & z \end{bmatrix}$。 帶入$\ Q\trans AQ = \begin{bmatrix} x & y & z \end{bmatrix} \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \ x^2 + y^2 + z^2 + 2xy +2xz +2yz = (x+y+z)^2$, 因為若 $x$ 和 $y$ 和 $z$ 帶入$\begin{bmatrix} 1 \\ -1\\ 0 \end{bmatrix}$ 或 $\begin{bmatrix} -1 \\ 1\\ 0 \end{bmatrix}$ 或 $\begin{bmatrix} 1 \\ 0\\ -1 \end{bmatrix}$,則 $(x+y+z)^2 = 0$ 所以 $A$ 為半正定矩陣。 ##### Exercise 3 令 $A = \begin{bmatrix} a_{ij} \end{bmatrix}$ 為 $n\times n$ 一正定矩陣。 ##### Exercise 3(a) 證明對於所有 $i$ 都有 $a_{ii} \geq 0$。 :::warning - [x] $n$ 己經是 $A$ 的大小,所以 $\bx_n$ 的下標要用別的 - [x] 中英數之間空格 - [x] 用文字敘述取代 $\forall$ - [x] $n = 1 \cdots i$ --> $n = 1, \ldots i$ ::: Ans: 對所有的 $c = 1,\ldots, n$ 而言, 令 $\bx_c$ 為 $n\times n$ 單位矩陣的第 $c$ 個行向量。 如 $\bx_1 = [1\ 0\ 0\cdots0]\trans,\bx_2 = [0\ 1\ 0\cdots0]\trans$。 根據正定矩陣定義,所有 $\bx\neq \bzero$ 都有,$\bx\trans A\bx>0$ 的性質。 因為 $A$ 正定,所以對每一個 $c = 1,\cdots, n$ 都有 $\bx_c\trans A\bx_c=a_{cc}>0$. $Q.E.D$ ##### Exercise 3(b) 證明 $$ \sum_{i=1}^n\sum_{j=1}^n a_{ij} \geq 0. $$ :::warning - [x] 中英數之間空格 - [x] 用文字敘述取代 $\forall$ ::: Ans: 令 $\bx = [1\ 1\ 1\cdots1]\trans,$ 根據正定矩陣定義,$\bx\trans A\bx>0$,對每一個 $\bx\neq 0$, 則 $\bx\trans A\bx=\sum\limits_{i=1}^n\sum\limits_{j=1}^n a_{ij} >0,\ Q.E.D$。 ##### Exercise 4 證明以下關於(半)正定矩陣的相關性質。 ##### Exercise 4(a) 正定矩陣的主子矩陣也是正定矩陣。 :::warning - [ ] 中英數之間空格 - [ ] 用文字敘述取代 $\forall$ - [ ] 沒說明 $a_{kk}$ 是什麼,如果它是矩陣的話 $a_{kk} > 0$ 是什麼意思 - [ ] 重點不是前 $k$ 個位置皆不為零,重點是後 $n-k$ 個位置皆為零 ::: 可表示 $A$ 為$\begin{bmatrix} a_{kk} & a_{k(n-k)} \\ a_{(n-k)k} & a_{(n-k)(n-k)} \end{bmatrix},$其中 $1 \leq k \leq n。$ $a_{kk}$ 表示同時選取 $k$ 行, $k$ 列的矩陣(主子矩陣),令 $\bx$ 為後 $n-k$ 個位置皆為零的向量,根據定義,$\bx\trans A\bx > 0$,則 $a_{kk}>0$。 對 $a_{kk}$ 這一主子矩陣,存在不全為零的且長度為 $k$ 向量 $\bx_k$ 使得 $\bx_k\trans a_{kk} \bx_k>0$ ,正定矩陣的主子矩陣也是正定矩陣。 ##### Exercise 4(b) 正定矩陣加半正定矩陣是正定矩陣、 而半正定矩陣加半正定矩陣是半正定矩陣。 :::warning - [ ] 中英數之間空格 - [x] $\bx$ 有什麼條件嗎? - [ ] 數學式要加文字解釋 ::: Ans:令 $A$ 為正定矩陣,$B$,$C$ 為半正定矩陣,對每一個不全為零的向量 $\bx$, 觀察 $\bx\trans (A+B)\bx = \bx\trans A\bx +\bx\trans B\bx \ >0$, 則正定矩陣加半正定矩陣是正定矩陣。 觀察 $\bx\trans (B+C)\bx = \bx\trans B\bx +\bx\trans C\bx \ \geq 0$, 則半正定矩陣加半正定矩陣是半正定矩陣。 ##### Exercise 5 依照以下步驟證明以下敘述等價: 1. $A$ 是正定矩陣。 2. $A$ 的特徵值均為正。 ##### Exercise 5(a) 證明若 $A$ 有一特徵值 $\lambda\leq 0$,則存在一個非零向量 $\bx$ 使得 $\bx\trans A\bx \leq 0$。 因此若 $A$ 正定,則 $A$ 的特徵值均為正。 :::warning - [x] 令 $A$ 可被對角化為 $Q\trans AQ = D = ...$ - [x] 中英數之間空格 - [x] $\bx\trans A\bx = \bx\trans QDQ\trans \bx \leq0,$ --> $\bx\trans Q\trans AQ\bx = \bx\trans D \bx \leq 0,$ ::: Ans:令 $A$ 為可被對角化為$Q\trans AQ = D$,$D=\begin{bmatrix} \lambda_{1} &&0\\&\ddots&\\0&&\lambda_{n}\end{bmatrix}$, 其中 $\lambda_1\leq 0$, 則可找到一非零向量 $\bx=[1\ 0 \cdots0]\trans$ 使得 $\bx\trans Q\trans AQ\bx = \bx\trans D \bx \leq 0,$ 負特徵根與正定矩陣定義不合,$Q.E.D$。 ##### Exercise 5(b) 證明若 $A$ 的特徵值均為正,則 $\bx\trans A\bx \geq 0$。 (參考 607-3。) :::warning - [x] 用文字說明清楚,不用使用 $\forall, \because, \therefore$ 等邏輯符號 - [x] 不要中英混雜 - [x] 向量用粗體,純量不用 ::: Ans:令$A = QDQ\trans,\ D=\begin{bmatrix} \lambda_{1} &&0\\&\ddots&\\0&&\lambda_{n}\end{bmatrix}$,各特徵根皆為正, 依正定矩陣定義可得 $\bx\trans A\bx = \bx\trans QDQ\trans \bx$。 令 $\by=Q\trans x$,因為$\bx \neq 0$,所以$\by \neq 0$,改寫 $A=\by\trans D \by=\sum\limits_{i=1}^n\lambda_iy_i^2,$ 因各特徵根皆為正 且 $y_i^2 \geq 0$,則 $\bx\trans A \bx \geq 0, Q.E.D$。 ##### Exercise 6 證明以下敘述等價: 1. $A$ 是半正定矩陣。 2. $A$ 是格拉姆矩陣。 :::warning - [x] 向量用粗體 ::: $Ans:$ \ 由 $1.$ 到 $2.$ ,令 $A$ 為一對稱矩陣其特徵值 $\lambda \space \geq 0$ , \ 則 $A =$ $$ \begin{aligned} Q \begin{bmatrix} \lambda_{1} &&0\\&\ddots&\\0&&\lambda_{n}\end{bmatrix}Q\trans &=Q \begin{bmatrix} \sqrt{\lambda_{1}} &&0\\&\ddots&\\0&&\sqrt{\lambda_{n}}\end{bmatrix}\begin{bmatrix} \sqrt{\lambda_{1}} &&0\\&\ddots&\\0&&\sqrt{\lambda_{n}}\end{bmatrix}Q\trans \end{aligned} $$ 由於 $A$ 為半正定矩陣,其特徵值皆大於等於 $0$ ,因此對其取根號獲得以上形式。 \ 且 $$ \begin{aligned}Q \begin{bmatrix} \sqrt{\lambda_{1}} &&0\\&\ddots&\\0&&\sqrt{\lambda_{n}}\end{bmatrix}\begin{bmatrix} \sqrt{\lambda_{1}} &&0\\&\ddots&\\0&&\sqrt{\lambda_{n}}\end{bmatrix}Q\trans &=M M\trans \end{aligned} $$ 由此可得半正定矩陣與格拉姆矩陣等價。 \ 由 $2.$ 到 $1.$ ,令 $A=MM\trans$ , \ $\bx\trans A \bx = \bx\trans MM\trans \bx =\by\trans \by=\lvert\lvert M\trans \bx \rvert\rvert ^{2} \geq 0$ \ 由此可得格拉姆矩陣與半正定矩陣等價。 ##### Exercise 7 以下練習探討矩陣根號的概念。 ##### Exercise 7(a) 證明若 $A$ 是一正定矩陣, 則其可寫成 $A = M^2$, 其中 $M$ 是對稱矩陣。 :::warning - [x] $^T$ --> $\trans$ - [x] posituve --> positive ::: Because $A$ is real symmetric, $A$ can be written as $A=QDQ\trans$, where $Q$ is an orthogonal matrix and $D$ is diagonal. Because A is positive definite, $D=\begin{bmatrix} \lambda_{1} &&0\\&\ddots&\\0&&\lambda_{n}\end{bmatrix}$, where $\lambda_{1}, \dots, \lambda_{n} >0$ Then we can define $\sqrt{D}=\begin{bmatrix} \sqrt{\lambda_{1}} &&0\\&\ddots&\\0&&\sqrt{\lambda_{n}}\end{bmatrix}$. Pick $M=Q\sqrt{D}Q\trans$. Clearly, $M$ is symmetric, too. Finally, we have $M^{2}=(Q\sqrt{D}Q\trans)(Q\sqrt{D}Q\trans)=Q\sqrt{D}\sqrt{D}Q\trans=QDQ\trans=A.$ ##### Exercise 7(b) 若 $A$ 是一正定矩陣、$B$ 為一對稱矩陣, 證明 $AB$ 的特徵值均為實數。 提示:證明 $AB$ 和某對稱矩陣相似。 :::warning - [x] $^T$ --> $\trans$ - [x] $R^n$ --> $\mathbb{R}^n$ - [ ] 若 $\bx = c_1\bx_1 + \cdots + c_n\bx_n$,要怎麼把 $\bx\trans AB\bx$ 用 $\bx_i\trans AB\bx_i$ 表示? ::: Let $\bx_{1},\dots,\bx_{n}$ be eigenvectors of $B$. Because $B$ is real symmetric, {$\bx_{1},\dots,\bx_{n}$} is a basis of $\mathbb{R}^{n}$. Let $\bx\in\mathbb{R}^n$, and $\bx = c_1\bx_1 + \cdots + c_n\bx_n$, for some $c_1,...,c_n\in F$. Because ${\bx_{i}\trans}AB\bx_{i} = \lambda_{i}{\bx_{i}\trans}A\bx_{i}$, we have ${\bx\trans}AB\bx={c_1}^2{\bx_1\trans}AB\bx_1+...+{c_n}^2{\bx_n\trans}AB\bx_n={c_1}^2\lambda_1{\bx_1\trans}A\bx_1+...+{c_n}^2\lambda_n{\bx_n\trans}A\bx_n.$ Because $\lambda_{i}$ is real and $\bx_{i}^{T}A\bx_{i}$ must be positive, $\bx_{i}^{T}AB\bx_{i}$ is real, for $i=1,\dots,n.$ Let $\bx$ be eigenvector of $AB$. Then we have $\lambda=\frac{{\bx\trans}AB\bx}{\bx\trans\bx}$. Because ${\bx\trans}AB\bx$ is real and so is $\bx\trans\bx$, we can find $\lambda$ is real. ##### Exercise 8 回顧 213-5 中提到的廣義內積的定義。 以下練習說明廣義內積完全是由正定矩陣做出來的。 ##### Exercise 8(a) 令 $A$ 為一正定矩陣。 定義 $\inp{\bx}{\by}_A:=\by\trans A\bx$。 證明 $\inp{\cdot}{\cdot}_A$ 為一內積。 :::warning - [x] $^T$ --> $\trans$ - [x] 這裡的 $F$ 就是 $\mathbb{R}$ - [x] 向量用粗體 - [x] 第四個條件要求 $\bx\neq\bzero$ ::: (1) $\inp{\bx+\by}{\bz}_A={\bz\trans}A(\bx+\by)={\bz\trans}A\bx+{\bz\trans}A\by=\inp{\bx}{\bz}_A+\inp{\by}{\bz}_A$ (2) $\inp{c\bx}{\by}_A={\by\trans}A(c\bx)=c{\by\trans}A\bx=c\inp{\bx}{\by}_A$, for all $c\in\mathbb{R}.$ (3) $\inp{\bx}{\by}_A={\by\trans}A\bx=\overline{{\bx\trans}A\by}=\overline{\inp{\by}{\bx}_A}$ (4) $\inp{\bx}{\bx}_A={\bx\trans}A\bx>0$, for all $\bx\neq\bzero.$ By (1)~(4), $\inp{\cdot}{\cdot}_A$ is an inner product. ##### Exercise 8(b) 令 $\inp{\cdot}{\cdot}$ 為一內積, 找一個矩陣 $A$ 使得對所有向量 $\bx$ 和 $\by$ 都有 $\inp{\bx}{\by} = \by\trans A\bx$。 驗證這個矩陣必須是正定的。 提示:選一些特別的 $\bx$ 和 $\by$ 來找到 $A$ 的各項。 :::warning - [x] 這題要先求出 $A$ ::: Let $A=[a_{ij}]$, for $i,j=1,...,n.$ Choose $\bx=\be_j,\by=\be_i$ and we have $a_{ij}=\by\trans A\bx.$ By (3) from 8(a) , we know $a_{ij}=a_{ji}$ ($a_{ij}$ is real.), so $A$ is a symmetric matrix. Because $A$ is real symmetric, we can choose a basis $\beta$ of $\mathbb{R}^{n}$, where $\beta = {x_{1},\dots,x_{n}}$ and $x_{i}$ is an eigenvector of $A$. By (4) from 8(a), $\inp{\bx_{i}}{\bx_{i}}=\lambda_{i}||\bx_{i}||^{2}>0.$ Then, we can find $\lambda_{i}>0, i=1,2,\dots,n$. Finally, we have $A$ be positive definite. :::info 分數 = 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