Find a good basis
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}}$
from lingeo import random_int_list, random_good_matrix
Let $A$ be an $n\times n$ matrix.
Recall that $f_A:\mathbb{R}^n \rightarrow \mathbb{R}^n$ is the function defined by $f_A(\bx) = A\bx$.
Using the standard basis $\mathcal{E}_n$, the matrix representation of $f_A$ is
In constrast, the matrix representation of $f_A$ with respect to another basis $\beta$ is
$$ [f_A]_\beta^\beta = [\idmap]_{\mathcal{E}_n}^\beta [f_A] [\idmap]_\beta^{\mathcal{E}_n}. $$If we let $Q = [\idmap]_\beta^{\mathcal{E}_n}$, then the columns of $Q$ are the vectors in $\beta$.
Also, we can write, $[f_A]_\beta^\beta = Q^{-1}AQ$.
On a matrix level, we say $A$ and $B$ are similar if there is an invertible matrix $Q$ such that $B = Q^{-1}AQ$.
In other words, $A$ and $B$ are just the same linear function represented under different bases.
Suppose $\beta = \{\bv_1, \ldots, \bv_n\}$ has the nice property that
$$ A\bv_i = \lambda_i \bv_i $$for some values $\lambda_i$ and for $i = 1,\ldots, n$.
Then we know
$$ [f_A]_\beta^\beta = \begin{bmatrix} | & ~ & | \\ [f_A(\bv_1)]_\beta & \cdots & [f_A(\bv_n)]_\beta \\ | & ~ & | \\ \end{bmatrix} = \begin{bmatrix} | & ~ & | \\ [\lambda_1\bv_1]_\beta & \cdots & [\lambda_n\bv_n]_\beta \\ | & ~ & | \\ \end{bmatrix} = \begin{bmatrix} \lambda_1 & ~ & ~ \\ ~ & \ddots & ~ \\ ~ & ~ & \lambda_n \end{bmatrix}, $$which is a diagonal matrix.
In this case, we say $A$ is diagonalizable .
Whenever $A\bv = \lambda\bv$ for some value $\lambda$ and some nonzero vector $\bv$,
we say $\lambda$ is an eigenvalue of $A$ and
$\bv$ is an eigenvector of $A$ with respect to $\lambda$.
Similarly, if $f: V\rightarrow V$ is a linear function and
$f(\bv) = \lambda \bv$ for some value $\lambda$ and some nonzero vector $\bv$,
then we say $\lambda$ is an eigenvalue of $f$ and
$\bv$ is an eigenvector of $f$ with respect to $\lambda$.
Let $A$ be an $n\times n$ matrix. Then the following are equivalent.
When $A$ is a real symmetric matrix (meaning $A\trans = A$), such a nice basis exists;
moreover, it can be chosen to be orthonormal, so the corresponding $Q$ has $Q\trans = Q^{-1}$.
Let $A$ be an $n\times n$ symmetric matrix.
Then there is an orthonormal basis $\beta$ of $\mathbb{R}^n$ such that $[f_A]_\beta^\beta = D$ is a diagonal matrix.
That is, there is an orthogonal matrix $Q$ such that $Q^\top AQ = D$ is a diagonal matrix.
執行以下程式碼。
令 $\beta = \{\bv_1, \cdots, \bv_n\}$ 為 $Q$ 的各行向量。
Run the code below. Let $\beta = \{\bv_1, \cdots, \bv_n\}$ be the columns of $Q$.
### code
set_random_seed(0)
print_ans = False
n = 3
D = diagonal_matrix(random_int_list(n, 3))
Q = random_good_matrix(n,n,n, 2)
A = Q * D * Q.inverse()
pretty_print(LatexExpr("A ="), A)
pretty_print(LatexExpr("Q ="), Q)
if print_ans:
v1, v2, v3 = Q.columns()
u1, u2, u3 = D.columns()
print("f_A(v1) =", A * v1)
print("vector representation =", u1)
print("f_A(v1) =", A * v2)
print("vector representation =", u2)
print("f_A(v1) =", A * v3)
print("vector representation =", u3)
print("matrix represesntation =")
pretty_print(D)
對以下的矩陣 $A$ 及基底 $\beta$,
求出 $[f_A]_\beta^\beta$。
For each of the following matrices $A$ and bases $\beta$, find $[f_A]_\beta^\beta$.
以下練習說明有些時候儘管矩陣無法對角化,
還是可以把 $[f_A]_\beta^\beta$ 化成一定簡單的形式。
未來會學到這些例子叫喬丹標準型。
對以下的矩陣 $A$ 及基底 $\beta$,
求出 $[f_A]_\beta^\beta$。
The following exercises demonstrate some examples where we can find a basis to simplify $[f_A]_\beta^\beta$ even if the matrix is not diagonalizable.
For each of the following matrices $A$ and bases $\beta$, find $[f_A]_\beta^\beta$.
對以下的矩陣 $A$ 及基底 $\beta$,
求出 $[f_A]_\beta^\beta$。
For each of the following matrices $A$ and bases $\beta$, find $[f_A]_\beta^\beta$.
令 $A$ 及 $B$ 為兩 $n\times n$ 矩陣,而 $Q$ 為一 $n\times n$ 可逆矩陣。
Let $A$ and $B$ be $n\times n$ matrices and $Q$ an $n\times n$ invertible matrix.
以矩陣運算說明
$$ Q^{-1}AQ + Q^{-1}BQ = Q^{-1}(A + B)Q. $$By matrix arithemic, show that
$$ Q^{-1}AQ + Q^{-1}BQ = Q^{-1}(A + B)Q. $$利用 $f_A + f_B = f_{A + B}$ 的性質說明
$$ Q^{-1}AQ + Q^{-1}BQ = Q^{-1}(A + B)Q. $$Use the fact $f_A + f_B = f_{A + B}$ to show that
$$ Q^{-1}AQ + Q^{-1}BQ = Q^{-1}(A + B)Q. $$以矩陣運算說明
$$ (Q^{-1}AQ)^n = Q^{-1}A^nQ. $$By matrix arithemic, show that
$$ (Q^{-1}AQ)^n = Q^{-1}A^nQ. $$利用 $f_A \circ \cdots \circ f_A = f_{A^n}$ 的性質說明
$$ (Q^{-1}AQ)^n = Q^{-1}A^nQ, $$其中 $f_A \circ \cdots \circ f_A$ 是指將 $f_A$ 函數和自己合成 $n$ 次。
Use the fact $f_A \circ \cdots \circ f_A = f_{A^n}$ to show that
$$ (Q^{-1}AQ)^n = Q^{-1}A^nQ, $$where $f_A \circ \cdots \circ f_A$ is the composition of $f_A$ with itself $n$ times.
說明若 $A$ 可逆,則
$$ (Q^{-1}AQ)^{-1} = Q^{-1}A^{-1}Q. $$Show that
$$ (Q^{-1}AQ)^{-1} = Q^{-1}A^{-1}Q $$if $A$ is an invertible matrix.
對以下矩陣 $A$,利用 5(c) 的結果計算 $A^n$。
For the following matrices $A$, use the result in 5(c) to find $A^n$.
(參考 2(d)。)
$$ A = \begin{bmatrix} 0 & 1 \\ -6 & 5 \end{bmatrix}. $$See 2(d).
(參考 3(b)。)
$$ A = \begin{bmatrix} 0 & 1 \\ -4 & 4 \end{bmatrix}. $$See 3(b).
令 $A$ 及 $B$ 為兩 $n\times n$ 矩陣,而 $Q$ 為一 $n\times n$ 可逆矩陣。
若 $Q^{-1}AQ$ 和 $Q^{-1}BQ$ 都是對角矩陣,證明 $AB = BA$。
Let $A$ and $B$ be $n\times n$ matrices and $Q$ an $n\times n$ invertible matrix. Suppose both $Q^{-1}AQ$ and $Q^{-1}BQ$ are diagonal matrices. Show that $AB = BA$.