Change of 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_good_matrix
Let $V$ be a vector space.
Let $\alpha = \{\bv_1, \ldots, \bv_n\}$ and $\beta = \{\bu_1, \ldots, \bu_n\}$ be two bases of $V$.
Each vector $\bb$ can have different representations $[\bb]_\alpha$ and $[\bb]_\beta$ depending on the bases used.
Let $[\idmap]_\alpha^\beta$ be the $n \times n$ matrix
$$\begin{bmatrix}
| & ~ & | \\
[\bv_1]_\beta & \cdots & [\bv_n]_\beta \\
| & ~ & | \\
\end{bmatrix}$$.
Then $[\idmap]_\alpha^\beta [\bb]_\alpha = [\bb]_\beta$ for any $\bb\in V$.
Therefore, we call $[\idmap]_\alpha^\beta$ the change of basis matrix from $\alpha$ to $\beta$.
(The notation $[\idmap]_\alpha^\beta$ means it is an identity map from $V$ to $V$ but we are observing the domain and the codomain from the points of view of $\alpha$ and $\beta$.
This notation will be more clear when we introduce the matrix representation of a linear function.)
The change of basis matrix $[\idmap]_\alpha^\beta$ can be viewed as a function taking the representation in $\alpha$ and output the representation in $\beta$.
Therefore, if we have another basis $\gamma$, then we have
Note that a matrix takes its input vector from the right, so we should read a product of matrices from right to left.
### code
set_random_seed(0)
print_ans = False
A = random_good_matrix(3,3,3, bound=3)
B = random_good_matrix(3,3,3, bound=3)
e1,e2,e3 = identity_matrix(3).transpose()
u1,u2,u3 = A.transpose()
v1,v2,v3 = B.transpose()
print("alpha has three vectors:")
print("e1 =", e1)
print("e2 =", e2)
print("e3 =", e3)
print("beta has three vectors:")
print("u1 =", u1)
print("u2 =", u2)
print("u3 =", u3)
print("gamma has three vectors:")
print("v1 =", v1)
print("v2 =", v2)
print("v3 =", v3)
if print_ans:
print("[id]_alpha^beta =")
show(A.inverse())
print("[id]_beta^alpha =")
show(A)
print("[id]_beta^gamma =")
show(B.inverse() * A)
print("[id]_alpha^gamma =")
show(B.inverse())
計算 $[\idmap]_\alpha^\beta$ 及 $[\idmap]_\beta^\alpha$,
並確認 $[\idmap]_\beta^\alpha [\idmap]_\alpha^\beta = I_3$。
Find $[\idmap]_\alpha^\beta$ and $[\idmap]_\beta^\alpha$. Then verify $[\idmap]_\beta^\alpha [\idmap]_\alpha^\beta = I_3$.
計算 $[\idmap]_\beta^\gamma$ 及 $[\idmap]_\alpha^\gamma$,
並確認 $[\idmap]_\beta^\gamma [\idmap]_\alpha^\beta = [\idmap]_\alpha^\gamma$。
Find $[\idmap]_\beta^\gamma$ and $[\idmap]_\alpha^\gamma$. Then verify $[\idmap]_\beta^\gamma [\idmap]_\alpha^\beta = [\idmap]_\alpha^\gamma$.
對於以下的各向量空間 $V$、
以及兩個基底 $\alpha$ 和 $\beta$﹐
求出 $[\idmap]_\alpha^\beta$ 和 $[\idmap]_\beta^\alpha$。
For each of the following vector space $V$ and two bases $\alpha$ and $\beta$, find $[\idmap]_\alpha^\beta$ and $[\idmap]_\beta^\alpha$.
令 $V = \mathbb{R}^3$、
$\alpha = \{\be_1, \be_2, \be_3\}$ 為標準基底、
Let $V = \mathbb{R}^3$, $\alpha = \{\be_1, \be_2, \be_3\}$ be the standard basis, and
$$ \beta = \left\{\begin{aligned} \bu_1 = (0,0,1), \\ \bu_2 = (0,1,1), \\ \bu_3 = (1,1,1) \end{aligned}\right\}. $$令 $V = \mathbb{R}^3$、
$\alpha = \{\be_1, \be_2, \be_3\}$ 為標準基底、
Let $V = \mathbb{R}^3$, $\alpha = \{\be_1, \be_2, \be_3\}$ be the standard basis, and
$$ \beta = \left\{\begin{aligned} \bu_1 = (\frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}), \\ \bu_2 = (\frac{1}{\sqrt{2}},-\frac{1}{\sqrt{2}},0), \\ \bu_3 = (\frac{1}{\sqrt{6}},\frac{1}{\sqrt{6}},-\frac{2}{\sqrt{6}}) \end{aligned}\right\}. $$令 $V = \mathcal{P}_2$、
$\alpha = \{1, x, x^2\}$ 為標準基底、
$\beta = \{1, 1-x, (1-x)^2\}$。
Let $V = \mathcal{P}_2$, $\alpha = \{1, x, x^2\}$ be the standard basis, and $\beta = \{1, 1-x, (1-x)^2\}$.
令
$$ \begin{aligned} p_1(x) &= \frac{(x-2)(x-3)}{(1-2)(1-3)}, \\ p_2(x) &= \frac{(x-1)(x-3)}{(2-1)(2-3)}, \\ p_3(x) &= \frac{(x-1)(x-2)}{(3-1)(3-2)}. \\ \end{aligned} $$令 $V = \mathcal{P}_2$、
$\alpha = \{1, x, x^2\}$ 為標準基底、
$\beta = \{p_1, p_2, p_3\}$。
Let
$$ \begin{aligned} p_1(x) &= \frac{(x-2)(x-3)}{(1-2)(1-3)}, \\ p_2(x) &= \frac{(x-1)(x-3)}{(2-1)(2-3)}, \\ p_3(x) &= \frac{(x-1)(x-2)}{(3-1)(3-2)}. \\ \end{aligned} $$Let $V = \mathcal{P}_2$, $\alpha = \{1, x, x^2\}$ be the standard basis, and $\beta = \{p_1, p_2, p_3\}$.
說明以下三個等式的直觀解釋:
Give some intuition to the following identities:
我們已經看到每個基底轉換矩陣 $[\idmap]_\alpha^\beta$ 都是可逆的﹐而且其逆矩陣就是 $[\idmap]_\beta^\alpha$。
證明每個 $n\times n$ 的可逆矩陣也可以寫成 $\mathbb{R}^n$ 中的兩組基底 $\alpha$ 和 $\beta$ 所建構出來的基底轉移矩陣。
(把 $\alpha$ 取為 $A$ 的各行向量、
$\beta$ 取為標準基底。)
We have seen that every change of basis matrix $[\idmap]_\alpha^\beta$ is invertible and its inverse is $[\idmap]_\beta^\alpha$. Show that every $n\times n$ matrix can be written as the change of basis matrix in $\mathbb{R}^n$ for some basis $\alpha$ and $\beta$.
Hint: You may choose $\alpha$ as the columns of $A$ and $\beta$ as the standard basis of $\mathbb{R}^n$.