2015年10月30日 星期五

[線性代數] 座標轉換矩陣

考慮 $V$ 為 $n$ 維向量空間,且 ${\bf v} \in V$。現在考慮兩組 有序基底 (ordered basis)
\[\begin{array}{l} S: = \{ {{\bf{v}}_1},{{\bf{v}}_2},...,{{\bf{v}}_n}\} \\ T: = \{ {{\bf{w}}_1},{{\bf{w}}_2},...,{{\bf{w}}_n}\} \end{array}\]
則 我們可將 ${\bf v}$ 用上述有序基底做線性組合唯一表示,比如說
\[
{\bf v} = c_1 { {\bf w}_1} + ... c_n {\bf w}_n
\]且其對應於  $T$ 基底的 座標向量 (coordinate vector) 與 對 $S$ 基底的 coordinate vector 我們定義如下 
\[{\left[ {\bf{v}} \right]_T} := \left[ {\begin{array}{*{20}{l}}
{{c_1}}\\
{{c_2}}\\
 \vdots \\
{{c_n}}
\end{array}} \right]; \;\;{[{\bf{w}}]_S} := \left[ \begin{array}{l}
{a_1}\\
{a_2}\\
 \vdots \\
{a_n}
\end{array} \right]
\]注意到事實上 上述 對 $T$ 基底的 coordinate vector 可看成是函數,比如說令 $L: V \to \mathbb{R}^n$ 滿足
\[
L({\bf v}) = [{\bf v}]_T
\]同理,對 $S$ 基底的 coordinate vector 令 $L': V \to \mathbb{R}^n$ 滿足
\[
L'({\bf v}) = [{\bf v}]_S
\]
Comment:
1. 上述 $L, L'$ 統稱為 coordinate mapping
2. Coordinate mapping 為 bijective linear transformation 或稱 isomorphism。

現在若我們想建構 對於 $S$ 基底的座標向量 與 $T$ 基底座標向量之間兩者的關係,利用  coordinate mapping $[{\bf v}]_S$ 為 linear transformation 性質 ,我們有
\[\begin{array}{l}
{[{\bf{v}}]_S} = {[{c_1}{{\bf{w}}_1} + ...{c_n}{{\bf{w}}_n}]_S}\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} = {[{c_1}{{\bf{w}}_1}]_S} + ... + {[{c_n}{{\bf{w}}_n}]_S}\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} = {c_1}{[{{\bf{w}}_1}]_S} + ... + {c_n}{[{{\bf{w}}_n}]_S}\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} = \left[ {\begin{array}{*{20}{c}}
|&|&{}&|\\
{{{[{{\bf{w}}_1}]}_S}}&{{{[{{\bf{w}}_2}]}_S}}&{...}&{{{[{{\bf{w}}_n}]}_S}}\\
|&|&{}&|
\end{array}} \right]\left[ \begin{array}{l}
{c_1}\\
{c_2}\\
 \vdots \\
{c_n}
\end{array} \right]\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} = {P_{S \leftarrow T}}\left[ \begin{array}{l}
{c_1}\\
{c_2}\\
 \vdots \\
{c_n}
\end{array} \right]
\end{array}\]其中 ${P_{S \leftarrow T}}: = \left[ {\begin{array}{*{20}{c}}
|&|&{}&|\\
{{{[{{\bf{w}}_1}]}_S}}&{{{[{{\bf{w}}_2}]}_S}}&{...}&{{{[{{\bf{w}}_n}]}_S}}\\
|&|&{}&|
\end{array}} \right]$ 稱為 從 $T$ 基底到 $S$ 基底的座標轉換矩陣  (Transition Matrix from T-basis to the S basis )且對於個別的 coordinate vector; e.g., $[{\bf w}_j]_S$ 我們有
\[{[{{\bf{w}}_j}]_S} = \left[ \begin{array}{l}
{a_{1j}}\\
{a_{2j}}\\
 \vdots \\
{a_{nj}}
\end{array} \right]\]
故我們有以下結果
\[
[{\bf v}]_S = P_{S \leftarrow T} [{\bf v}]_T
\]

以下是一些關於 Transition Matrix 的性質:
令 $S,T$ 為向量空間的兩組 ordered basis 則
FACT 1. $P_{T \leftarrow T} = I$
FACT 2. $P_{S \leftarrow T}$ 為 nonsingular

現在看幾個例子:

