對一個特徵向量化簡¶

Reduction

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_vec

Main idea¶

We start with some basic ideas on complex matrices.
Let $A$ be a complex matrix.
Then the conjugate transpose of $A$ is the matirx obtained from $A\trans$ by taking conjugate entrywisely.
Recall that if $\bx$ and $\by$ are complex column vectors, then their inner product is $\inp{\bx}{\by} = \by^* \bx$.

If a complex matrix $A$ satisfies $A^* A = AA^* = I$, then it is called a unitary matrix.
In comparison, if a real matrix satisfies $A\trans A = AA\trans = I$, then it is an orthogonal matrix.

Let $A$ be an $n\times n$ complex matrix.
Then the following are equivalent:

  • $A$ is a unitary matrix.
  • $A^{-1} = A^*$.
  • The columns of $A$ form an orthonormal basis of $\mathbb{C}^n$.
  • The rows of $A$ form an orthonormal basis of $\mathbb{C}^n$.

Let $\bv\in\mathbb{C}^n$ be a nonzero vector.
Then one may expand $\bv$ into a basis $\beta$ of $\mathbb{C}^n$ whose first vector is $\bv$.
Let $Q$ be the matrix whose columns are the vectors in $\beta$. Then $Q$ is an invertible matrix whose first column is $\bv$.
If necessary, one may apply the Gram–Schimdt process to obtain an orthonormal basis of $\mathbb{C}^n$ whose first vector is $\frac{\bv}{\|\bv\|}$.
Thus, there is a unitary matrix $Q$ whose first column is $\frac{\bv}{\|\bv\|}$.

Reduction lemma¶

Let $A$ be a complex matrix.
Suppose $\bv$ is an eigenvector of $A$ with respect to the eigenvalue $\lambda$.
Let $Q$ be an invertible matrix whose first column is $\bv$.
Then $Q^{-1}AQ$ has the form

$$ \begin{bmatrix} \lambda & * \\ \bzero & A_2 \end{bmatrix}. $$

Moreover, $Q$ can be chosen as a unitary matrix whose first column is $\frac{\bv}{\|\bv\|}$.

Remark¶

Note that the eigenvalues of a real matrix are not necessarily all real.
Suppose $A$ is a real matrix and $\lambda$ is a real eigenvalue of $A$.
Then the eigenvector $\bv\in\ker(A - \lambda I)$ can be chosen to be real.
Also, the $Q$ matrix in the reduction lemma can be chosen to be orthogonal.
However, $A_2$ can still possibly have a non-real eigenvalue.

Side stories¶

  • all-ones vector
  • cases of real matrices
  • properties of unitary/orthogonal matrices
  • discrete Fourier transform matrix

Experiments¶

Exercise 1¶

執行以下程式碼。
令 $\beta = \{\bu_1,\ldots,\bu_n\}$ 為 $Q$ 的行向量集合。

Run the code below. Let $\beta = \{\bu_1,\ldots,\bu_n\}$ be the columns of $Q$.
In [ ]:
### code
set_random_seed(0)
print_ans = False

n = 4
Q = identity_matrix(n)
Q[1:,0] = random_int_vec(n-1, 3)
D = matrix(n, random_int_vec(n**2,3))
D[1:,0] = vector([0] * (n-1))
A = Q * D * Q.inverse()

print("n =", n)
pretty_print(LatexExpr("A ="), A)
pretty_print(LatexExpr("Q ="), Q)

if print_ans:
    print("The representation of f_A(u1) with respect to beta is")
    pretty_print(D[:,0])
    pretty_print(LatexExpr("Q^{-1} ="), Q.inverse())
    pretty_print(LatexExpr("Q^{-1} A Q ="), Q.inverse() * A * Q)
Exercise 1(a)¶

求 $[f_A(\bu_1)]_\beta$。

Find $[f_A(\bu_1)]_\beta$.
Exercise 1(b)¶

求 $Q^{-1}$。

Find $Q^{-1}$.
Exercise 1(c)¶

求 $[f_A]_\beta^\beta$.

Find $[f_A]_\beta^\beta$.

Exercises¶

Exercise 2¶

令 $\bone$ 為全一向量。
(其長度將由文意決定。)
已知以下矩陣 $A$ 皆有 $\bone$ 這個特徵向量。
求出 $A$ 的所有特徵值。

