對稱矩陣與正規矩陣¶

Symmetric matrices and normal matrices

Creative Commons License
This work by Jephian Lin is licensed under a Creative Commons Attribution 4.0 International License.

$\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}}$

In [ ]:
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¶

執行以下程式碼。

Run the code below.
In [ ]:
### 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)
Exercise 1(a)¶

求 $A$ 的所有特徵值。

Find the spectrum of $A$.
Exercise 1(b)¶

找一個實垂直矩陣 $Q$ 使得 $Q\trans AQ$ 為一對角矩陣。

Find a real orthogonal matrix $Q$ such that $Q\trans AQ$ is a diagonal matrix.

Exercises¶

Exercise 2¶

將以下矩陣以實垂直矩陣對角化。

Diagonalize the following matrices by real orthogonal matrices.
Exercise 2(a)¶
$$ A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}. $$
Exercise 2(b)¶
$$ A = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}. $$
Exercise 2(c)¶
$$ A = \begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}. $$
Exercise 2(d)¶
$$ A = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}. $$
Exercise 3¶

將以下矩陣以么正矩陣對角化。

Diagonalize the following matrices by unitary matrices.
Exercise 3(a)¶
$$ A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}. $$
Exercise 3(b)¶
$$ A = \begin{bmatrix} 1 & i \\ -i & 1 \end{bmatrix}. $$
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 4¶

將

$$ A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix} $$

以實垂直矩陣對角化。

Diagonalize $$ A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix} $$ by a real orthogonal matrix.
Exercise 5¶

將

$$ A = \begin{bmatrix} 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 \\ \end{bmatrix} $$

以實垂直矩陣對角化。

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.
Exercise 6¶

令 $T$ 為一上三角複矩陣。

Let $T$ be a complex upper triangular matrix.
Exercise 6(a)¶

證明以下敘述等價:

  1. $T$ 是正規矩陣。
  2. $T$ 是對角矩陣。
Prove that the following are equivalent: 1. $T$ is a normal matrix. 2. $T$ is a diagonal matrix.
Exercise 6(b)¶

證明以下敘述等價:

  1. $T$ 是自伴矩陣。
  2. $T$ 是對角矩陣且對角線項均為實數。
Prove that the following are equivalent: 1. $T$ is a Hermitian matrix. 2. $T$ is a real diagonal matrix.
Exercise 7¶

利用第 6 題及薛爾上三角化證明以下定理。

Use 6 and the Schur triangulation lemma to prove the following theorems.
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.

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

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

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.
Exercise 8¶

實際上,要證明一個自伴矩陣的特徵值均為實數
不一定要用到譜定理。

令 $A$ 為一自伴矩陣。
若 $A\bx = \lambda \bx$,考慮 $\bx^* A \bx$ 及其共軛轉置。
藉此說明 $A$ 的特徵值均為實數。

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.
Exercise 9¶

以下練習探討么正矩陣和實垂直矩陣的相關性質。

The following exercises studies the basic properties of unitary matrices and real orthogonal matrices.
Exercise 9(a)¶

說明么正矩陣是正規矩陣。
藉此說明么正矩陣可以被么正矩陣對角化。
並證明其特徵值的絕對值均為 $1$。

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$.
Exercise 9(b)¶

說明實垂直矩陣可以被么正矩陣對角化、
其特徵值的絕對值均為 $1$、
而且其特徵值對實軸對稱。

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.