# 谱分解（SD）(Spectral decomposition (SD))-其他

## 谱分解（SD）(Spectral decomposition (SD))

• $A$ 是实对称矩阵
• $A$ 有 $n$ 个互异特征值
•  $A^{\wedge} 2=A$
• $\mathrm{A}^{\wedge} 2=\mathrm{E}$
• $r(A)=1 且 \operatorname{tr}(A) !=0$

谱分解（Spectral Decomposition ），又称特征分解，或相似标准形分解，是将矩阵分解为由其特征值和特征向量表示的矩阵之积的方法，需要注意只有对可对角化矩阵才可以施以特征分解。它体现了线性变换的旋转和缩放的功效。

设  $A$  为  $n$  阶实对称阵，则必有正交阵  $P$  ，使  $A=P \Lambda P^{T}$   其中 $\Lambda$  是以  $A$   的   $n$   个特征值为对角元的对角阵，  $P$   是由   $A$   的   $n$   个特征向量得到 的正交矩阵。

### 实对称矩阵谱分解的步骤

设  $\boldsymbol{A} \in \boldsymbol{R}^{n \times n}$,  $\boldsymbol{A}^{\prime}=\boldsymbol{A}$　　(i) 求出  $A$  的所有不同的特征值:  $\lambda_{1}, \lambda_{2}, \cdots, \lambda_{r} \in R$，其重数  $n_{1}, n_{2}, \cdots, n_{r}$  必满足  $\sum_{i=1}^{r} n_{i}=n$;　　(ii) 对每个  $\lambda_{i}$   ，解齐次线性方程组

$\left.\left(\lambda_{i}\right) E-A\right) X=0$

求出它的一个基础解系:   $\alpha_{i 1}, \alpha_{i 2}, \cdots, \alpha_{i n}$　　把它们按   Schmidt   正交化过程化成 标准正交组

$\boldsymbol{\eta}_{i 1}, \boldsymbol{\eta}_{i 2}, \cdots, \boldsymbol{\eta}_{i n}$

(iii) 因为   $\lambda_{1}, \lambda_{2}, \cdots, \lambda_{r}$  互不相同，所以

将  $\boldsymbol{\eta}_{11}, \boldsymbol{\eta}_{12}, \cdots, \boldsymbol{\eta}_{1 n_{1}}, \cdots, \boldsymbol{\eta}_{r 1}, \boldsymbol{\eta}_{r 2}, \cdots, \boldsymbol{\eta}_{r \boldsymbol{n}_{r}}$  的分量依次作 矩阵  $P$的第  $1,2, \cdots, n$  列, 则  $P$  是正交矩阵, 且有  $\boldsymbol{A}=\boldsymbol{P} \boldsymbol{\Lambda} \boldsymbol{P}^{\boldsymbol{T}}$ .

已知  $A=\left[\begin{array}{ccc}0 & -1 & 1 \\-1 & 0 & 1 \\1 & 1 & 0\end{array}\right]$  求一个正交矩阵 $P$  , 使 $\boldsymbol{A}=\boldsymbol{P} \boldsymbol{\Lambda} \boldsymbol{P}^{\boldsymbol{T}}$ 为对角阵.

第1步: 求特征值.

$\begin{array}{c}|\lambda E-A|=\left|\begin{array}{ccc}\lambda & 1 & -1 \\1 & \lambda & -1 \\-1 & -1 & \lambda\end{array}\right| \underline{r_{1}-r_{2}}\left|\begin{array}{cccc}\lambda-1 & 1-\lambda & 0 \\1 & \lambda & -1 \\-1 & -1 & \lambda\end{array}\right| \\=(\lambda-1)\left|\begin{array}{ccc}1 & -1 & 0 \\1 & \lambda & -1 \\-1 & -1 & \lambda\end{array}\right|=(\lambda-1)\left|\begin{array}{ccc}1 & 0 & 0 \\1 & \lambda+1 & -1 \\-1 & -2 & \lambda\end{array}\right|=(\lambda+2)(\lambda-1)^{2} \\\lambda_{1}=-2, \lambda_{2}=\lambda_{3}=1\end{array}$

