跳到主要內容

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

考慮 $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{v}}]_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}\]

留言

這個網誌中的熱門文章

[數學分析] 什麼是若且唯若 "if and only if"

數學上的 if and only if  ( 此文不討論邏輯學中的 if and only if,只討論數學上的 if and only if。) 中文翻譯叫做  若且唯若 (or 當且僅當) , 記得當初剛接觸這個詞彙的時候,我是完全不明白到底是甚麼意思,查了翻譯也是愛莫能助,畢竟有翻跟沒翻一樣,都是有看沒有懂。 在數學上如果看到 if and only if  這類的句子,其實是表示一種 雙條件句 ,通常可以直接將其視為" 定義(Definition)" 待之,今天要分享的是這樣的一個句子如何用比較直觀的方法去看他 假設我們現在有 兩個邏輯陳述句 A 與  B. 注意到,在此我們不必考慮這兩個陳述句到底是什麼,想表達什麼,或者到底是否為真(true),這些都不重要。只要知道是兩個陳述即可。 現在,考慮新的陳述:  "A if and only if B" 好了,現在主角登場,我們可以怎麼看待這個句子呢? 事實上我們可以很直覺的把這句子拆成兩部分看待,也就是 "( A if B ) and ( A only if B )" 那麼先針對第一個部分  A if B  來看, 其實這句就是說  if B then A, 更直白一點就是 "if B is true, then A is also true".  在數學上等價可以寫為 "B implies A" .  或者更常用一個箭頭符號來表示 "B $\Rightarrow$  A"  現在針對第二個部分  A only if B 此句意指  "If B is not true, then A is also not true". 所以如果已知 A is true,  那麼按照上句不難推得 B is also true 也就是說  A only if B  等價為 "If A is true then B is also true". 同樣,也可以寫作   "A implies B"   或者用箭頭表示  "A   $\Rightarrow$     B".

[數學分析] 淺談各種基本範數 (Norm)

這次要介紹的是數學上一個重要的概念: Norm: 一般翻譯成 範數 (在英語中 norm 有規範的意思,比如我們說normalization就是把某種東西/物品/事件 做 正規化,也就是加上規範使其正常化),不過個人認為其實翻譯成 範數 也是看不懂的...這邊建議把 Norm 想成長度就好 (事實上norm是長度的抽象推廣), 也許讀者會認為好端端的長度不用,為何又要發明一個 norm 來自討苦吃?? 既抽象又艱澀。 事實上想法是這樣的: 比如說現在想要比較兩個數字 $3$ , $5$ 之間的大小,則我們可以馬上知道 $ 3 < 5 $;同樣的,如果再考慮小數與無理數如 $1.8753$ 與 $\pi$,我們仍然可以比較大小 $1.8753 < \pi = 3.1415...$ 故可以發現我們有辦法對 "純量" 做明確的比大小,WHY? 因為前述例子中 $3$, $5$, $1.8753$ or $\pi$ 其各自的大小有辦法被 "measure "! 但是如果是現在考慮的是一組數字 我們如何去measure 其大小呢?? 比如說 \[x:=[1, -2, 0.1, 0 ]^T \]上式的大小該是多少? 是 $1$? $-2$? $0.1$??? 再者如果更過分一點,我們考慮一個矩陣 \[A = \left[ {\begin{array}{*{20}{c}} 1&2\\ 3&4 \end{array}} \right] \],想要知道這個矩陣的大小又該怎麼辦?? 是 $1$ ? $2$ 還是 $4$ ?..其實現階段我們說不清楚。 也正是如此,可以發現我們確實需要新的 "長度" 的定義來幫助我們如何去 measure 矩陣/向量/甚至是函數的大小。 故此,我們首先定義甚麼是Norm,(也就是把 "長度" or "大小" 的本質抽離出來) ================== Definition: Norm 考慮 $V$ 為一個向量空間(Vector space),則我們說  Norm 為一個函數 $||\cdot|| : V \rightarrow \mathbb{R}$ 且滿足下列性質