---
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

- **basis 可以組成一個 coordinate system**
- coordinate system 是一種拿來描述 vector 的**觀點 (viewpoint)**
## Vector in different Coordinate System

- 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

滿足以下要求,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)

## Coordinate System

- 現在把 $\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

- $v$ 通常指在直角坐標系 $\epsilon$ 描述的 vector
- 直角坐標系 $\epsilon$ 又稱 笛卡爾坐標系 (Cartesian coordinate system)
- $[\cdot]_\mathcal B$ 指在 $\mathcal B$ 下描述的 vector
- $[v]_\mathcal\epsilon = v$
## 坐標系間的轉換
### Other System -> Cartesian

- 令 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$

### Cartesian -> Other System

- 反之同理,令 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

總結:
令 $\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



### 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

- 某些複雜的 function,在轉換了坐標系之後,會變成簡單的 function
## Example

- 例如說,針對某條線鏡射,這樣的 transformation 可以用一個 matrix $T$ 來表示。
- 想要求得 $T$,可以利用 standard vector $e_1,e_2,...$ 代入 transformation 得到的值,就可以知道 $T$ 的 column。然而這樣仍然很難計算出 $T$

- 但是若 $\mathcal L$ 不是任意一條直線,而是一個 special case:水平線,這樣就好算很多了
- special case $T'=\begin{bmatrix}1&0\\0&-1\end{bmatrix}$
### Describing the function in another coordinate system

- 既然如此,我們就找到一個 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}$
## 流程

## 流程 - 殊途同歸

- 如此一來,$[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

### Example 2

### Example 3

- 為了講解 coordinate system 所以用了迂迴的解法
## Conclusion

拿全面啟動舉例XDDDDD
- 現實中很困難的任務,可以藉由另一個空間較簡單的任務達成
- by Inception