or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
# 垂直子空間
垂直子空間
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}}\)
Main idea
Let \(U\) and \(V\) be two subspaces under the same inner product space.
We say \(U\) and \(V\) are orthogonal if \(\langle {\bf u}, {\bf v} \rangle = 0\) for any \({\bf u}\in U\) and \({\bf v}\in V\).
Similarly, we say a collection of subspaces \(\{V_1,\ldots,V_k\}\) is orthogonal if they are pairwisely orthogonal.
If \(\{V_1,\ldots,V_k\}\) is orthogonal, then they are necssarily independent.
Therefore, we have the direct sum \(V_1 \oplus \cdots \oplus V_k\).
Suppose \(V = V_1 \oplus \cdots \oplus V_k\).
Then every vector \({\bf v}\in V\) can be uniquely written as \({\bf v} = {\bf v}_1 + \cdots + {\bf v}_k\) with \({\bf v}_i\in V_i\) for each \(i = 1,\ldots,k\).
Let \(A\) be an \(m\times n\) matrix.
We have seen several cases of mutually orthogonal subspaces related to \(A\).
With the new terminology, we may safely say:
Suppose \(V\) is a subspace in \(\mathbb{R}^n\).
We also have \(\mathbb{R}^n = V \oplus V^\perp\).
Side stories
Experiments
Exercise 1
執行以下程式碼。
已知 \(R\) 為 \(A\) 的最簡階梯形式矩陣。
Exercise 1(a)
將 \({\bf b}\) 寫成 \({\bf r} + {\bf h}\)
其中 \({\bf r}\in\operatorname{Row}(A)\) 而 \({\bf h}\in\operatorname{ker}(A)\)。
[由李昌諺同學提供]
答:
由
seed(0)
時執行程式碼得到 \[A = \begin{bmatrix} 1 & 0 & 3 & 5 \\ 3 & 1 & 4 & 10 \end{bmatrix}, R = \begin{bmatrix} 1 & 0 & 3 & 5 \\ 0 & 1 & -5 & -5 \end{bmatrix}, {\bf b}=(-5,5,-5,-10). \]令 \(A\) 的各列向量為 \({\bf r}_1,{\bf r}_2\), 則 \(\operatorname{Row}(A)=\operatorname{span}(\{{\bf r}_1,{\bf r}_2\})\)。
\(R\) 為 \(A\) 的最簡階梯式,可知 \({x}_3,{x}_4\) 為自由變數。 令 \(x_3=1 , x_4=0\) 時可得到 \({\bf h}_1 = (-3,5,1,0).\) 令 \(x_3=0 , x_4=1\) 時可得到 \({\bf h}_2 = (-5,5,0,1).\) 所以 \(\operatorname{ker}(A)=\operatorname{span}(\{{\bf h}_1,{\bf h}_2\})\)。
假設 \({\bf r}=c_1{\bf r}_1 + c_2{\bf r}_2\) , \({\bf h}=c_3{\bf h}_1 + c_4{\bf h}_2\) 使得 \({\bf b}={\bf r}+{\bf h}\)。 可以把它轉換成矩陣形式 \[\begin{bmatrix} 1 & 3 & -3 & -5 \\ 0 & 1 & 5 & 5 \\ 3 & 4 & 1 & 0 \\ 5 & 10 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \\ c_3 \\ c_4 \\ \end{bmatrix}= \begin{bmatrix} -5 \\ 5 \\ -5 \\ -10 \\ \end{bmatrix}. \] 用高斯消去法計算增廣矩陣 \[\left[\begin{array}{cccc|c} 1 & 3 & -3 & -5 & -5\\ 0 & 1 & 5 & 5 & 5\\ 3 & 4 & 1 & 0 & -5\\ 5 & 10 & 0 & 1 & -10\\ \end{array}\right] \rightarrow \cdots \rightarrow \left[\begin{array}{cccc|c} 1 & 3 & -3 & -5 & -5\\ 0 & 1 & 5 & 5 & 5\\ 0 & 0 & 35 & 40 & 35\\ 0 & 0 & 0 & \frac{37}{7} & 0\\ \end{array}\right] \] 得到 \(c_1 = -2,c_2 = 0,c_3 = 1,c_4 = 0.\)
經過計算,得 \({\bf r}=c_1{\bf r}_1 + c_2{\bf r}_2=(-2,0,-6,-10)\in\operatorname{Row}(A)\) 而 \({\bf h}=c_3{\bf h}_1 + c_4{\bf h}_2=(-3,5,1,0)\in\operatorname{ker}(A)\) 使得 \({\bf b}={\bf r}+{\bf h}\)。
[由蔡程亦同學提供]
答:
seed=2
時\[A = \begin{bmatrix} 1 & 2 & -4 & -3 \\ 1 & 2 & -4 & -2 \end{bmatrix}, R = \begin{bmatrix} 1 & 2 & -4 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}, {\bf b}=(3,1,-4,0). \]
令 \(A\) 的各列向量為 \({\bf r}_1,{\bf r}_2\), 則 \(\operatorname{Row}(A)=\operatorname{span}(\{{\bf r}_1,{\bf r}_2\})\)。
由 \(R\) 可知 \({x}_2,{x}_3\) 為自由變數。 令 \(x_2=1 , x_3=0\) 可得到 \({\bf h}_1 = (-2,1,0,0).\) 令 \(x_2=0 , x_3=1\) 可得到 \({\bf h}_2 = (4,0,1,0).\) 所以 \(\operatorname{ker}(A)=\operatorname{span}(\{{\bf h}_1,{\bf h}_2\})\)。 解方程式\(x(1,2,-4,-3)+y(1,2,-4,-2)+z(-2,1,0,0)+w(4,0,1,0)=(3,1,-4,0)\) 。 計算得 \(x=-2,y=3,z=-1,w=0\)。 故 \({\bf r}=(1,2,-4,0),{\bf h}=(2,-1,0,0)\) 使得 \({\bf b}={\bf r}+{\bf h}\)。
Exercise 1(b)
證驗 \({\bf r}\) 和 \({\bf h}\) 垂直﹐
而且 \(\|{\bf b}\|^2 = \|{\bf r}\|^2 + \|{\bf h}\|^2\)。
[由李昌諺同學提供]
答(
seed(0)
):答:
計算 \[\begin{aligned} \langle {\bf r}, {\bf h}\rangle &=(-2,0,-6,10) \cdot (-3,5,1,0) \\ &= 6+0-6+0 \\ &= 0 \\ \end{aligned} \] 又 \(\|{\bf b}\|^2 = 25+25+25+100 = 175\),
\(\|{\bf r}\|^2 = 4+0+36+100 = 140\),
\(\|{\bf h}\|^2 = 9+25+1+0 = 35\),
得 \(\|{\bf b}\|^2 = \|{\bf r}\|^2 + \|{\bf h}\|^2\)。
[由蔡程亦同學提供]
(
seed=2
時)計算 \[\begin{aligned} \langle {\bf r}, {\bf h}\rangle &=(1,2,-4,0) \cdot (2,-1,0,0) \\ &= 0. \\ \end{aligned} \] 所以\({\bf r}\) 和 \({\bf h}\) 垂直。 又 \(\|{\bf b}\|^2 = 26\),\(\|{\bf r}\|^2 = 21\),\(\|{\bf h}\|^2 = 5\), 得 \(\|{\bf b}\|^2 = \|{\bf r}\|^2 + \|{\bf h}\|^2\)。
Exercise 1©
因為每一個 中的向量都可以分解成 \({\bf r}\in\operatorname{Row}(A)\) 和 \({\bf h}\in\operatorname{ker}(A)\) 中的向量相加。
說明對任何 \(m\times n\) 矩陣都有
\[\{A{\bf x}: {\bf x}\in\mathbb{R}^n \} = \{ A{\bf r} : {\bf r}\in\operatorname{Row}(A)\}. \]
Exercises
Exercise 2
令 \(S = \{V_1,\ldots,V_k\}\) 為一群子空間。
證明若 \(S\) 是垂直的集合﹐則 \(S\) 線性獨立。
Exercise 3
若 \(S = \{V_1, V_2, V_3\}\) 垂直。
令 \(V = V_1 \oplus V_2 \oplus V_3\)、
\(P\) 為 \(V\) 的投影矩陣、
\(P_1,P_2,P_3\) 分別為 \(V_1,V_2,V_3\) 的投影矩陣。
Exercise 3(a)
說明 \(P_1P_2 = P_2P_1\)。
Exercise 3(b)
說明 \(P = P_1 + P_2 + P_3\)。
Exercise 3©
若 \(V = \mathbb{R}^n\) 為全空間。
說明 \(I_n = P_1 + P_2 + P_3\)。
Exercise 4
依照步驟證明以下敘述等價:
Exercise 4(a)
證明若 \(P\) 是一個投影矩陣﹐
則 \(P\) 是 \(\operatorname{Col}(P)\) 的投影矩陣。
因此如果 \({\bf u}\in\operatorname{Col}(P)\) 則 \(P{\bf u} = {\bf u}\)、
如果 \({\bf u}\in\operatorname{ker}(P^\top)\) 則 \(P{\bf u} = {\bf 0}\)、
同時每個向量都可以分成 \({\bf u} = P{\bf u} + (I - P){\bf u}\)
使得 \(P{\bf u}\in\operatorname{Col}(P)\) 且 \((I - P){\bf u}\in\operatorname{ker}(P^\top)\)。
藉由這些性質說明如果條件一成立則條件二成立。
Exercise 4(b)
若 \(P\) 對稱且 \(P = P^2\)。
說明 \(\mathbb{R}^n = \operatorname{Col}(P) \oplus \operatorname{ker}(P)\) 且
如果 \({\bf u}\in\operatorname{Col}(P)\) 則 \(P{\bf u} = {\bf u}\)、
如果 \({\bf u}\in\operatorname{ker}(P)\) 則 \(P{\bf u} = {\bf 0}\)。
藉由這些性質說明如果條件二成立則條件一成立。
Exercise 5
證明若 \(V = V_1 \oplus \cdots \oplus V_k\)﹐
則每一個向量 \({\bf v}\in V\) 都可以被寫成 \({\bf v} = {\bf v}_1 + \cdots + {\bf v}_k\)﹐
使得對每一個 \(i = 1,\ldots,k\) 都有 \({\bf v}_i\in V_i\)﹐
而且這種寫法唯一。
Exercise 6
利用垂直空間分解母空間的現象在其它向量空間也很常見。
Exercise 6(a)
令 \(U = \mathcal{M}_{n\times n}\) 為一向量空間﹐搭配內積 \(\langle A,B\rangle = \operatorname{tr}(B^\top A)\)。
令 \(V\) 為 \(U\) 中所有對稱矩陣的集合、
令 \(W\) 為 \(U\) 中所有反對稱矩陣的集合。
說明 \(V\) 和 \(W\) 垂直且 \(U = V \oplus W\)。
Exercise 6(a)
令 \(U = \mathcal{P}_{d}\) 為一向量空間﹐搭配內積
\[\langle a_0 + a_1x + \cdots + a_dx^d, b_0 + b_1x + \cdots + b_dx^d \rangle = a_0b_0 + a_1b_1 + \cdots + a_db_d.\]
令 \(V\) 為 \(U\) 中所有偶函數的集合、
令 \(W\) 為 \(U\) 中所有奇函數的集合。
說明 \(V\) 和 \(W\) 垂直且 \(U = V \oplus W\)。