第2步: 求线性无关的特征向量.

对 $\lambda_{1}=-2$  , 解方程组 $(A+2 E) x=0$

$A+2 E=\left[\begin{array}{ccc}2 & -1 & 1 \\-1 & 2 & 1 \\1 & 1 & 2\end{array}\right] \rightarrow\left[\begin{array}{lll}1 & 0 & 1 \\0 & 1 & 1 \\0 & 0 & 0\end{array}\right]$

求得基础解系(即最大无关特征向量)

$\alpha_{1}=\left[\begin{array}{c}-1 \\-1 \\1\end{array}\right]$

对  $\lambda_{2}=\lambda_{3}=1$ , 解方程组  $(A-E) x=0$

$A-E=\left[\begin{array}{ccc}-1 & -1 & 1 \\-1 & -1 & 1 \\1 & 1 & -1\end{array}\right] \stackrel{r}{\rightarrow}\left[\begin{array}{ccc}1 & 1 & -1 \\0 & 0 & 0 \\0 & 0 & 0\end{array}\right]$

求得基础解系(即最大无关特征向量)

$\begin{array}{l}\alpha_{2}=\left[\begin{array}{c}-1 \\1 \\0\end{array}\right], \alpha_{3}=\left[\begin{array}{c}1 \\0 \\1\end{array}\right] , \alpha_{1}=\left[\begin{array}{c}-1 \\-1 \\1\end{array}\right] \\{\left[\alpha_{1}, \alpha_{2}\right]=?\left[\alpha_{1}, \alpha_{3}\right]=? \quad\left[\alpha_{2}, \alpha_{3}\right]=0 ?}\end{array}$

第3步: 检验重特征值对应的特征向量是否正交, 如果不正交,　　用施密特过程正交化; 再把正交的特征向量单位化.

$\begin{array}{l}\boldsymbol{\alpha}_{\mathbf{2}}=\left[\begin{array}{c}-\mathbf{1} \\\mathbf{1} \\\mathbf{0}\end{array}\right], \boldsymbol{\alpha}_{\mathbf{3}}=\left[\begin{array}{l}\mathbf{1} \\\mathbf{0} \\\mathbf{1}\end{array}\right] \\\boldsymbol{\beta}_{\mathbf{2}}=\boldsymbol{\alpha}_{\mathbf{2}} \\\boldsymbol{\beta}_{3}=\alpha_{3}-\frac{\left[\beta_{2}, \alpha_{3}\right]}{\left[\beta_{2}, \beta_{2}\right]} \boldsymbol{\beta}_{2}=\left[\begin{array}{l}1 \\0 \\1\end{array}\right]+\frac{1}{2}\left[\begin{array}{c}-1 \\1 \\0\end{array}\right]=\frac{1}{2}\left[\begin{array}{l}1 \\1 \\2\end{array}\right]\end{array}$

单位化:

$\xi_{1}=\frac{\alpha_{1}}{\left\|\alpha_{1}\right\|}=\frac{1}{\sqrt{3}}\left[\begin{array}{c}-1 \\-1 \\1\end{array}\right] \quad \xi_{2}=\frac{\beta_{2}}{\left\|\beta_{2}\right\|}=\frac{1}{\sqrt{2}}\left[\begin{array}{c}-1 \\1 \\0\end{array}\right] \quad \xi_{3}=\frac{\beta_{3}}{\left\|\beta_{3}\right\|}=\frac{1}{\sqrt{6}}\left[\begin{array}{l}1 \\1 \\2\end{array}\right]$

第4步: 把求得的规范正交特征向量拼成正交矩阵.

令  $P=\left[\xi_{1}, \xi_{2}, \xi_{3}\right]=\left[\begin{array}{ccc}\frac{-1}{\sqrt{3}} & \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}}\end{array}\right]$　　则   $A=P\left[\begin{array}{ccc}-2 & & \\ & 1 & \\ & & 1\end{array}\right] P^{T}$

————————

Premise: matrix a must be similar diagonalization!

Sufficient conditions:

