owned this note
owned this note
Published
Linked with GitHub
# 對稱矩陣與正規矩陣
Symmetric matrices and normal matrices

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
:::