Example 1.
令 \[S: = \left\{ {{{\bf{v}}_1},{{\bf{v}}_2}} \right\} = \left\{ {\left[ \begin{array}{l}
1\\
2
\end{array} \right],\left[ \begin{array}{l}
0\\
1
\end{array} \right]} \right\};T: = \left\{ {{{\bf{w}}_1},{{\bf{w}}_2}} \right\} = \left\{ {\left[ \begin{array}{l}
1\\
1
\end{array} \right],\left[ \begin{array}{l}
2\\
3
\end{array} \right]} \right\}\]為 ordered bases for $\mathbb{R}^2$。現在令 ${\bf v} = [1 \;\; 5]^T$ 與 ${\bf w} := [5 \;\; 4]^T$ 。
(a) 試求 coordinate vectors $[{\bf v}]_T$ 與 $[{\bf w}]_T$
(b) 試求 $P_{S \leftarrow T}$
(c) 試求 coordinate vectors $[{\bf v}]_S$ 與 $[{\bf w}]_S$

Solution(a)
由 $[{\bf v}]_T$ 的定義可知 ${\left[ {\bf{v}} \right]_T} = \left[ \begin{array}{l}
{a_1}\\
{a_2}
\end{array} \right]$且
\[\begin{array}{l}
\left[ \begin{array}{l}
1\\
5
\end{array} \right] = {a_1}\left[ \begin{array}{l}
1\\
1
\end{array} \right] + {a_2}\left[ \begin{array}{l}
2\\
3
\end{array} \right]\\
 \Rightarrow \left[ {\begin{array}{*{20}{c}}
1&2\\
1&3
\end{array}} \right]\left[ \begin{array}{l}
{a_1}\\
{a_2}
\end{array} \right] = \left[ \begin{array}{l}
1\\
5
\end{array} \right]\\
 \Rightarrow \left\{ \begin{array}{l}
{a_1} =  - 7\\
{a_2} = 4
\end{array} \right.
\end{array}\]同理 ${\left[ {\bf{w}} \right]_T} = \left[ \begin{array}{l}
{b_1}\\
{b_2}
\end{array} \right]$
\[\begin{array}{l}
\underbrace {\left[ \begin{array}{l}
5\\
4
\end{array} \right]}_{ = {\bf{w}}} = {b_1}\left[ \begin{array}{l}
1\\
1
\end{array} \right] + {b_2}\left[ \begin{array}{l}
2\\
3
\end{array} \right]\\
 \Rightarrow \left[ {\begin{array}{*{20}{c}}
1&2\\
1&3
\end{array}} \right]\left[ \begin{array}{l}
{b_1}\\
{b_2}
\end{array} \right] = \left[ \begin{array}{l}
5\\
4
\end{array} \right]\\
 \Rightarrow \left\{ \begin{array}{l}
{b_1} = 7\\
{b_2} =  - 1
\end{array} \right.
\end{array}\]

Solution (b)
我們要求 $P_{S \leftarrow T}$,由 part (a) 可知我們有 $[{\bf v}]_T = [-7\;\;4]$ 故
\[\begin{array}{l}
{[{\bf{v}}]_S} = {\left[ { - 7{{\bf{w}}_1} + 4{{\bf{w}}_2}} \right]_S}\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} =  - 7{\left[ {{{\bf{w}}_1}} \right]_S} + 4{\left[ {{{\bf{w}}_2}} \right]_S}\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} = \underbrace {\left[ {\begin{array}{*{20}{c}}
|&|\\
{{{\left[ {{{\bf{w}}_1}} \right]}_S}}&{{{\left[ {{{\bf{w}}_2}} \right]}_S}}\\
|&|
\end{array}} \right]}_{ = {P_{S \leftarrow T}}}\underbrace {\left[ \begin{array}{l}
 - 7\\
4
\end{array} \right]}_{ = {{[{\bf{v}}]}_T}}\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} = \underbrace {\left[ {\begin{array}{*{20}{c}}
{{b_{11}}}&{{b_{12}}}\\
{{b_{21}}}&{{b_{22}}}
\end{array}} \right]}_{{P_{S \leftarrow T}}}\left[ \begin{array}{l}
 - 7\\
4
\end{array} \right]
\end{array}\]
現在我們分別求取 $[{\bf w}_1]_S$ 與 $[{\bf w}_2]_S$如下:
\[\begin{array}{l}
{\left[ {{{\bf{w}}_1}} \right]_S} = \left[ \begin{array}{l}
{b_{11}}\\
{b_{21}}
\end{array} \right]\\
 \Rightarrow {b_{11}}\left[ \begin{array}{l}
1\\
2
\end{array} \right] + {b_{21}}\left[ \begin{array}{l}
0\\
1
\end{array} \right] = \underbrace {\left[ \begin{array}{l}
1\\
1
\end{array} \right]}_{ = {{\bf{w}}_1}}\\
 \Rightarrow \left[ {\begin{array}{*{20}{c}}
1&0\\
2&1
\end{array}} \right]\left[ \begin{array}{l}
{b_{11}}\\
{b_{21}}
\end{array} \right] = \left[ \begin{array}{l}
1\\
1
\end{array} \right]\\
 \Rightarrow \left\{ \begin{array}{l}
{b_{11}} = 1\\
{b_{21}} =  - 1
\end{array} \right.
\end{array}\]

\[\begin{array}{l}
{\left[ {{{\bf{w}}_2}} \right]_S} = \left[ \begin{array}{l}
{b_{12}}\\
{b_{22}}
\end{array} \right]\\
 \Rightarrow {b_{12}}\left[ \begin{array}{l}
1\\
2
\end{array} \right] + {b_{22}}\left[ \begin{array}{l}
0\\
1
\end{array} \right] = \underbrace {\left[ \begin{array}{l}
2\\
3
\end{array} \right]}_{ = {{\bf{w}}_2}}\\
 \Rightarrow \left[ {\begin{array}{*{20}{c}}
1&0\\
2&1
\end{array}} \right]\left[ \begin{array}{l}
{b_{11}}\\
{b_{21}}
\end{array} \right] = \left[ \begin{array}{l}
2\\
3
\end{array} \right]\\
 \Rightarrow \left\{ \begin{array}{l}
{b_{12}} = 2\\
{b_{21}} =  - 1
\end{array} \right.
\end{array}\]故
\[{P_{S \leftarrow T}} = \left[ {\begin{array}{*{20}{c}}
1&2\\
{ - 1}&{ - 1}
\end{array}} \right]\]
Solution (c)
\[\begin{array}{l}
{[{\bf{v}}]_S} = {P_{S \leftarrow T}}{[{\bf{v}}]_T}\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} = \left[ {\begin{array}{*{20}{c}}
1&2\\
{ - 1}&{ - 1}
\end{array}} \right]\left[ \begin{array}{l}
 - 7\\
4
\end{array} \right] = \left[ \begin{array}{l}
1\\
3
\end{array} \right]\\
{[{\bf{w}}]_S} = {P_{S \leftarrow T}}{[{\bf{w}}]_T}\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} = \left[ {\begin{array}{*{20}{c}}
1&2\\
{ - 1}&{ - 1}
\end{array}} \right]\left[ \begin{array}{l}
7\\
 - 1
\end{array} \right] = \left[ \begin{array}{l}
5\\
 - 6
\end{array} \right]

\end{array}\]

