Constructing new vector spaces
This work by Jephian Lin is licensed under a Creative Commons Attribution 4.0 International License.
$\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}}$
from lingeo import random_good_matrix
from linspace import vtop, vtom
Let $S_1$ and $S_2$ be two set.
The Cartesian product of $S_1$ and $S_2$ is
$$S_1 \times S_2 = \{ (s_1,s_2) : s_1\in S_1, s_2\in S_2 \}.$$
If $S_1$ and $S_2$ are finite sets, then $|S_1\times S_2| = |S_1|\times |S_2|$.
Let $U$ and $V$ be two vector spaces.
The Cartesian product of $U$ and $V$ is the set
$$U\times V = \{ (\bu, \bv) : \bu\in U, \bv\in V \}$$
along with the vector addition
$$(\bu_1, \bv_1) + (\bu_1, \bv_1) = (\bu_1 + \bu_2, \bv_1 + \bv_2)$$
and the scalr multiplication
$$k(\bu, \bv) = (k\bu, k\bv).$$
The Cartesian product of two vector spaces is again a vector space.
For example, $\mathbb{R}^2 = \mathbb{R} \times \mathbb{R}$.
Suppose $\beta_U$ and $\beta_V$ are bases of $U$ and $V$, respectively.
Then
$$\{ (\bu, \bzero_V) : \bu\in \beta_U \} \cup \{ (\bzero_U, \bv) : \bv\in \beta_V \}$$
is a basis of $U \times V$, where $\bzero_U$ and $\bzero_V$ are the zero vectors in $U$ and $V$, respectively.
Therefore, $\dim(U \times V) = \dim(U) + \dim(V)$ if both of $U$ and $V$ are finite-dimensional.
Let $U$ be a vector space and $V$ a subspace of $U$.
Recall that an affine subspace is of the form $\bu + V$ for some vector $\bu$.
Thus, the quotient space of $U$ by $V$ is the set of all affine subspaces
$$U / V = \{ \bu + V : \bu \in U\}$$
(here each affine subspace $\bu + V$ is treated as a vector)
along with the vector addition
$$(\bu_1 + V) + (\bu_2 + V) = (\bu_1 + \bu_2) + V$$
and the scalar multiplication
$$k(\bu + V) = (k\bu) + V.$$
For example, when $V$ is the $x,y$-plane, then the structure of $\mathbb{R}^2 / V$ is similar to $\mathbb{R}^1$, since each $z$ value decides an affine plane.
By the expanding lemma, one may obtain a basis $\beta_V$ of $V$ and expand it to a basis $\beta_U$.
Thus,
$$\{ \bu + V : \bu \in \beta_U \setminus \beta_V \}$$
is a basis of $U / V$.
(Note that $/$ is the quotient while $\setminus$ is the setminus.)
Therefore, $\dim(U / V) = \dim(U) - \dim(V)$ if both $U$ and $V$ are finite-dimensional.
執行以下程式碼。
考慮向量空間 $\mathbb{R}^3\times \mathcal{P}_1$。
Run the code below. Consider the vector space $\mathbb{R}^3 \times \mathcal{P}_1$.
### code
set_random_seed(0)
print_ans = False
m,n,r = 3,5,choice([2,3])
A = random_good_matrix(m,n,r)
v1,v2,v3 = A[:,:3]
p1,p2,p3 = [vtop(v) for v in A[:,3:]]
print("u1 = (v1, p1) =", (v1, p1))
print("u2 = (v2, p2) =", (v2, p2))
print("u3 = (v3, p3) =", (v3, p3))
if print_ans:
print("u1 + u2 =", (v1 + v2, p1 + p2))
print("Linear independent?", r == 3)
判斷 $\{ \bu_1, \bu_2, \bu_3 \}$ 是否線性獨立。
Is $\{ \bu_1, \bu_2, \bu_3 \}$ linearly independent?
考慮 $V = \mathbb{R}^3 \times \mathbb{R}^2$。
Consider $V = \mathbb{R}^3 \times \mathbb{R}^2$.
令
$$ \begin{aligned} \bv_1 &= ((1,1,1), (1,1)) \\ \bv_2 &= ((0,1,1), (1,1)) \\ \bv_3 &= ((0,0,1), (1,1)) \\ \end{aligned} $$且 $S = \{ \bv_1, \bv_2, \bv_3 \}$。
判斷 $\vspan(S)$ 是否可以生成全空間 $V$。
Let
$$ \begin{aligned} \bv_1 &= ((1,1,1), (1,1)) \\ \bv_2 &= ((0,1,1), (1,1)) \\ \bv_3 &= ((0,0,1), (1,1)) \\ \end{aligned} $$and $S = \{ \bv_1, \bv_2, \bv_3 \}$. Determine if $\vspan(S)$ equal the whole space $V$.
考慮 $V = \mathcal{P}_2 \times \mathcal{P}_1$。
令
Consider the vector space $V = \mathcal{P}_2 \times \mathcal{P}_1$. Let
$$ \begin{aligned} p_1 &= (x+1)(x+2), \\ p_2 &= (x+1)(x^2 + x + 1). \\ \end{aligned} $$令 $\operatorname{ptov}_d$ 為把 $\mathcal{P}_d$ 中的多項式寫為 $\mathbb{R}^{d+1}$ 中向量的函數。
建一個矩陣 $A$ 其行向量分別為
$\operatorname{ptov}_4(p_1),
\operatorname{ptov}_4(xp_1),
\operatorname{ptov}_4(x^2p_1),
\operatorname{ptov}_4(p_2),
\operatorname{ptov}_4(xp_2)$。
寫出 $A$。
Let $\operatorname{ptov}_d$ be the function sending a polynomial in $\mathcal{P}_d$ to a vector in $\mathbb{R}^{d+1}$ by recording its coefficients from lower degree to higher dergee. Construct a matrix $A$ whose columns are $\operatorname{ptov}_4(p_1)$, $\operatorname{ptov}_4(xp_1)$, $\operatorname{ptov}_4(x^2p_1)$, $\operatorname{ptov}_4(p_2)$, and $\operatorname{ptov}_4(xp_2)$. Calculate $A$.
驗證對任何 $a\in\mathcal{P}_2$ 及 $b\in\mathcal{P}_1$
$$ A \begin{bmatrix} \operatorname{ptov}_2(a) \\ \operatorname{ptov}_1(b) \end{bmatrix} = \operatorname{ptov}_4(ap_1 + bp_2) $$都成立。
Show that
$$ A \begin{bmatrix} \operatorname{ptov}_2(a) \\ \operatorname{ptov}_1(b) \end{bmatrix} = \operatorname{ptov}_4(ap_1 + bp_2) $$for any $a\in\mathcal{P}_2$ and $b\in\mathcal{P}_1$.
求出所有可以讓 $ap_1 + bp_2 = 0$ 的 $(a,b)\in V$。
Find all $(a,b)\in V$ such that $ap_1 + bp_2 = 0$.
證明以下敘述等價:
因此另外一個定義商空間的方法是定義向量之間的關係:
$$ \bu_1 \sim \bu_2 \iff \bu_1 - \bu_2 \in V. $$可以證明這樣的關係是一個等價關係。
如此一來 $U / \sim$ 和 $U / V$ 的概念是一樣的。
Show that the following are equivalent:
Therefore, the quotient space can be defined by the relation of vectors in $V$:
$$ \bu_1 \sim \bu_2 \iff \bu_1 - \bu_2 \in V. $$One may verify that this is an equivalence relation. Thus, $U / \sim$ and $U / V$ are equivalent.
我們可以不管直觀上的任何意義來定義加法:
$$ (\bu_1 + V) + (\bu_2 + V) = (\bu_1 + \bu_2) + V. $$然而要小心的是
如果 $\bu_1 + V$ 和 $\bu'_1 + V$ 一樣、
同時 $\bu_2 + V$ 和 $\bu'_2 + V$ 一樣﹐
那麼加出來的 $(\bu_1 + \bu_2) + V$ 和 $(\bu'_1 + \bu'_2) + V$ 也會一樣嗎?
符合這樣性質的定義我們稱為是定義完善的(well-defined)。
證明商空間上定義的向量加法是定義完善的。
We may naïvely define the addition of two elements in the quotient space:
$$ (\bu_1 + V) + (\bu_2 + V) = (\bu_1 + \bu_2) + V. $$However, we need to be careful about the potential contradiction: Suppose $\bu_1 + V = \bu'_1 + V$ and $\bu_2 + V = \bu'_2 + V$. Is it true that $(\bu_1 + \bu_2) + V = (\bu'_1 + \bu'_2) + V$? If this is true, then we say our definition of the addition is well-defined .
Show that the addition on the elements in the quotient space is well-defined.
證明商空間上的純量乘法
$$ k(\bu + V) = (k\bu) + V $$是定義完善的。
Show that the definition of the scalar multiplication
$$ k(\bu + V) = (k\bu) + V $$is well-defined.
證明笛卡爾積做出來的新結構是一個向量空間。
找出一組基底並證明其正確性。
Show that the Cartesian product of two vector spaces is again a vector space. Find a basis of the product and show that it is indeed a basis.
證明商空間做出來的新結構是一個向量空間。
找出一組基底並證明其正確性。
Show that the quotient space of two vector spaces is again a vector space. Find a basis of the product and show that it is indeed a basis.