Let $\bone$ be the all-ones vector (whose dimension will be clear by the context). It is known that each of the following matrices has $\bone$ as an eigenvector. Find all eigenvalues of $A$.
Exercise 2(a)¶
$$ A = \begin{bmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{bmatrix}. $$
Exercise 2(b)¶
$$ A = \begin{bmatrix} 0 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 0 \end{bmatrix}. $$
Exercise 2(c)¶
$$ A = \begin{bmatrix} 1 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 1 \end{bmatrix}. $$
Exercise 2(d)¶
$$ A = \begin{bmatrix} 0.2 & 0.8 & 0 \\ 0.4 & 0.2 & 0.4 \\ 0 & 0.8 & 0.2 \end{bmatrix}. $$
Exercise 3¶

令

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

已知 $\bone$ 為 $A$ 的一特徵值。
求 $A$ 的所有特徵值。

提示:將 $A$ 對 $\bone$ 化簡後,再對 $A_2$ 化簡一次。

Let $$ A = \begin{bmatrix} 0 & 1 & 1 & 1 \\ 1 & 2 & 0 & 0 \\ 1 & 0 & 2 & 0 \\ 1 & 0 & 0 & 2 \\ \end{bmatrix}. $$ It is known that $\bone$ is an eigenvector of $A$. Find all eigenvalues of $A$. Hint: Apply the reduction lemma to $A$ and $\bone$ to get $A_2$. Then apply the lemma again to $A_2$.
Exercise 4¶

令

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

Let $$ A = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{bmatrix}. $$
Exercise 4(a)¶

令 $\omega = e^{\frac{2\pi}{3}i}$ 且

$$ \bv = \begin{bmatrix} 1 \\ \omega \\ \omega^2 \end{bmatrix}. $$

求出 $\bv$ 所對應的特徵值 $\lambda$,
並說明如何找到一個么正矩陣 $Q$ 使得

$$ Q^* AQ = \begin{bmatrix} \lambda & * \\ \bzero & A_2 \end{bmatrix}. $$ Let $\omega = e^{\frac{2\pi}{3}i}$ and $$ \bv = \begin{bmatrix} 1 \\ \omega \\ \omega^2 \end{bmatrix}. $$ Find the eigenvalue $\lambda$ corresponding to $\bv$. Then explain how to find a unitary matrix $Q$ such that $$ Q^* AQ = \begin{bmatrix} \lambda & * \\ \bzero & A_2 \end{bmatrix}. $$
Exercise 4(b)¶

令

$$ \bv = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}. $$

求出 $\bv$ 所對應的特徵值 $\lambda$,
並說明如何找到一個實垂直矩陣 $Q$ 使得

$$ Q\trans AQ = \begin{bmatrix} \lambda & * \\ \bzero & A_2 \end{bmatrix}. $$

Let $$ \bv = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}. $$ Find the eigenvalue $\lambda$ corresponding to $\bv$. Then explain how to find a unitary matrix $Q$ such that $$ Q^* AQ = \begin{bmatrix} \lambda & * \\ \bzero & A_2 \end{bmatrix}. $$
Exercise 4(c)¶

令 $\omega = e^{\frac{2\pi}{3}i}$ 且

$$ \bv = \begin{bmatrix} 1 \\ \omega \\ \omega^2 \end{bmatrix}. $$

已知 $\bv$ 所對應的特徵值為 $\omega = a + bi$。 令 $\bv = \bx + \by i$,也就是 $\bx$ 和 $\by$ 分別為 $\bv$ 的實部和虛部向量。

驗證

$$ \begin{aligned} A \bx &= a\bx - b\by, \\ A \by &= b\bx + a\by. \end{aligned} $$

並說明如何找到一個可逆矩陣 $Q$ 使得

$$ Q^{-1} AQ = \begin{bmatrix} a & b & * \\ -b & a & * \\ 0 & 0 & A_2 \end{bmatrix}. $$

Let $\omega = e^{\frac{2\pi}{3}i}$ 且 $$ \bv = \begin{bmatrix} 1 \\ \omega \\ \omega^2 \end{bmatrix}. $$ It is known that $\omega = a + bi$ is the eigenvalue corresponding to $\bv$. Let $\bv = \bx + \by i$ such that $\bx$ and $\by$ are both real vectors. Verify that $$ \begin{aligned} A \bx &= a\bx - b\by, \\ A \by &= b\bx + a\by. \end{aligned} $$ Then find the eigenvalue $\lambda$ corresponding to $\bv$. Then explain how to find a unitary matrix $Q$ such that $$ Q^{-1} AQ = \begin{bmatrix} a & b & * \\ -b & a & * \\ 0 & 0 & A_2 \end{bmatrix}. $$
Exercise 5¶

令 $Q$ 為一 $n\times n$ 么正矩陣,而 $\bx,\by\in\mathbb{C}^n$。
證明 $\inp{\bx}{\by} = \inp{Q\bx}{Q\by}$。
(上述性質在當 $Q$ 是實垂直矩陣而 $\bx$ 和 $\by$ 為實向量時也對。)

這表示 $\bv\mapsto Q\bv$ 這個動作不會改變 $\bv$ 的長度,
因此么正矩陣和實垂直矩陣常被視為高維度的鏡射和旋轉。
(我們沒有說清楚高維度的鏡射和旋轉是什麼意思。)

Let $Q$ be an $n\times n$ unitary matrix and $\bx,\by\in\mathbb{C}^n$. Show that $\inp{\bx}{\by} = \inp{Q\bx}{Q\by}$. (The same statement also holds when $Q$ is a real orthogonal matrix and $\bx$ and $\by$ are real vectors.) Therefore, the mapping $\bv\mapsto Q\bv$ preserves the length of any vector $\bv$, so unitary matrices and real orthogonal matrices are usually viewed as reflections or rotations in higher dimensions. (However, we did not clarify the meaning of reflections and rotations.)
Exercise 6¶

固定一個正整數 $n$。
令 $\zeta = e^{\frac{2\pi}{n}i}$,
並令 $Q$ 為一 $n\times n$ 矩陣,
其第 $a,b$-項為 $\zeta^{a-1}{b-1}$。

證明 $Q$ 是一個么正矩陣。
(這個矩陣稱為離散傅立葉變換矩陣 。)

Fix a positive integer $n$. Let $\zeta = e^{\frac{2\pi}{n}i}$ and $Q$ the $n\times n$ matrix whose $a,b$-entry is $\zeta^{a-1}{b-1}$. Show that $Q$ is a unitary matrix. (The matrix $Q$ is known as the **discrete Fourier transform matrix** .)