• $a$is a real symmetric matrix
• $a$has $n$distinct eigenvalues
• $A^{\wedge} 2=A$
• $\mathrm{A}^{\wedge} 2=\mathrm{E}$
• $r(A)=1 且 \operatorname{tr}(A) !=0$

Spectral decomposition, also known as eigendecomposition, or similar canonical decomposition, is a method to decompose a matrix into the product of its eigenvalues and eigenvectors. It should be noted that eigendecomposition can only be applied to diagonalized matrices. It embodies the effect of rotation and scaling of linear transformation.

Let $a$be a real symmetric matrix of $n$order, then there must be an orthogonal matrix $p$, so that $a = P \ lambda p ^ {t}$, where $\ lambda$is a diagonal matrix with $n$eigenvalues of $a$as diagonal elements, and $p$is an orthogonal matrix obtained from $n$eigenvectors of $a$.

### Steps of spectral decomposition of real symmetric matrix

Set $\ boldsymbol {a} \ in \ boldsymbol {r} ^ {n \ times n}$, $\ boldsymbol {a} ^ {\ prime} = \ boldsymbol {a}$(I) find all different characteristic values of $a$: $\ lambda_ {1}, \lambda_ {2}, \cdots, \lambda_ {r} \ in R$, multiplicity $n_ {1}, n_ {2}, \cdots, n_ {r}$must meet $\ sum_ {i=1}^{r} n_ {i}=n$; (II) for each $\ lambda_ {i}$, solving homogeneous linear equations

$\left. \left(\lambda_{i}\right) E-A\right) X=0$

Find a basic solution system: $\ alpha_ {i 1}, \alpha_ {i 2}, \cdots, \alpha_ {i n}$convert them into standard orthogonal groups according to the {Schmidt} orthogonalization process

$\boldsymbol{\eta}_{i 1}, \boldsymbol{\eta}_{i 2}, \cdots, \boldsymbol{\eta}_{i n}$

(III) because $\ lambda_ {1}, \lambda_ {2}, \cdots, \lambda_ {r}$is different from each other, so

