叶卢庆的博客

利用Givens变换将实对称矩阵谱分解

在博文逐步转轴法化二次型为标准型中,我们通过对变量逐步施行Givens变换,最终将二次型化为标准型.由于二次型与对称矩阵有密不可分的关系,因此这篇文章启示我们,可以利用Givens变换将实对称矩阵化为对角矩阵.

以二次型$f(x,y,z)=2x^{2} + 5y^{2} +5z^{2}+4xy-4xz - 8yz$为例,该二次型可以表达成
$$
\begin{pmatrix}
x&y&z
\end{pmatrix}
\begin{pmatrix}
2&2&-2\\
2&5&-4\\
-2&-4&5
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
z
\end{pmatrix}
$$
在博文逐步转轴法化二次型为标准型中,我们使用正交替换
$$
\begin{pmatrix}
x’\\
y’\\
z’
\end{pmatrix}=\begin{pmatrix}
\frac{2 \sqrt{5}}{15}&\frac{4 \sqrt{5}}{15}&\frac{\sqrt{5}}{3}\\
-\frac{2 \sqrt{5}}{5}&\frac{\sqrt{5}}{5}&0\\
-\frac{1}{3}&-\frac{2}{3}&\frac{2}{3} \end{pmatrix}
\begin{pmatrix}
x\\
y\\
z
\end{pmatrix}.
$$把上述二次型化为标准型
\begin{align*}
x’^2+y’^2+10z’^2&=
\begin{pmatrix}
x’&y’&z’
\end{pmatrix}
\begin{pmatrix}
1&0&0\\
0&1&0\\
0&0&10
\end{pmatrix}
\begin{pmatrix}
x’\\
y’\\
z’
\end{pmatrix}
\\&=
\begin{pmatrix}
x&y&z
\end{pmatrix}
\begin{pmatrix}
\frac{2 \sqrt{5}}{15}&\frac{4 \sqrt{5}}{15}&\frac{\sqrt{5}}{3}\\
-\frac{2 \sqrt{5}}{5}&\frac{\sqrt{5}}{5}&0\\
-\frac{1}{3}&-\frac{2}{3}&\frac{2}{3}
\end{pmatrix}^T
\begin{pmatrix}
1&0&0\\
0&1&0\\
0&0&10
\end{pmatrix}
\begin{pmatrix}
\frac{2 \sqrt{5}}{15}&\frac{4 \sqrt{5}}{15}&\frac{\sqrt{5}}{3}\\
-\frac{2 \sqrt{5}}{5}&\frac{\sqrt{5}}{5}&0\\
-\frac{1}{3}&-\frac{2}{3}&\frac{2}{3}
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
z
\end{pmatrix}.
\end{align*}
可见,将二次型化为标准型的过程,就是将对称矩阵进行谱分解的过程.而在博文逐步转轴法化二次型为标准型中,正交矩阵$\begin{pmatrix}
\frac{2 \sqrt{5}}{15}&\frac{4 \sqrt{5}}{15}&\frac{\sqrt{5}}{3}\\
-\frac{2 \sqrt{5}}{5}&\frac{\sqrt{5}}{5}&0\\
-\frac{1}{3}&-\frac{2}{3}&\frac{2}{3}
\end{pmatrix}$是若干个代表Givens旋转的矩阵的复合,这启发我们,可以使用逐步的Givens旋转矩阵将对称矩阵谱分解.下面举一个例子.

例: 将三阶实对称矩阵$A=
\begin{pmatrix}
0&\frac{1}{2}&\frac{1}{2}\\
\frac{1}{2}&0&\frac{1}{2}\\
\frac{1}{2}&\frac{1}{2}&0
\end{pmatrix}
$谱分解.

