Files
LinearAlgebra/03内积和正交性.tex
2022-12-22 20:22:17 +08:00

240 lines
13 KiB
TeX
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
\chapter{内积和正交性}
\section{基本概念}
\subsection{内积}
\begin{definition}[内积]
定义$\realnum^n$上的两个列向量$\bvec{a}, \bvec{b}$的内积为实数$\bvec{a}\trans \bvec{b}$,即如果
\(\bvec{a} = \begin{bmatrix}
a_1\\ a_2\\ \vdots\\ a_n
\end{bmatrix}\)
\(\bvec{b} = \begin{bmatrix}
b_1\\ b_2\\ \vdots\\ b_n
\end{bmatrix}\)
$\bvec{a}, \bvec{b}$的内积为$a_1 b_1 + a_2 b_2 + \dots + a_n b_n$
\end{definition}
\begin{proposition}
向量内积满足如下性质:
\begin{enumerate}
\item 对称:$\bvec{a}\trans \bvec{b} = \bvec{b}\trans \bvec{a}$
\item 双线性:$\bvec{a}\trans(k_1 b_2 + k_2 b_2) = k_1 \bvec{a}\trans \bvec{b}_1 + k_2 \bvec{a}\trans b_2, (k_1\bvec{a}_1 + k_2 \bvec{a_2})\trans \bvec{b} = k_1 \bvec{a}_1\trans \bvec{b} + k_2 a_2\trans \bvec{b}$
\item 正定:$\bvec{a}\trans \bvec{a} \geq 0$,且$\bvec{a}\trans \bvec{a} = 0$当且仅当$\bvec{a} = \bvec{0}$
\end{enumerate}
\end{proposition}
\begin{definition}
定义$n$维向量
\(\bvec{a} = \begin{bmatrix}
a_1\\ a_2\\ \vdots\\ a_n
\end{bmatrix}\)
的长度:
\[\norm{\bvec{a}} = \sqrt{\bvec{a}\trans \bvec{a}} = \sqrt{a_1^2 + a_2^2 + \dots + a_n^2}\eqper\]
一个向量的长度为零当且仅当它是零向量。长度为1的向量称为单位向量。单位向量$\dfrac{\bvec{a}}{\norm{\bvec{a}}}$称为非零向量$\bvec{a}$的单位化(向量)。实数$\norm{\bvec{a} - \bvec{b}}$称为向量$\bvec{a},\bvec{b}$之间的距离。
\end{definition}
\begin{theorem}[Cauchy-Schwarz不等式]
$\abs{\bvec{a}\trans \bvec{b}} \leq \norm{\bvec{a}}\norm{\bvec{b}}$,等号成立当且仅当$\bvec{a}, \bvec{b}$共线。
\end{theorem}
\begin{corollary}[三角不等式]
$\norm{\bvec{a} + \bvec{b}} \leq \norm{\bvec{a}} + \norm{\bvec{b}}$
\end{corollary}
\begin{definition}
Cauchy-Schwarz不等式是我们能定义两个非零向量的夹角为$\arccos \dfrac{\bvec{a}\trans \bvec{b}}{\norm{\bvec{a}}\norm{\bvec{b}}}$。两个非零向量的内积为0当且仅当夹角为$\dfrac{\pi}{2}$。如果$\bvec{a}\trans \bvec{b} = 0$,称二者正交或垂直,记为$\bvec{a} \perp \bvec{b}$
\end{definition}
\begin{theorem}[勾股定理]
向量$\bvec{a}, \bvec{b}$正交,则$\norm{\bvec{a} \pm \bvec{b}}^2 = \norm{\bvec{a}}^2 + \norm{\bvec{b}}^2$
\end{theorem}
\begin{definition}
向量$\dfrac{\bvec{a}\trans \bvec{b}}{\bvec{a}\trans \bvec{a}}\bvec{a}$称为向量$\bvec{b}$向直线$\matspan(\bvec{a})$的正交投影。
\end{definition}
\begin{proposition}
$\bvec{a}, \bvec{b}$$\realnum^n$中的两个向量,$\bvec{a} \neq \bvec{0}$,则
\[\norm{\bvec{b} - \frac{\bvec{a}\trans \bvec{b}}{\bvec{a}\trans \bvec{a}}\bvec{a}} = \min \limits_{x \in \realnum} \norm{\bvec{b} - x \bvec{a}}\eqper\]
\end{proposition}
\subsection{标准正交基}
\begin{definition}[正交向量组]
$\bvec{a}_1, \bvec{a}_2,\dots, \bvec{a}_r$$\realnum^n$中的向量组,如果这些向量都非零且两两正交,则称该向量组为正交向量组。特别地,如果正交向量组中的向量都是单位向量,则称其为正交单位向量组。
\end{definition}
\begin{proposition}
正交向量组线性无关。
\end{proposition}
\begin{definition}[标准正交基]
$\mathcal{M}$$\realnum^n$的子空间,如果它的一组基是正交向量组,则称之为$\mathcal{M}$的一组正交基;如果他的一组基是正交单位向量组,则称之为$\mathcal{M}$的一组标准正交基。
\end{definition}
\begin{proposition}
$\mathcal{M}$$\realnum^n$的子空间,则$\mathcal{M}$存在一组正交基,从而存在一组标准正交基。
\end{proposition}
\begin{proposition}[标准正交基的基扩张定理]
$\mathcal{M}, \mathcal{N}$$\realnum^n$的两个子空间,如果$\mathcal{M} \subseteq \mathcal{N}$,则$\mathcal{M}$的任意一组标准正交基都可以扩充成$\mathcal{N}$的一组标准正交基。
\end{proposition}
\begin{proposition}
$\mathcal{M}$的任意一组基$\bvec{a}_1, \bvec{a}_2, \dots, \bvec{a}_r$出发通过递归能够得到一组正交基。这种方法称为Gram-Schmidt正交化。具体操作如下
\begin{align*}
\widetilde{\bvec{q}}_1 & = \bvec{a}_1,\\
\widetilde{\bvec{q}}_2 & = \bvec{a}_2 - \frac{\widetilde{\bvec{q}}_1\trans \bvec{a}_2}{\widetilde{\bvec{q}}_1\trans \widetilde{\bvec{q}}_1}\widetilde{\bvec{q}}_1,\\
\widetilde{\bvec{q}}_3 & = \bvec{a}_3 - \frac{\widetilde{\bvec{q}}_1\trans \bvec{a}_3}{\widetilde{\bvec{q}}_1\trans \widetilde{\bvec{q}}_1}\widetilde{\bvec{q}}_1 - \frac{\widetilde{\bvec{q}}_2\trans \bvec{a}_3}{\widetilde{\bvec{q}}_2\trans \widetilde{\bvec{q}}_2}\widetilde{\bvec{q}}_2,\\
&\vdots\\
\widetilde{\bvec{q}}_r & = \bvec{a}_r - \frac{\widetilde{\bvec{q}}_1\trans \bvec{a}_r}{\widetilde{\bvec{q}}_1\trans \widetilde{\bvec{q}}_1}\widetilde{\bvec{q}}_1 - \frac{\widetilde{\bvec{q}}_2\trans \bvec{a}_r}{\widetilde{\bvec{q}}_2\trans \widetilde{\bvec{q}}_2}\widetilde{\bvec{q}}_2 - \dots - \frac{\widetilde{\bvec{q}}_{r-1}\trans \bvec{a}_r}{\widetilde{\bvec{q}}_{r-1}\trans \widetilde{\bvec{q}}_{r-1}}\widetilde{\bvec{q}}_{r-1}
\end{align*}
为了得到标准正交基,只要再把正交基中的每个向量都单位化即可:$\bvec{q}_i = \dfrac{\widetilde{\bvec{q}}_i}{\norm{\widetilde{\bvec{q}}_i}}$
\end{proposition}
\section{正交矩阵和QR分解}
\subsection{正交矩阵}
\begin{definition}[正交矩阵]
一个$n$阶方阵$Q$如果满足$Q\trans Q = I_n$,则称$Q$$n$阶正交矩阵。
\end{definition}
\begin{proposition}[正交矩阵的性质]
$n$阶方阵$Q$,一下叙述等价:
\begin{enumerate}
\item $Q$是正交矩阵,即$Q\trans Q = I_n$
\item $Q$可逆,且$Q\revmat = Q\trans$
\item $QQ\trans = I_n$
\item $Q\trans$是正交矩阵;
\item $Q$可逆,且$Q\revmat$是正交矩阵;
\item $Q$的列向量组成$\realnum^n$的一组标准正交基;
\item $Q$的行向量的转置组成$\realnum^n$的一组标准正交基。
\end{enumerate}
\end{proposition}
\begin{proposition}
两个$n$阶正交矩阵的乘积还是$n$阶正交矩阵。
\end{proposition}
\begin{proposition}
$n$阶方阵$Q$,以下叙述等价:
\begin{enumerate}
\item $Q$是正交矩阵,即$Q\trans Q = I_n$
\item $Q$为保距变换,即,对任意$\bvec{x} \in \realnum^n$,有$\norm{Q\bvec{x}} = \norm{\bvec{x}}$
\item $Q$为保内积变换,即,对任意$\bvec{x},\bvec{y} \in \realnum^n$$Q\bvec{x}$$Q\bvec{y}$的内积等于$\bvec{x}$$\bvec{y}$的内积。
\end{enumerate}
\end{proposition}
\begin{proposition}
给定$\realnum^n$中向量$\bvec{x}, \bvec{y}$,满足$\norm{\bvec{x}} = \norm{\bvec{y}}$,则存在反射$\bvec{H_v}$,其中$\bvec{v} = \dfrac{\bvec{y} - \bvec{x}}{\norm{\bvec{y} - \bvec{x}}}$,使得$\bvec{H_v}(\bvec{x}) = \bvec{y}$
\end{proposition}
\subsection{QR分解}
\begin{theorem}[可逆矩阵的QR分解]
$A$$n$阶可逆矩阵,则存在唯一的分解$A = QR$,其中$Q$是正交矩阵,$R$是对角元都是正数的上三角矩阵。
在Gram-Schmidt正交化中
\(A = \begin{bmatrix}
\bvec{a}_1 & \bvec{a}_2 & \cdots & \bvec{a}_n
\end{bmatrix},
\widetilde{Q} = \begin{bmatrix}
\widetilde{\bvec{q}}_1 & \widetilde{\bvec{q}}_2 & \cdots & \widetilde{\bvec{q}}_n
\end{bmatrix},
Q = \begin{bmatrix}
\bvec{q}_1 & \bvec{q}_2 & \cdots & \bvec{q}_n
\end{bmatrix}\)
第一步正交化可以用矩阵乘法表示:
\[A = \widetilde{Q}\widetilde{R}, \widetilde{R} =
\begin{bNiceMatrix}
1 & \dfrac{\widetilde{\bvec{q}}_1\trans \bvec{a}_2}{\widetilde{\bvec{q}}_1\trans \widetilde{\bvec{q}}_1} & \cdots & \dfrac{\widetilde{\bvec{q}}_1\trans \bvec{a}_n}{\widetilde{\bvec{q}}_1\trans \widetilde{\bvec{q}}_1}\\
& 1 & \ddots & \vdots\\
& & \ddots & \dfrac{\widetilde{\bvec{q}}_{n-1}\trans \bvec{a}_n}{\widetilde{\bvec{q}}_{n-1}\trans \widetilde{\bvec{q}}_{n-1}}\\
& & & 1
\end{bNiceMatrix}\]
第二步单位化可以写成$\widetilde{Q} = Q \diag(\norm{\widetilde{\bvec{q}}_i})$,因此
\[A = Q \diag(\norm{\widetilde{\bvec{q}}_i}) \widetilde{R} = QR\eqper\]
\end{theorem}
\begin{definition}
矩阵$Q \in \realnum^{m\times n}$,如果满足$Q\trans Q = I_n$,则称为列正交矩阵。此时$m \geq n$
\end{definition}
\begin{theorem}[QR分解]
$m \times n$矩阵$A$,其中$m \geq n$,则
\begin{enumerate}
\item 存在$m \times n$列正交矩阵$Q_1$和具有非负对角元的$n$阶上三角矩阵$R_1$,使得$A = Q_1 R_1$
\item 进一步地,存在$m$阶正交矩阵$Q$$m \times n$矩阵$R$,使得$A = QR$,其中
\(R = \begin{bmatrix}
R_1\\ O
\end{bmatrix},
Q = \begin{bmatrix}
Q_1 & Q_2
\end{bmatrix}\)
$Q$的列向量组由$Q_1$的列向量组扩充而成。
\end{enumerate}
分解$A = QR$称为$A$的QR分解$A = Q_1R_1$称为$A$的简化QR分解。
\end{theorem}
\section{子空间和投影}
\subsection{正交补}
\begin{proposition}
如果$\bvec{b}$$\bvec{a}_1, \bvec{a}_2, \dots, \bvec{a}_s$都正交,则$\bvec{b}$与子空间$\matspan(\bvec{a}_1, \bvec{a}_2, \dots, \bvec{a}_s)$中的任意向量都正交。
\end{proposition}
\begin{definition}[子空间正交]
给定$\realnum^n$的子空间$\mathcal{M}, \mathcal{N}$,如果$\mathcal{M}$中任意向量和$\mathcal{N}$中任意向量都正交,则称$\mathcal{M}$$\mathcal{N}$正交,记为$\mathcal{M} \perp \mathcal{N}$
特别地,如果$\matspan(\bvec{a}) \perp \mathcal{M}$,则简称向量$\bvec{a}$与子空间$\mathcal{M}$正交,记为$\bvec{a} \perp \mathcal{M}$
\end{definition}
\begin{definition}[正交补]
给定$\realnum^n$的子空间$\mathcal{M}$$\realnum^n$的子集$\mathcal{M}\orthocomplementation := \{\bvec{a} \in \realnum^n \mid \bvec{a} \perp \mathcal{M}\}$,称为$\mathcal{M}$的正交补。
\end{definition}
\begin{proposition}
如果$\mathcal{M}$$\realnum^n$的子空间,则其正交补$\mathcal{M}\orthocomplementation$也是$\realnum^n$的子空间。
\end{proposition}
\begin{proposition}
$\realnum^n$的子空间$\mathcal{M}$,有:
\begin{enumerate}
\item $\mathcal{M} \cap \mathcal{M}\orthocomplementation = \{\bvec{0}\}$
\item $\dim \mathcal{M}\orthocomplementation = n - \dim \mathcal{M}$
\item $(\mathcal{M}\orthocomplementation)\orthocomplementation = \mathcal{M}$
\item 对任意$\bvec{a} \in \realnum^n$,都存在唯一的分解$\bvec{a} = \bvec{a}_1 + \bvec{a}_2$,使得$\bvec{a}_1 \in \mathcal{M}, \bvec{a}_2 \in \mathcal{M}\orthocomplementation$
\end{enumerate}
\end{proposition}
\begin{theorem}
给定$m \times n$矩阵$A$,则:
\begin{enumerate}
\item $\columnspace{A\trans}\orthocomplementation = \nullspace{A}, \columnspace{A}\orthocomplementation = \nullspace{A\trans}$
\item $\columnspace{A\trans A} = \columnspace{A\trans}, \nullspace{A\trans A} = \nullspace{A}$
\end{enumerate}
\end{theorem}
\subsection{正交投影}
\begin{definition}
给定$\realnum^n$的子空间$\mathcal{M}$,线性变换$\bvec{P}_\mathcal{M}$称为子空间$\mathcal{M}$上的正交投影(变换),而$\bvec{a}_1 = \bvec{P}_\mathcal{M}(\bvec{a})$称为向量$\bvec{a}$$\mathcal{M}$上的正交投影。
\end{definition}
\begin{proposition}
给定$\realnum^n$的子空间$\mathcal{M}$和向量$\bvec{a}$,而$\bvec{a}_1 = \bvec{P}_\mathcal{M}(\bvec{a})$$\bvec{a}$$\mathcal{M}$上的正交投影,则$\norm{\bvec{a} - \bvec{a}_1} = \min \limits_{\bvec{x} \in \mathcal{M}} \norm{\bvec{a} - \bvec{x}}$
如何计算正交投影:设$\listout{\bvec{q}}{r}$$\mathcal{M}$的一组标准正交基。令
\(Q_R = \begin{bmatrix}
\bvec{q}_1 & \cdots & \bvec{q}_r
\end{bmatrix}\)
它是列正交矩阵。正交投影$\bvec{P}_\mathcal{M}$的表示矩阵就是$Q_r Q_r\trans$,记为$P_\mathcal{M}$
\end{proposition}
\begin{definition}
给定矩阵$A$,其列空间上的正交投影的表示矩阵$P_{\columnspace{A}}$,称为关于$A$的正交投影矩阵,简记为$P_A$
\end{definition}
\begin{proposition}
给定$n$阶方阵$P$,则$P$是正交投影矩阵,当且仅当$P^2 = P\trans = P$
\end{proposition}
\subsection{最小二乘问题}
\begin{theorem}
向量$\bvec{x}$是线性方程组$A\bvec{x} = \bvec{b}$的最小二乘解,当且仅当$A\trans A \bvec{x} = A\trans \bvec{b}$
\end{theorem}