Add $\ boldsymbol {\ ETA}_ {11}, \boldsymbol{\eta}_ {12}, \cdots, \boldsymbol{\eta}_ {1 n_{1}}, \cdots, \boldsymbol{\eta}_ {r 1}, \boldsymbol{\eta}_ {r 2}, \cdots, \boldsymbol{\eta}_ {r \boldsymbol{n}_ {r} The components of}$are used as the $1,2, \ cdots, n$columns of matrix $p$, then $p$is an orthogonal matrix, and there is $\ boldsymbol {a} = \ boldsymbol {P} \ boldsymbol {\ lambda} \ boldsymbol {P} ^ {\ boldsymbol {t}$

It is known that $a = \ left [\ begin {array} {CCC} 0 & amp; – 1 & amp; 1 \ \ – 1 & amp; 0 & amp; 1 \ \ 1 & amp; 0 \ end {array} \ right]$finds an orthogonal matrix $p$, so that $\ boldsymbol {a} = \ boldsymbol {P} \ boldsymbol {\ lambda} \ boldsymbol {P} ^ {\ boldsymbol {t}$is an opposite angle matrix

Step 1: find the eigenvalue

$\begin{array}{c}|\lambda E-A|=\left|\begin{array}{ccc}\lambda & 1 & -1 \\1 & \lambda & -1 \\-1 & -1 & \lambda\end{array}\right| \underline{r_{1}-r_{2}}\left|\begin{array}{cccc}\lambda-1 & 1-\lambda & 0 \\1 & \lambda & -1 \\-1 & -1 & \lambda\end{array}\right| \\=(\lambda-1)\left|\begin{array}{ccc}1 & -1 & 0 \\1 & \lambda & -1 \\-1 & -1 & \lambda\end{array}\right|=(\lambda-1)\left|\begin{array}{ccc}1 & 0 & 0 \\1 & \lambda+1 & -1 \\-1 & -2 & \lambda\end{array}\right|=(\lambda+2)(\lambda-1)^{2} \\\lambda_{1}=-2, \lambda_{2}=\lambda_{3}=1\end{array}$

Step 2: find the linear independent eigenvector

For $\ lambda_ {1} = – 2$, solving equations $(a + 2 e) x = 0$

$A+2 E=\left[\begin{array}{ccc}2 & -1 & 1 \\-1 & 2 & 1 \\1 & 1 & 2\end{array}\right] \rightarrow\left[\begin{array}{lll}1 & 0 & 1 \\0 & 1 & 1 \\0 & 0 & 0\end{array}\right]$

Find the basic solution system (i.e. the maximum independent eigenvector)

$\alpha_ {1}=\left[\begin{array}{c}-1 \\-1 \\1\end{array}\right]$

For $\ lambda_ {2}=\lambda_ {3} = 1$, solving equations $(A-E) x = 0$

$A-E=\left[\begin{array}{ccc}-1 & -1 & 1 \\-1 & -1 & 1 \\1 & 1 & -1\end{array}\right] \stackrel{r}{\rightarrow}\left[\begin{array}{ccc}1 & 1 & -1 \\0 & 0 & 0 \\0 & 0 & 0\end{array}\right]$

Find the basic solution system (i.e. the maximum independent eigenvector)

$\begin{array}{l}\alpha_{2}=\left[\begin{array}{c}-1 \\1 \\0\end{array}\right], \alpha_{3}=\left[\begin{array}{c}1 \\0 \\1\end{array}\right] , \alpha_{1}=\left[\begin{array}{c}-1 \\-1 \\1\end{array}\right] \\{\left[\alpha_{1}, \alpha_{2}\right]=?\left[\alpha_{1}, \alpha_{3}\right]=? \quad\left[\alpha_{2}, \alpha_{3}\right]=0 ?}\end{array}$

Step 3: check whether the eigenvector corresponding to the multiple eigenvalues is orthogonal. If not, orthogonalize it with Schmidt process; Then the orthogonal eigenvectors are unitized

$\begin{array}{l}\boldsymbol{\alpha}_{\mathbf{2}}=\left[\begin{array}{c}-\mathbf{1} \\\mathbf{1} \\\mathbf{0}\end{array}\right], \boldsymbol{\alpha}_{\mathbf{3}}=\left[\begin{array}{l}\mathbf{1} \\\mathbf{0} \\\mathbf{1}\end{array}\right] \\\boldsymbol{\beta}_{\mathbf{2}}=\boldsymbol{\alpha}_{\mathbf{2}} \\\boldsymbol{\beta}_{3}=\alpha_{3}-\frac{\left[\beta_{2}, \alpha_{3}\right]}{\left[\beta_{2}, \beta_{2}\right]} \boldsymbol{\beta}_{2}=\left[\begin{array}{l}1 \\0 \\1\end{array}\right]+\frac{1}{2}\left[\begin{array}{c}-1 \\1 \\0\end{array}\right]=\frac{1}{2}\left[\begin{array}{l}1 \\1 \\2\end{array}\right]\end{array}$

Unitization:

$\xi_{1}=\frac{\alpha_{1}}{\left\|\alpha_{1}\right\|}=\frac{1}{\sqrt{3}}\left[\begin{array}{c}-1 \\-1 \\1\end{array}\right] \quad \xi_{2}=\frac{\beta_{2}}{\left\|\beta_{2}\right\|}=\frac{1}{\sqrt{2}}\left[\begin{array}{c}-1 \\1 \\0\end{array}\right] \quad \xi_{3}=\frac{\beta_{3}}{\left\|\beta_{3}\right\|}=\frac{1}{\sqrt{6}}\left[\begin{array}{l}1 \\1 \\2\end{array}\right]$

Step 4: assemble the obtained canonical orthogonal eigenvector into an orthogonal matrix

令  $P=\left[\xi_{1}, \xi_{2}, \xi_{3}\right]=\left[\begin{array}{ccc}\frac{-1}{\sqrt{3}} & \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}}\end{array}\right]$　　则   $A=P\left[\begin{array}{ccc}-2 & & \\ & 1 & \\ & & 1\end{array}\right] P^{T}$

reference resources