:令$G_1=
\begin{pmatrix}
\cos\theta_1&-\sin\theta_1&0\\
\sin\theta_1&\cos\theta_1&0\\
0&0&1
\end{pmatrix},
$令
\begin{align*}
S_{1}&=G_1AG_1^{-1}
\\&=\begin{pmatrix}
\cos\theta_1&-\sin\theta_1&0\\
\sin\theta_1&\cos\theta_1&0\\
0&0&1
\end{pmatrix}
\begin{pmatrix}
0&\frac{1}{2}&\frac{1}{2}\\
\frac{1}{2}&0&\frac{1}{2}\\
\frac{1}{2}&\frac{1}{2}&0
\end{pmatrix}
\begin{pmatrix}
\cos\theta_1&\sin\theta_1&0\\
-\sin\theta_1&\cos\theta_1&0\\
0&0&1
\end{pmatrix}
\\&=
\begin{pmatrix}
-\sin\theta_{1}\cos\theta_{1}&-\frac{1}{2}\sin^{2}\theta_{1}+\frac{1}{2}\cos^2\theta_{1}&\frac{1}{2}\cos\theta_1-\frac{1}{2}\sin\theta_1\\
-\frac{1}{2}\sin^{2}\theta_{1}+\frac{1}{2}\cos^{2}\theta_{1}&\sin\theta_{1}\cos\theta_{1}&\frac{1}{2}\sin\theta_1+\frac{1}{2}\cos\theta_1\\
\frac{1}{2}\cos\theta_1-\frac{1}{2}\sin\theta_1&\frac{1}{2}\sin\theta_1+\frac{1}{2}\cos\theta_1&0
\end{pmatrix}.
\end{align*}
令$\cos\theta_1=\sin\theta_{1}=\frac{\sqrt{2}}{2}$,则$S_{1}$化为矩阵$S_{1}=
\begin{pmatrix}
-\frac{1}{2}&0&0\\
0&\frac{1}{2}&\frac{\sqrt{2}}{2}\\
0&\frac{\sqrt{2}}{2}&0
\end{pmatrix}
$.再令$G_2=
\begin{pmatrix}
1&0&0\\
0&\cos\theta_2&-\sin\theta_2\\
0&\sin\theta_2&\cos\theta_2
\end{pmatrix},
$令
\begin{align*}
S_2&=
G_2S_1G_2^{-1}=
\begin{pmatrix}
1&0&0\\
0&\cos\theta_2&-\sin\theta_2\\
0&\sin\theta_2&\cos\theta_2
\end{pmatrix}
\begin{pmatrix}
-\frac{1}{2}&0&0\\
0&\frac{1}{2}&\frac{\sqrt{2}}{2}\\
0&\frac{\sqrt{2}}{2}&0
\end{pmatrix}
\begin{pmatrix}
1&0&0\\
0&\cos\theta_2&\sin\theta_2\\
0&-\sin\theta_2&\cos\theta_2
\end{pmatrix}
\\&=
\begin{pmatrix}
-\frac{1}{2}&0&0\\
0&\frac{1}{2}\cos^{2}\theta_2-\sqrt{2}\sin\theta_2\cos\theta_2&\frac{1}{2}\sin\theta_2\cos\theta_2-\frac{\sqrt{2}}{2}\sin^{2}\theta_2+\frac{\sqrt{2}}{2}\cos^{2}\theta_2\\
0&\frac{1}{2}\sin\theta_2\cos\theta_2-\frac{\sqrt{2}}{2}\sin^{2}\theta_2+\frac{\sqrt{2}}{2}\cos^{2}\theta_2&\frac{1}{2}\sin^2\theta_2+\sqrt{2}\sin\theta_2\cos\theta_2
\end{pmatrix}.
\end{align*}
令$\cos\theta_{2}=\frac{\sqrt{3}}{3},\sin\theta_{2}=\frac{\sqrt{6}}{3}$,可得$\frac{1}{2}\sin\theta_{2}\cos\theta_{2}-\frac{\sqrt{2}}{2}\sin^{2}\theta_{2}+\frac{\sqrt{2}}{2}\cos^2\theta_{2}=0$.此时,矩阵
$$
S_2=
\begin{pmatrix}
-\frac{1}{2}&0&0\\
0&-\frac{1}{2}&0\\
0&0&1
\end{pmatrix}.
$$
因此,
$$
A=G_1^{-1}S_1G_1=G_1^{-1}G_2^{-1}S_2G_2G_1=
\begin{pmatrix}
\frac{\sqrt{2}}{2}&\frac{\sqrt{6}}{6}&\frac{\sqrt{3}}{3}\\
-\frac{\sqrt{2}}{2}&\frac{\sqrt{6}}{6}&\frac{\sqrt{3}}{3}\\
0&-\frac{\sqrt{6}}{3}&\frac{\sqrt{3}}{3}
\end{pmatrix}
\begin{pmatrix}
-\frac{1}{2}&0&0\\
0&-\frac{1}{2}&0\\
0&0&1
\end{pmatrix}
\begin{pmatrix}
\frac{\sqrt{2}}{2}&-\frac{\sqrt{2}}{2}&0\\
\frac{\sqrt{6}}{6}&\frac{\sqrt{6}}{6}&-\frac{\sqrt{6}}{3}\\
\frac{\sqrt{3}}{3}&\frac{\sqrt{3}}{3}&\frac{\sqrt{3}}{3}
\end{pmatrix}.
$$