Example 2.
令 $V:= \mathbb{R^3}$ 且令 $S:=\{{\bf v}_1,{\bf v}_2, {\bf v}_3\}$ 且 $T = \{{\bf w}_1, {\bf w}_2, {\bf w}_3\}$ 為  $\mathbb{R}^3$ 的ordered basis,其中
\[\begin{array}{l}
{{\bf{v}}_1} = \left[ \begin{array}{l}
2\\
0\\
1
\end{array} \right];{{\bf{v}}_2} = \left[ \begin{array}{l}
1\\
2\\
0
\end{array} \right];{{\bf{v}}_3} = \left[ \begin{array}{l}
1\\
1\\
1
\end{array} \right]\\
{{\bf{w}}_1} = \left[ \begin{array}{l}
6\\
3\\
3
\end{array} \right];{{\bf{w}}_2} = \left[ \begin{array}{l}
4\\
 - 1\\
3
\end{array} \right];{{\bf{w}}_3} = \left[ \begin{array}{l}
5\\
5\\
2
\end{array} \right]
\end{array}\]
(a) 試計算 $P_{S \leftarrow T}$
(Exercise) 令 ${\bf v} = [4 \;\; -9 \;\; 5]$ 驗證 $[{\bf v}]_S = P_{S \leftarrow T} [{\bf v}]_T$

Solution (a):
由前面討論可知
\[{P_{S \leftarrow T}}: = \left[ {\begin{array}{*{20}{c}}
|&|&|\\
{{{[{{\bf{w}}_1}]}_S}}&{{{[{{\bf{w}}_2}]}_S}}&{{{[{{\bf{w}}_3}]}_S}}\\
|&|&|
\end{array}} \right]\]故我們需分別求出 $[{\bf w}_1]_S, [{\bf w}_2]_S$ 與 $[{\bf w}_3]_S$:

