--- tags: Linear Algebra - HungYiLee --- Linear Algebra - Lec 21~22: Coordinate System === [TOC] # [課程網站](http://speech.ee.ntu.edu.tw/~tlkagk/courses_LA18.html) # [Lecture 21: Coordinate System](https://www.youtube.com/watch?v=im3kTm9jGEM&list=PLJV_el3uVTsNmr39gwbyV-0KjULUsN7fW&index=21) ## Outline ![](https://i.imgur.com/f2MBkRK.png) - **basis 可以組成一個 coordinate system** - coordinate system 是一種拿來描述 vector 的**觀點 (viewpoint)** ## Vector in different Coordinate System ![](https://i.imgur.com/jwXQ8Ds.png) - vector $\begin{bmatrix}a\\b\end{bmatrix}$ 其實可以被視為 $a\begin{bmatrix}1\\0\end{bmatrix}+b\begin{bmatrix}0\\1\end{bmatrix}$ - example: - 在 cooodinate system $\{\begin{bmatrix}1\\0\end{bmatrix},\begin{bmatrix}0\\1\end{bmatrix}\}$ 下的 vector $\begin{bmatrix}8\\4\end{bmatrix}$ 是 $8\begin{bmatrix}1\\0\end{bmatrix}+4\begin{bmatrix}0\\1\end{bmatrix}$ - 但卻是 coordinate system $\{\begin{bmatrix}1\\1\end{bmatrix},\begin{bmatrix}-1\\1\end{bmatrix}\}$ 下的 $\begin{bmatrix}6\\-2\end{bmatrix}$ <!-- 不確定是否正確 - 自行補充: - 同理,在 coordinate system $\{\begin{bmatrix}1\\1\end{bmatrix},\begin{bmatrix}-1\\1\end{bmatrix}\}$ 下的 $\begin{bmatrix}8\\4\end{bmatrix}$,則是 $8\begin{bmatrix}1\\1\end{bmatrix}+4\begin{bmatrix}-1\\1\end{bmatrix}$ - 即 coordinate system $\{\begin{bmatrix}1\\0\end{bmatrix},\begin{bmatrix}0\\1\end{bmatrix}\}$ 下的 $\begin{bmatrix}4\\12\end{bmatrix}$ --> ## Coordinate System ![](https://i.imgur.com/8aCKOwH.png) 滿足以下要求,vector set $\mathcal B$ 才能被稱作 $\mathbb R^n$ 的 coordinate system 要求: 1. 每個 vector 都要有辦法被表示 2. 每個 vector 的表示都是唯一的 因此必須滿足 1. **vector set $\mathcal B$ spans the $\mathbb R^n$** 2. **vector set $\mathcal B$ is independent** 結論: - a vector set $\mathcal B$ can be considered as a coordinate system for $\mathbb R^n$ **if $\mathcal B$ is a basis of $\mathbb R^n$** ## Why Basis? (Proof) ![](https://i.imgur.com/gIFiMQ1.png) ## Coordinate System ![](https://i.imgur.com/YKG6z96.png) - 現在把 $\mathbb R^n$ 的 basis $\mathcal B=\{u_1,...,u_n\}$ 當作 coordinate system 來用 - 那麼對於任意的 vector $v\in\mathbb R^n$,我們都可以找到 以 $\mathcal B$ 的觀點來看 $v$ 的唯一的 vector $[v]_{\mathcal B}=\begin{bmatrix}c_1\\c_2\\\vdots\\c_n\end{bmatrix}$ 使得 $v=c_1u_1+c_2u_2+...+c_nu_n$ ## B-coordinate vector ![](https://i.imgur.com/uBTzibc.png) - $v$ 通常指在直角坐標系 $\epsilon$ 描述的 vector - 直角坐標系 $\epsilon$ 又稱 笛卡爾坐標系 (Cartesian coordinate system) - $[\cdot]_\mathcal B$ 指在 $\mathcal B$ 下描述的 vector - $[v]_\mathcal\epsilon = v$ ## 坐標系間的轉換 ### Other System -> Cartesian ![](https://i.imgur.com/qFQmwob.png) - 令 vector set $\mathcal B=\{u_1,...,u_n\}$ 組成 coordinate system $\mathbb R^n$ - 若已知 $[v]_\mathcal B$,如何求原來的 $v$ 呢? - 把 $\mathcal B$ 的 vector 排成矩陣 $B=\begin{bmatrix}u_1&u_2&\cdots&u_n\end{bmatrix}$ - $v=B[v]_\mathcal B$ ![](https://i.imgur.com/kiC1vvh.png) ### Cartesian -> Other System ![](https://i.imgur.com/26IqmSt.png) - 反之同理,令 vector set $\mathcal B=\{u_1,...,u_n\}$ 組成 coordinate system $\mathbb R^n$,若已知 $v$,求 $[v]_\mathcal B$? - $[v]_\mathcal B = B^{-1}v$ ### Summary: Cartesian <-> Other System ![](https://i.imgur.com/7o2QbJV.png) 總結: 令 $\mathcal B=\{b_1,...,b_n\}$ 為 $\mathbb R^n$ 的 basis,則 - $[v]_\mathcal B=B^{-1}v$ - 記憶法:從正常世界進到魔法世界需要經過 9又3/4月台? - $v = B[v]_\mathcal B$ - $[b_i]_\mathcal B = e_i$ - proof? ## Changing Coordinates ### Example: Equation of ellipse ![](https://i.imgur.com/0SBdW6J.png) ![](https://i.imgur.com/grBoodg.png) ![](https://i.imgur.com/H6ljDVx.png) ### Example: Equation of hyperbola 懶ㄉ放ㄌ # [Lecture 22: Linear Function in Coordinate System](https://www.youtube.com/watch?v=IrAdVhE6VqI&list=PLJV_el3uVTsNmr39gwbyV-0KjULUsN7fW&index=22) ## Basic Idea ![](https://i.imgur.com/2mjDozP.png) - 某些複雜的 function,在轉換了坐標系之後,會變成簡單的 function ## Example ![](https://i.imgur.com/oAj7cXH.png) - 例如說,針對某條線鏡射,這樣的 transformation 可以用一個 matrix $T$ 來表示。 - 想要求得 $T$,可以利用 standard vector $e_1,e_2,...$ 代入 transformation 得到的值,就可以知道 $T$ 的 column。然而這樣仍然很難計算出 $T$ ![](https://i.imgur.com/JjXFtVg.png) - 但是若 $\mathcal L$ 不是任意一條直線,而是一個 special case:水平線,這樣就好算很多了 - special case $T'=\begin{bmatrix}1&0\\0&-1\end{bmatrix}$ ### Describing the function in another coordinate system ![](https://i.imgur.com/xuAKKw7.png) - 既然如此,我們就找到一個 coordinate system $\mathcal B=\{b_1,b_2\}$,使得該直線 $\mathcal L$ 就是該 coordinate system 的水平線。 - 新的 notation $[T]_\mathcal B$:在 coordinate system $\mathcal B$ 中去看 $T$ 這個 transformation 長怎樣 - input and output are both in $\mathcal B$ - 也就是說在我們的 case 中,$[T]_\mathcal B=T'=\begin{bmatrix}1&0\\0&-1\end{bmatrix}$ - 另一個觀點 - $[b_1]_\mathcal B=e_1$ - $[b_2]_\mathcal B=e_2$ - 想知道 $[T]_\mathcal B$ 的話,就把 $\mathcal B$ 這個 coordinate system 的 standard vector 代到 $[T]_\mathcal B$ 裡面就知道它的每個 column 是什麼了 - 因此 $[T]_\mathcal B=\begin{bmatrix}1&0\\0&-1\end{bmatrix}$ ## 流程 ![](https://i.imgur.com/63uyJFS.png) ## 流程 - 殊途同歸 ![](https://i.imgur.com/Lj8moji.png) - 如此一來,$[T]$ 這個 transformation 其實和 走上面 3 個箭頭繞路是相同的 transformation,可以得到 - $[T]=B[T]_\mathcal BB^{-1}$ - 既然已經知道 $[T]=B[T]_\mathcal BB^{-1}$,那麼等號兩邊做乘法也可以得到 - $[T]_\mathcal B=B^{-1}[T]B$ ### Similar - 這裡衍伸一個名詞 **similar** - 若找得到 invertible matrix $P$ 使得 $A'=PAP^{-1}$,則我們說 $A$ 和 $A'$ 是 similar 的。 ### Example 1 ![](https://i.imgur.com/f3aQaMa.png) ### Example 2 ![](https://i.imgur.com/2IpxuXu.png) ### Example 3 ![](https://i.imgur.com/hME70o5.png) - 為了講解 coordinate system 所以用了迂迴的解法 ## Conclusion ![](https://i.imgur.com/F3T3dRg.png) 拿全面啟動舉例XDDDDD - 現實中很困難的任務,可以藉由另一個空間較簡單的任務達成 - by Inception