# 同構
Isomorphism

This work by Jephian Lin is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
$\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}}$
```python
from linspace import random_nvspace
```
## Main idea
Let $V$ and $U$ be two vector space.
An **isomorphism** from $V$ to $U$ is a bijective linear function from $V$ to $U$.
If there is an isomorphism from $V$ to $U$, then $V$ is **isomorphic** to $U$.
Suppose $f$ is an isomorphism from $V$ to $U$.
Since $f$ a bijective function, the inverse $f^{-1}$ of $f$ exists.
One may show that $f^{-1}$ is also linear, so $V$ is isomorphic to $U$ if and only if $U$ is isomorphic to $V$.
Suppose $f$ is an isomorphism from $V$ to $U$.
If $\alpha$ is a basis of $V$, then $f(\alpha)$ is a basis of $U$, so $\dim(V) = \dim(U)$.
On the other hand, suppose $\dim(V) = \dim(U)$.
If $\alpha$ is a basis of $V$ and $\beta$ is a basis of $U$, then there is an isomorphism sending $\alpha$ to $\beta$, so $V$ and $U$ is isomorphic.
In summary, two finite-dimensional vector spaces are isomorphic if and only if they have the same dimension.
Therefore, all finite-dimensional vector spaces can be partitioned by isomorphism, and the partition is the same as the partition by the dimension.
## Side stories
- classification of isomorphic vector spaces
- equivalence relation
## Experiments
##### Exercise 1
執行以下程式碼。
判斷該向量空間的維度、並寫出一組基底。
<!-- eng start -->
Run the code below. Find the dimension and a basis of the vector space.
<!-- eng end -->
```python
### code
set_random_seed(0)
print_ans = False
d = choice(range(21))
V = random_nvspace(d)
print(V)
if print_ans:
print("dim =", V.dim)
```
## Exercises
##### Exercise 2
令 $V = \vspan\{(1,1,1)\}^\perp$。
證明 $V$ 和 $\mathbb{R}^2$ 同構。
<!-- eng start -->
Let $V = \vspan\{(1,1,1)\}^\perp$. Show that $V$ is isomorphic to $\mathbb{R}^2$.
<!-- eng end -->
##### Exercise 3
證明 $\mathcal{P}_d$ 和 $\mathbb{R}^{d+1}$ 同構。
<!-- eng start -->
Show that $\mathcal{P}_d$ is isomorphic to $\mathbb{R}^{d+1}$.
<!-- eng end -->
##### Exercise 4
證明 $\mathcal{M}_{m,n}$ 和 $\mathbb{R}^{mn}$ 同構。
<!-- eng start -->
Show that $\mathcal{M}_{m,n}$ is isomorphic to $\mathbb{R}^{mn}$.
<!-- eng end -->
##### Exercise 5
令 $V$ 和 $U$ 為兩有限維度的向量空間。
依照以下步驟證明兩敘述等價:
1. $V$ 和 $U$ 同構。
2. $V$ 和 $U$ 的維度相同。
<!-- eng start -->
Let $V$ and $U$ be finite-dimensional vector spaces. Use the given instructions to show that the following are equivalent:
1. $V$ and $U$ are isomorphic.
2. $V$ and $U$ have the same dimension.
<!-- eng end -->
##### Exercise 5(a)
證明若 $f: V\rightarrow U$ 是一個對射線性函數且
$\alpha$ 是 $V$ 的一組基底﹐
則 $f(\alpha)$ 是 $U$ 的一組基底。
因此 $\dim(V) = \dim(U)$。
<!-- eng start -->
Show that if $f: V\rightarrow U$ is a bijective linear function and $\alpha$ is a basis of $V$, then $f(\alpha)$ is a basis of $U$. Therefore, $\dim(V) = \dim(U)$.
<!-- eng end -->
##### Exercise 5(b)
證明若 $\dim(V) = \dim(U)$、
$\alpha = \{ \bv_1, \ldots, \bv_n \}$ 為 $V$ 的一組基底、
$\beta = \{ \bu_1, \ldots, \bu_n \}$ 為 $U$ 的一組基底﹐
則存在一個線性函數符合
$$
\begin{array}{rcl}
f : V & \rightarrow & U \\
\bv_1 & \mapsto & \bu_1 \\
& \vdots & \\
\bv_n & \mapsto & \bu_n \\
\end{array}
$$
且 $f$ 是對射。
<!-- eng start -->
Suppose $\dim(V) = \dim(U)$, $\alpha = \{ \bv_1, \ldots, \bv_n \}$ is a basis of $V$, and $\beta = \{ \bu_1, \ldots, \bu_n \}$ a basis of $U$. Show that there is a linear function $f$ such that
$$
\begin{array}{rcl}
f : V & \rightarrow & U \\
\bv_1 & \mapsto & \bu_1 \\
& \vdots & \\
\bv_n & \mapsto & \bu_n \\
\end{array}
$$
and $f$ is bijective.
<!-- eng end -->
##### Exercise 6
證明向量空間的同構是一個等價關係。
<!-- eng start -->
Verify that the isomorphism between vector spaces is an equivalence relation.
<!-- eng end -->