首先求 ${[{{\bf{w}}_1}]_S} = \left[ \begin{array}{l}
{a_{11}}\\
{a_{21}}\\
{a_{31}}
\end{array} \right]$ 如下:由於 ${\bf w}_1$ 可用 $S$ 有序基底作唯一線性組合表示,故
\[\begin{array}{l}
\left[ \begin{array}{l}
6\\
3\\
3
\end{array} \right] = {a_{11}}\left[ \begin{array}{l}
2\\
0\\
1
\end{array} \right] + {a_{21}}\left[ \begin{array}{l}
1\\
2\\
0
\end{array} \right] + {a_{31}}\left[ \begin{array}{l}
1\\
1\\
1
\end{array} \right]\\
 \Rightarrow \left[ {\begin{array}{*{20}{c}}
2&1&1\\
0&2&1\\
1&0&1
\end{array}} \right]\left[ \begin{array}{l}
{a_{11}}\\
{a_{21}}\\
{a_{31}}
\end{array} \right] = \left[ \begin{array}{l}
6\\
3\\
3
\end{array} \right] \Rightarrow \left\{ \begin{array}{l}
{a_{11}} = 2\\
{a_{21}} = 1\\
{a_{31}} = 1
\end{array} \right.
\end{array}
\]
接著我們求 ${[{{\bf{w}}_2}]_S} = \left[ \begin{array}{l}
{a_{12}}\\
{a_{22}}\\
{a_{32}}
\end{array} \right]$ ,由 ${\bf w}_2$ 可用 $S$ 有序基底作唯一線性組合表示,我們可得
\[\begin{array}{l}
\left[ \begin{array}{l}
4\\
 - 1\\
3
\end{array} \right] = {a_{12}}\left[ \begin{array}{l}
2\\
0\\
1
\end{array} \right] + {a_{22}}\left[ \begin{array}{l}
1\\
2\\
0
\end{array} \right] + {a_{32}}\left[ \begin{array}{l}
1\\
1\\
1
\end{array} \right]\\
 \Rightarrow \left[ {\begin{array}{*{20}{c}}
2&1&1\\
0&2&1\\
1&0&1
\end{array}} \right]\left[ \begin{array}{l}
{a_{11}}\\
{a_{21}}\\
{a_{31}}
\end{array} \right] = \left[ \begin{array}{l}
4\\
 - 1\\
3
\end{array} \right] \Rightarrow \left\{ \begin{array}{l}
{a_{12}} = 2\\
{a_{22}} =  - 1\\
{a_{32}} = 1
\end{array} \right.
\end{array}\]
最後求 ${[{{\bf{w}}_3}]_S} = \left[ \begin{array}{l}
{a_{13}}\\
{a_{23}}\\
{a_{33}}
\end{array} \right]$,同前述方法,利用 ${\bf w}_3$ 可透過 $S$ 有序基底作唯一線性組合表示,我們可得
\[\begin{array}{l}
\left[ \begin{array}{l}
5\\
5\\
2
\end{array} \right] = {a_{13}}\left[ \begin{array}{l}
2\\
0\\
1
\end{array} \right] + {a_{23}}\left[ \begin{array}{l}
1\\
2\\
0
\end{array} \right] + {a_{33}}\left[ \begin{array}{l}
1\\
1\\
1
\end{array} \right]\\
 \Rightarrow \left[ {\begin{array}{*{20}{c}}
2&1&1\\
0&2&1\\
1&0&1
\end{array}} \right]\left[ \begin{array}{l}
{a_{11}}\\
{a_{21}}\\
{a_{31}}
\end{array} \right] = \left[ \begin{array}{l}
5\\
5\\
2
\end{array} \right] \Rightarrow \left\{ \begin{array}{l}
{a_{13}} = 1\\
{a_{23}} = 2\\
{a_{33}} = 1
\end{array} \right.
\end{array}\]
\[\begin{array}{l}
{P_{S \leftarrow T}}: = \left[ {\begin{array}{*{20}{c}}
|&|&|\\
{{{[{{\bf{w}}_1}]}_S}}&{{{[{{\bf{w}}_2}]}_S}}&{{{[{{\bf{w}}_3}]}_S}}\\
|&|&|
\end{array}} \right]\\
\begin{array}{*{20}{c}}
{}&{}
\end{array} = \left[ {\begin{array}{*{20}{c}}
{{a_{11}}}&{{a_{12}}}&{{a_{13}}}\\
{{a_{12}}}&{{a_{22}}}&{{a_{23}}}\\
{{a_{13}}}&{{a_{32}}}&{{a_{33}}}
\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}
2&2&1\\
1&{ - 1}&2\\
1&1&1
\end{array}} \right]
\end{array}\]