<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>初樱小站</title>
  
  <subtitle>初桜未来の小站</subtitle>
  <link href="https://hsmk.mikufans.date/atom.xml" rel="self"/>
  
  <link href="https://hsmk.mikufans.date/"/>
  <updated>2026-11-25T12:15:00.000Z</updated>
  <id>https://hsmk.mikufans.date/</id>
  
  <author>
    <name>Hatsusakuramiku</name>
    
  </author>
  
  <generator uri="https://hexo.io/">Hexo</generator>
  
  <entry>
    <title>实变函数与泛函分析（系列总览）</title>
    <link href="https://hsmk.mikufans.date/posts/ba3bcc9.html"/>
    <id>https://hsmk.mikufans.date/posts/ba3bcc9.html</id>
    <published>2026-11-25T12:15:00.000Z</published>
    <updated>2026-11-25T12:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>实变函数与泛函分析 导航栏</strong></p><ul><li>系列总览与导航（本篇）<br>第 1 章 测度与可测函数<ul><li>（待写）<br>第 2 章 勒贝格积分</li><li>（待写）<br>第 3 章 收敛定理与函数空间</li><li>（待写）<br>第 4 章 度量空间与完备性</li><li>（待写）<br>第 5 章 巴拿赫空间与有界算子</li><li>（待写）<br>第 6 章 希尔伯特空间</li><li>（待写）</li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>这个系列是什么</strong></p><p>  <strong>实变函数</strong>重新定义&quot;积分&quot;，<strong>泛函分析</strong>把线性代数推到无穷维。</p><p>  <strong>两者是一条线的两段</strong>：先修好&quot;积分&quot;，再把&quot;几何&quot;搬到函数空间里。</p></div><h2 id="center-p-为什么需要这两门课-p-center"><center><p>为什么需要这两门课</p></center></h2><p>  <strong>很多人在学完数学分析和高等代数之后，会遇到三类&quot;卡住&quot;的现象：</strong></p><table><thead><tr><th>现象</th><th>缺什么</th></tr></thead><tbody><tr><td>极限与积分不能随便交换</td><td><strong>勒贝格积分</strong>的收敛定理</td></tr><tr><td>傅里叶级数为什么&quot;能逐项求导&quot;</td><td><strong>函数空间</strong>的完备性</td></tr><tr><td>微分方程的&quot;弱解&quot;是什么</td><td><strong>Sobolev 空间</strong></td></tr></tbody></table><p>  <strong>这三件事的共同点是</strong>：<strong>经典的理论用了&quot;逐点&quot;和&quot;一致&quot;这两种强条件，而真实的函数往往没那么好。</strong></p><p>  <strong>实变与泛函就是用来处理&quot;没那么好&quot;的函数的。</strong></p><h2 id="center-p-核心线索：黎曼积分缺什么-p-center"><center><p>核心线索：黎曼积分缺什么</p></center></h2><p>  <strong>黎曼积分的问题</strong>（数学分析 3.1 节）：</p><p>$$\int_0^1 f\quad\text{其中 }f=\text{Dirichlet 函数}$$</p><p>  <strong>不可积</strong>——因为它在每个小区间里都既有 0 又有 1。</p><p>  <strong>但实际物理里的&quot;函数&quot;往往就是这样的</strong>——比如&quot;某点的湿度是否达标&quot;，处处跳变。</p><p>  <strong>勒贝格的回答</strong>：<strong>不按&quot;$x$ 轴切&quot;来分，而按&quot;$y$ 轴切&quot;。</strong></p><p>  <strong>具体说</strong>：不是问&quot;$x$ 在 $[0,0.1]$ 时 $f$ 是多少&quot;，而是问&quot;<strong>$f$ 等于 1 的点集有多大</strong>&quot;。</p><p>  <strong>所以需要&quot;集合的大小&quot;这个概念</strong>——这就是<strong>测度</strong>。</p><div class="note info flat"><p><strong>一句话概括</strong></p><p>  <strong>黎曼积分</strong>：竖着切，看每个小区间的宽 × 高。</p><p>  <strong>勒贝格积分</strong>：横着切，看每个&quot;高度层&quot;对应的集合有多大。</p><p>  <strong>而&quot;集合有多大&quot;就是测度。</strong></p><p>  <strong>所以这个系列的学习顺序是</strong>：测度 → 可测函数 → 积分 → 收敛定理。</p></div><h2 id="center-p-章节规划-p-center"><center><p>章节规划</p></center></h2><table><thead><tr><th>章</th><th>主题</th><th>核心问题</th></tr></thead><tbody><tr><td><strong>1</strong></td><td><strong>测度与可测函数</strong></td><td>什么是&quot;集合的大小&quot;？为什么要有测度论？</td></tr><tr><td><strong>2</strong></td><td><strong>勒贝格积分</strong></td><td>怎么&quot;横着切&quot;？和黎曼积分什么关系？</td></tr><tr><td><strong>3</strong></td><td><strong>收敛定理与函数空间</strong></td><td>什么时候极限和积分能交换？$L^p$ 空间是什么？</td></tr><tr><td><strong>4</strong></td><td><strong>度量空间与完备性</strong></td><td>&quot;距离&quot;的本质？巴拿赫不动点定理？</td></tr><tr><td><strong>5</strong></td><td><strong>巴拿赫空间与有界算子</strong></td><td>无穷维的线性代数长什么样？</td></tr><tr><td><strong>6</strong></td><td><strong>希尔伯特空间</strong></td><td>谱定理在无穷维是什么样？**</td></tr></tbody></table><h2 id="center-p-与本站其他系列的关系-p-center"><center><p>与本站其他系列的关系</p></center></h2><table><thead><tr><th>系列</th><th>接口</th></tr></thead><tbody><tr><td><strong>数学分析</strong></td><td>黎曼积分的局限（3.1）、反常积分（3.4）、一致收敛（4.2）</td></tr><tr><td><strong>高等代数</strong></td><td>内积空间（5.1）、谱定理（5.2）、正交补（3.1）</td></tr><tr><td><strong>微分方程数值解</strong></td><td>Sobolev 空间（第 5 章）、弱解与有限元的数学基础</td></tr></tbody></table><p>  <strong>所以本系列是</strong>：</p><ul><li>对<strong>数学分析</strong>的&quot;补洞&quot;（积分与极限交换）</li><li>对<strong>高等代数</strong>的&quot;升维&quot;（有限维 → 无穷维）</li><li>对<strong>数值方法</strong>的&quot;解释&quot;（为什么弱形式成立）</li></ul><h2 id="center-p-建议的阅读顺序-p-center"><center><p>建议的阅读顺序</p></center></h2><figure class="highlight tap"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">第<span class="number"> 1 </span>章 测度          ← 从这里开始</span><br><span class="line">   ↓</span><br><span class="line">第<span class="number"> 2 </span>章 勒贝格积分    ← 核心：横着切</span><br><span class="line">   ↓</span><br><span class="line">第<span class="number"> 3 </span>章 收敛定理      ← 最有用的部分（单调/控制收敛）</span><br><span class="line">   ↓</span><br><span class="line">第<span class="number"> 4 </span>章 度量空间      ← 抽象化：距离就是一切</span><br><span class="line">   ↓</span><br><span class="line">第<span class="number"> 5 </span>章 巴拿赫空间    ← 无穷维但有&quot;范数&quot;</span><br><span class="line">   ↓</span><br><span class="line">第<span class="number"> 6 </span>章 希尔伯特空间  ← 最像欧氏空间，谱定理</span><br></pre></td></tr></table></figure><div class="note warning flat"><p><strong>需要的前置知识</strong></p><p>  <strong>最好先学完</strong>：</p><ul><li>数学分析（特别是极限、连续、黎曼积分）</li><li>高等代数（线性空间、内积、特征值）</li></ul><p>  <strong>如果只学了一半</strong>：本系列会在需要的地方给出<strong>回指链接</strong>，但不重复推导。</p></div><h2 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h2><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">Folland G B. Real Analysis: Modern Techniques and Their Applications[M]. 2nd ed. New York: Wiley, 1999.</span><span class="reference-title">参考资料</span></span></span>——最适合自学的现代教材。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">RUDIN W. Real and Complex Analysis[M]. 3rd ed. New York: McGraw-Hill, 1987.</span><span class="reference-title">参考资料</span></span></span>——经典教材，覆盖实变与泛函。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Measure, Integration & Real Analysis[M]. Cham: Springer, 2020.</span><span class="reference-title">参考资料</span></span></span>——最新的开放式教材，另附解答。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://openlibrary.org/works/OL1953434W" target="_blank" rel="noopener">Folland G B. Real Analysis: Modern Techniques and Their Applications[M]. 2nd ed. New York: Wiley, 1999.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://openlibrary.org/works/OL1295435W" target="_blank" rel="noopener">RUDIN W. Real and Complex Analysis[M]. 3rd ed. New York: McGraw-Hill, 1987.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-030-33143-6" target="_blank" rel="noopener">AXLER S. Measure, Integration & Real Analysis[M]. Cham: Springer, 2020.</a></div>]]></content>
    
    
    <summary type="html">从&quot;黎曼积分为什么不够&quot;出发，一路到希尔伯特空间与谱定理——实变与泛函系列的总览、章节规划与阅读路线</summary>
    
    
    
    <category term="实变函数与泛函分析" scheme="https://hsmk.mikufans.date/categories/%E5%AE%9E%E5%8F%98%E5%87%BD%E6%95%B0%E4%B8%8E%E6%B3%9B%E5%87%BD%E5%88%86%E6%9E%90/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 6.2：若尔当标准型——不能对角化时的最简形式</title>
    <link href="https://hsmk.mikufans.date/posts/5e555640.html"/>
    <id>https://hsmk.mikufans.date/posts/5e555640.html</id>
    <published>2026-11-24T20:25:00.000Z</published>
    <updated>2026-11-24T20:25:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li>6.2 若尔当标准型：不能对角化时的最简形式（本篇）</li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;反复挪一格&quot;理解若尔当块</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——广义特征向量、根子空间、若尔当标准型</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;若尔当块数量怎么定&quot;&quot;最小多项式&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、矩阵指数、微分方程、控制论感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：反复挪一格-p-center"><center><p>一、基础：反复挪一格</p></center></h1><p>  <strong>（这一部分只需要知道&quot;特征值&quot;和&quot;对角化&quot;。）</strong></p><h2 id="center-p-一个-差一点就能对角化-的矩阵-p-center"><center><p>一个&quot;差一点就能对角化&quot;的矩阵</p></center></h2><p>  </p><p>$$J=\begin{pmatrix}3&amp;1\\0&amp;3\end{pmatrix}$$</p><p>  <strong>特征值</strong>：$\det(J-\lambda I)=(3-\lambda)^2$，所以 $\lambda=3$（<strong>二重</strong>）。</p><p>  <strong>特征向量</strong>：$(J-3I)=\begin{pmatrix}0&amp;1\\0&amp;0\end{pmatrix}$，解是 $(1,0)$ 的倍数——<strong>只有一个独立方向</strong>。</p><p>  <strong>所以不能对角化</strong>（4.1 节）。</p><h2 id="center-p-但它-很接近-对角阵-p-center"><center><p>但它&quot;很接近&quot;对角阵</p></center></h2><p>  <strong>看它的作用</strong>：对 $\vec x=(x,y)$，</p><p>$$J\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}3x+y\\3y\end{pmatrix}$$</p><p>  <strong>分解成两步</strong>：</p><ol><li><strong>先缩放 3 倍</strong>：$(x,y)\mapsto(3x,3y)$</li><li><strong>再把 $y$ &quot;挪&quot;到 $x$ 上</strong>：$3x\mapsto3x+y$</li></ol><p>  <strong>所以 $J=3I+N$</strong>，其中</p><p>$$N=\begin{pmatrix}0&amp;1\\0&amp;0\end{pmatrix}$$</p><p>  <strong>而 $N$ 有一个特殊性质：$N^2=0$。</strong></p><p>  <strong>这叫&quot;幂零&quot;</strong>——$N$ 把向量&quot;挪一格&quot;，<strong>挪两次就归零了</strong>。</p><h2 id="center-p-幂零的好处：可以算-J-k-p-center"><center><p>幂零的好处：可以算 $J^k$</p></center></h2><p>  <strong>因为 $3I$ 与 $N$ 可交换</strong>（$3I$ 与任何矩阵都交换），二项式定理成立：</p><p>$$J^k=(3I+N)^k=\sum_{j=0}^{k}\binom{k}{j}3^{k-j}N^j=3^kI+k\cdot3^{k-1}N$$</p><p>  <strong>（因为 $N^2=0$，所以只有 $j=0,1$ 两项。）</strong></p><p>  <strong>展开</strong>：</p><p>$$J^k=\begin{pmatrix}3^k&amp;k\cdot3^{k-1}\\0&amp;3^k\end{pmatrix}$$</p><p>  <strong>注意那个 $k\cdot3^{k-1}$</strong>——<strong>它比 $3^k$ 多一个多项式因子</strong>。</p><p>  <strong>所以&quot;不能对角化的部分&quot;贡献了&quot;多项式增长&quot;</strong>——这在微分方程里非常重要。</p><div class="note info flat"><p><strong>为什么这正是&quot;最简形式&quot;</strong></p><p>  <strong>对角化</strong>：$A=P\Lambda P^{-1}$，$A^k=P\Lambda^kP^{-1}$。</p><p>  <strong>若尔当形式</strong>：$A=PJP^{-1}$，$A^k=PJ^kP^{-1}$。</p><p>  <strong>而 $J^k$ 的形式是</strong>：</p><p>$$\begin{pmatrix}\lambda^k&amp;k\lambda^{k-1}&amp;\binom{k}{2}\lambda^{k-2}&amp;\cdots\\&amp;\lambda^k&amp;k\lambda^{k-1}&amp;\cdots\\&amp;&amp;\lambda^k&amp;\ddots\end{pmatrix}$$</p><p>  <strong>所以</strong>：<strong>不能对角化时，&quot;幂&quot;里必然出现多项式因子。</strong></p><p>  <strong>这就是&quot;最简&quot;的含义</strong>——<strong>不能再简化了</strong>，除非放弃&quot;矩阵&quot;这个概念。</p></div><hr><h1 id="center-p-二、标准：广义特征向量与若尔当标准型-p-center"><center><p>二、标准：广义特征向量与若尔当标准型</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-广义特征向量-p-center"><center><p>广义特征向量</p></center></h2><blockquote><p><strong>定义</strong>：$\vec v$ 叫 $\lambda$ 的<strong>广义特征向量</strong>，若</p><p>$$(A-\lambda I)^k\vec v=\vec 0\qquad\text{对某个 }k\ge1$$</p></blockquote><p>  <strong>$k=1$ 时就是普通特征向量。</strong></p><p>  <strong>$k=2$ 时</strong>：$\vec v$ 满足 $(A-\lambda I)^2\vec v=\vec 0$ 但 $(A-\lambda I)\vec v\ne\vec 0$——<strong>它不是特征向量，但&quot;差一层&quot;。</strong></p><h2 id="center-p-根子空间-p-center"><center><p>根子空间</p></center></h2><blockquote><p><strong>定义</strong>：$V_\lambda={\vec v:(A-\lambda I)^k\vec v=\vec 0\text{ 对某 }k}$——<strong>广义特征空间</strong>（根子空间）。</p></blockquote><p>  <strong>关键定理</strong>：</p><p>$$\mathbb{C}^n=\bigoplus_{\lambda}V_\lambda$$</p><p>  <strong>（直和：所有根子空间拼起来就是整个空间。）</strong></p><p>  <strong>而 $\dim V_\lambda$ = $\lambda$ 的代数重数。</strong></p><p>  <strong>所以若尔当块的总大小由代数重数决定。</strong></p><h2 id="center-p-若尔当块与标准型-p-center"><center><p>若尔当块与标准型</p></center></h2><blockquote><p><strong>定义</strong>：<strong>$k$ 阶若尔当块</strong>是</p><p>$$J_k(\lambda)=\begin{pmatrix}\lambda&amp;1&amp;&amp;\\&amp;\lambda&amp;\ddots&amp;\\&amp;&amp;\ddots&amp;1\\&amp;&amp;&amp;\lambda\end{pmatrix}$$</p><p>（对角是 $\lambda$，上对角是 1，其余为 0。）</p></blockquote><blockquote><p><strong>定理（若尔当标准型）</strong>：任何复矩阵 $A$ 都相似于</p><p>$$J=\operatorname{diag}\left(J_{k_1}(\lambda_1),\dots,J_{k_m}(\lambda_m)\right)$$</p></blockquote><p>  <strong>而且这个形式在不计块顺序时唯一。</strong></p><p>  <strong>注意</strong>：<strong>必须在复数域上</strong>。实数域上不一定存在（如旋转矩阵）。</p><h2 id="center-p-算例-p-center"><center><p>算例</p></center></h2><p>  <strong>例</strong>：$A=\begin{pmatrix}2&amp;1&amp;0\\0&amp;2&amp;0\\0&amp;0&amp;3\end{pmatrix}$</p><p>  <strong>特征值</strong>：$\lambda=2$（代数重数 2）、$\lambda=3$（重数 1）。</p><p>  <strong>$\lambda=2$ 的几何重数</strong>：$\operatorname{rank}(A-2I)=2$，所以几何重数 $=3-2=1$。</p><p>  <strong>所以 $\lambda=2$ 对应一个 $2\times2$ 的若尔当块。</strong></p><p>  <strong>$\lambda=3$ 的几何重数 = 代数重数 = 1</strong>，对应 $1\times1$ 块。</p><p>  <strong>所以若尔当标准型就是</strong></p><p>$$J=\begin{pmatrix}2&amp;1&amp;0\\0&amp;2&amp;0\\0&amp;0&amp;3\end{pmatrix}$$</p><p>  <strong>——这个 $A$ 本身就是若尔当标准型！</strong></p><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：以为实矩阵总有实若尔当标准型</strong></p><p>  旋转矩阵 $\begin{pmatrix}0&amp;-1\\1&amp;0\end{pmatrix}$ 的特征值是 $\pm\mathrm{i}$，实域上无若尔当形式。</p><p><strong>错误二：把广义特征向量当成特征向量</strong></p><p>  $(A-\lambda I)\vec v\ne\vec 0$ 时它不是特征向量。</p><p><strong>错误三：若尔当块数算错</strong></p><p>  <strong>块数 = 几何重数</strong>（$\dim\ker(A-\lambda I)$），不是代数重数。</p><p><strong>错误四：以为标准型唯一到&quot;排列&quot;</strong></p><p>  块<strong>可以任意排列</strong>——所以标准型是<strong>唯一的集合</strong>，不是唯一的矩阵。</p><p><strong>错误五：以为&quot;最小多项式&quot;等于&quot;特征多项式&quot;</strong></p><p>  只在对角化时相等。</p><p><strong>错误六：用行变换求若尔当型</strong></p><p>  <strong>必须用相似变换</strong>（$P^{-1}AP$），不是行变换。</p></div><hr><h1 id="center-p-三、深入：块的数量与最小多项式-p-center"><center><p>三、深入：块的数量与最小多项式</p></center></h1><p>  <strong>（这一部分是完整推导。）</strong></p><h2 id="center-p-若尔当块的个数-p-center"><center><p>若尔当块的个数</p></center></h2><details class="folding-tag" cyan><summary> 关键公式 </summary>              <div class='content'>              <p>  <strong>设 $\lambda$ 的代数重数是 $m$，几何重数是 $g$。</strong></p><p>  <strong>结论</strong>：$\lambda$ 对应的<strong>若尔当块个数 = $g$</strong>。</p><p><strong>为什么</strong>：</p><p>  若尔当块 $J_k(\lambda)$ 里，<strong>特征向量只有 1 个维度</strong>（因为 $J_k-\lambda I$ 的秩是 $k-1$）。</p><p>  <strong>所以每个块贡献 1 维特征空间</strong>，块数就是特征空间的维数 = <strong>几何重数</strong> ✓</p><p>  <strong>而块的大小之和 = 代数重数 $m$。</strong></p><p>  <strong>例</strong>：$m=4$、$g=2$ ⟹ 可能是 $(3,1)$ 或 $(2,2)$ 两种。</p><p>  <strong>要区分这两种，需要看 $(A-\lambda I)^2$ 的秩</strong>（更高阶的信息）。</p>              </div>            </details><h2 id="center-p-最小多项式-p-center"><center><p>最小多项式</p></center></h2><blockquote><p><strong>定义</strong>：$m_A(x)$ 是使 $m_A(A)=0$ 的<strong>最低次首一多项式</strong>。</p></blockquote><p>  <strong>关键定理</strong>：</p><p>$$m_A(x)=\prod_{\lambda}(x-\lambda)^{\text{最大若尔当块的阶数}}$$</p><p>  <strong>而特征多项式是</strong>：</p><p>$$p_A(x)=\prod_{\lambda}(x-\lambda)^{\text{代数重数}}$$</p><p>  <strong>所以</strong>：$m_A\mid p_A$，且<strong>两者的根集相同</strong>（都是特征值）。</p><div class="note info flat"><p><strong>最小多项式判定可对角化</strong></p><p>  <strong>定理</strong>：$A$ 可对角化 ⟺ $m_A(x)$ <strong>没有重根</strong>（即所有根都是单根）。</p><p>  <strong>例</strong>：</p><ul><li>$A=\operatorname{diag}(2,2,3)$：$m_A=(x-2)(x-3)$——<strong>无重根</strong> ⟹ 可对角化 ✓</li><li>$J=\begin{pmatrix}3&amp;1\\0&amp;3\end{pmatrix}$：$m_A=(x-3)^2$——<strong>有重根</strong> ⟹ 不可对角化 ✓</li></ul><p>  <strong>这个判据比&quot;看特征值是否互异&quot;更精确</strong>——它允许&quot;特征值重但可对角化&quot;的情形。</p></div><h2 id="center-p-若尔当标准型的证明思路-p-center"><center><p>若尔当标准型的证明思路</p></center></h2><details class="folding-tag" cyan><summary> 归纳法 </summary>              <div class='content'>              <p>  <strong>核心是&quot;幂零矩阵&quot;的情形</strong>——因为 $A-\lambda I$ 在根子空间上是幂零的。</p><p>  <strong>引理</strong>：若 $N$ 幂零（$N^k=0$），则存在基使 $N$ 是若尔当块（$\lambda=0$）的直和。</p><p>  <strong>证明</strong>（对 $k$ 归纳）：</p><ol><li>考虑 $\operatorname{Im}N\subseteq V$（真子空间，因为 $N$ 幂零则不满秩）</li><li>由归纳假设，在 $\operatorname{Im}N$ 上有若尔当形式</li><li>把每个链&quot;拉回&quot;到 $V$ 中——每个链顶端补一个&quot;前驱&quot;</li><li>得到一个更大的若尔当结构 ✓</li></ol><p>  <strong>对一般的 $A$</strong>：</p><ol><li>由根子空间分解 $V=\bigoplus V_\lambda$</li><li>在每个 $V_\lambda$ 上，$N=A-\lambda I$ 幂零</li><li>对每个 $V_\lambda$ 用引理 ✓ $\blacksquare$</li></ol>              </div>            </details><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：若尔当的坎坷-p-center"><center><p>历史：若尔当的坎坷</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1868</td><td><strong>魏尔斯特拉斯</strong></td><td>初等因子（更早的形式）</td></tr><tr><td><strong>1870</strong></td><td><strong>若尔当</strong></td><td>《论置换与代数方程》，若尔当标准型</td></tr><tr><td>1874</td><td>弗罗贝尼乌斯</td><td>更系统的理论</td></tr><tr><td>1890s</td><td>弗罗贝尼乌斯</td><td>有理标准型</td></tr></tbody></table><p>  <strong>卡米尔·若尔当（1838–1922）</strong> 是法国数学家，他的工作领域极广：<br>置换群、有限域、拓扑、分析。</p><p>  <strong>他 1870 年的《论置换与代数方程》</strong> 有 <strong>667 页</strong>，其中就有这个标准型。</p><div class="note info flat"><p><strong>若尔当标准型的&quot;实用地位&quot;</strong></p><p>  <strong>理论上很重要，数值上几乎没用。</strong></p><p>  <strong>为什么</strong>：<strong>若尔当标准型对扰动极度不稳定。</strong></p><p>  <strong>例</strong>：$J=\begin{pmatrix}3&amp;1\\0&amp;3\end{pmatrix}$（不可对角化）</p><p>  加一个极小扰动 $\varepsilon$：</p><p>$$J_\varepsilon=\begin{pmatrix}3&amp;1\\\varepsilon&amp;3\end{pmatrix}$$</p><p>  特征值是 $3\pm\sqrt\varepsilon$——<strong>两个不同的实数</strong>！</p><p>  <strong>所以一个 $10^{-16}$ 的扰动，就把&quot;不可对角化&quot;变成了&quot;可对角化&quot;</strong>，特征值变了 $10^{-8}$。</p><p>  <strong>这就是为什么数值软件（LAPACK、MATLAB）没有 <code>jordan()</code> 函数</strong>——它们只给 Schur 分解。</p><p>  <strong>教训</strong>：<strong>理论上的&quot;精确分类&quot;，在数值世界里可能毫无意义。</strong></p></div><h2 id="center-p-联系：矩阵指数与微分方程-p-center"><center><p>联系：矩阵指数与微分方程</p></center></h2><p>  <strong>常微分方程组</strong>：</p><p>$$\dot{\vec x}=A\vec x\qquad\Longrightarrow\qquad\vec x(t)=\mathrm{e}^{At}\vec x(0)$$</p><p>  <strong>而 $\mathrm{e}^{At}$ 的计算依赖 $A$ 的结构。</strong></p><p>  <strong>若 $A$ 可对角化</strong>：$\mathrm{e}^{At}=P\mathrm{e}^{\Lambda t}P^{-1}$——<strong>纯指数</strong>。</p><p>  <strong>若 $A$ 有若尔当块</strong> $J_k(\lambda)$：</p><p>$$\mathrm{e}^{J_k(\lambda)t}=\mathrm{e}^{\lambda t}\cdot\left(I+tN+\frac{t^2}{2}N^2+\cdots\right)$$</p><p>  <strong>所以出现 $t^{j}\mathrm{e}^{\lambda t}$ 形式的项——&quot;多项式 × 指数&quot;。</strong></p><p>  <strong>这在物理上是什么？</strong></p><ul><li><strong>纯指数</strong>：稳定衰减/增长</li><li><strong>多项式 × 指数</strong>：<strong>临界阻尼</strong>（重根情形）</li></ul><p>  <strong>例</strong>：临界阻尼振子 $x''+2\omega x'+\omega^2x=0$ 的解是 $(C_1+C_2t)\mathrm{e}^{-\omega t}$——<strong>正是&quot;多项式 × 指数&quot;</strong>。</p><p>  <strong>所以&quot;若尔当块&quot;的物理意义 = &quot;临界情形&quot;。</strong></p><h2 id="center-p-应用：Schur-分解与现代数值方法-p-center"><center><p>应用：Schur 分解与现代数值方法</p></center></h2><p>  <strong>若尔当标准型数值不稳定，但 Schur 分解稳定。</strong></p><p>$$A=QTQ^\top$$</p><p>  其中 $Q$ 正交，$T$ 上三角（对角是特征值）。</p><p>  <strong>Schur 分解的优点</strong>：</p><table><thead><tr><th></th><th>若尔当</th><th>Schur</th></tr></thead><tbody><tr><td>变换</td><td>任意 $P$（可能病态）</td><td><strong>正交</strong> $Q$（条件数 1）</td></tr><tr><td>稳定</td><td><strong>极不稳定</strong></td><td><strong>稳定</strong></td></tr><tr><td>域</td><td>必须复数</td><td>实数也能做（准上三角）</td></tr></tbody></table><p>  <strong>实用算法</strong>：<strong>QR 算法求 Schur 分解</strong>（4.1 节）——<strong>一切特征值软件的基础</strong>。</p><p>  <strong>所以现代数值线代&quot;用 Schur 替代若尔当&quot;</strong>——<strong>这是一个典型的&quot;理论 vs 数值&quot;的权衡</strong>。</p><h2 id="center-p-应用：控制论里的能控标准型-p-center"><center><p>应用：控制论里的能控标准型</p></center></h2><p>  <strong>若尔当型在控制论里有一个兄弟</strong>：<strong>能控标准型</strong>。</p><p>  <strong>一个单输入系统</strong> $\dot{\vec x}=A\vec x+b u$ <strong>能控</strong> ⟺ 能变成：</p><p>$$A_c=\begin{pmatrix}0&amp;1&amp;0&amp;\cdots\\0&amp;0&amp;1&amp;\cdots\\\vdots&amp;&amp;&amp;\ddots\\-a_0&amp;-a_1&amp;\cdots&amp;-a_{n-1}\end{pmatrix}$$</p><p>  <strong>这个形式的形状和若尔当块很像</strong>（上对角为 1）。</p><p>  <strong>用途</strong>：直接读出特征多项式 $\lambda^n+a_{n-1}\lambda^{n-1}+\cdots+a_0$。</p><p>  <strong>所以&quot;若尔当型&quot;的思想（把矩阵化成&quot;几乎对角&quot;的标准形状）在工程里反复出现。</strong></p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 6.6 节相似变换。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 8 章（Axler 用算子语言讲广义特征向量）。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>广义特征向量</strong></td><td>$(A-\lambda I)^k\vec v=\vec 0$，$k\ge1$</td></tr><tr><td><strong>根子空间</strong></td><td>$\mathbb{C}^n=\bigoplus V_\lambda$，维数 = 代数重数</td></tr><tr><td><strong>若尔当块</strong></td><td>对角 $\lambda$，上对角 1</td></tr><tr><td><strong>标准型</strong></td><td>块的直和，不计顺序唯一</td></tr><tr><td><strong>块数</strong></td><td>= 几何重数</td></tr><tr><td><strong>最小多项式</strong></td><td>$\prod(x-\lambda)^{\text{最大块阶}}$；<strong>无重根 ⟺ 可对角化</strong></td></tr><tr><td><strong>数值</strong></td><td><strong>不稳定</strong>，实用 Schur 分解</td></tr><tr><td><strong>物理</strong></td><td>对应&quot;临界阻尼&quot; $(C_1+C_2t)\mathrm{e}^{\lambda t}$</td></tr></tbody></table><div class="note info flat"><p><strong>高等代数主体收官</strong></p><p>到这里，8 章的核心内容都讲完了：</p><table><thead><tr><th>章</th><th>核心问题</th><th>答案</th></tr></thead><tbody><tr><td>1</td><td>线性方程组怎么解</td><td>消元、秩的三分法</td></tr><tr><td>2</td><td>变换与矩阵什么关系</td><td>变换是本质，矩阵是影子</td></tr><tr><td>3</td><td>怎么理解整体结构</td><td>四个子空间</td></tr><tr><td>4</td><td>行列式是什么</td><td>带符号体积</td></tr><tr><td>5</td><td>什么时候能对角化</td><td>特征向量够多时</td></tr><tr><td>6</td><td>怎么度量</td><td>内积 → 正交 → 谱定理</td></tr><tr><td>7</td><td>极值怎么判</td><td>二次型正定性</td></tr><tr><td>8</td><td>不能对角化怎么办</td><td>若尔当标准型</td></tr></tbody></table><p>  <strong>贯穿全书的三条主线</strong>：</p><ol><li><strong>&quot;变与不变&quot;</strong>——换基变矩阵，但特征值/秩不变</li><li><strong>&quot;基的选择&quot;</strong>——选对基，问题就简单</li><li><strong>&quot;理论 vs 数值&quot;</strong>——数学上正确的，数值上未必可靠</li></ol><p>  <strong>下一步</strong>：本站的「实变函数与泛函分析」系列会把这些推到<strong>无穷维</strong>——<br>那里&quot;基&quot;变成&quot;Schauder 基&quot;，&quot;对角化&quot;变成&quot;谱分解&quot;。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第八章 λ-矩阵与若尔当标准型。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 8 章。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 6.6 节。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;反复挪一格&quot;理解若尔当块；②广义特征向量、根子空间、若尔当标准型；③若尔当块数量的判定与最小多项式；④历史、与微分方程/矩阵指数/控制论的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 6.1：二次型与正定性——极值是极大还是极小</title>
    <link href="https://hsmk.mikufans.date/posts/eac6723.html"/>
    <id>https://hsmk.mikufans.date/posts/eac6723.html</id>
    <published>2026-11-24T20:15:00.000Z</published>
    <updated>2026-11-24T20:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li>6.1 二次型与正定性：极值是极大还是极小（本篇）<br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;碗、鞍、帽子&quot;三种曲面建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——二次型、对称矩阵、正定性判据</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;Hessian 判别法为何有效&quot;&quot;惯性定理&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、优化、控制论、相对论感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：碗、鞍、帽子-p-center"><center><p>一、基础：碗、鞍、帽子</p></center></h1><p>  <strong>（这一部分只需要知道&quot;二次函数&quot;。）</strong></p><h2 id="center-p-一元的三种情况-p-center"><center><p>一元的三种情况</p></center></h2><p>  <strong>一元二次函数</strong> $f(x)=ax^2$：</p><table><thead><tr><th>$a$</th><th>图形</th><th>原点是什么</th></tr></thead><tbody><tr><td>$a&gt;0$</td><td><strong>开口向上的抛物线</strong></td><td><strong>极小值</strong></td></tr><tr><td>$a&lt;0$</td><td>开口向下</td><td><strong>极大值</strong></td></tr><tr><td>$a=0$</td><td>直线（退化）</td><td>不是极值</td></tr></tbody></table><p>  <strong>所以&quot;$a$ 的符号&quot;决定了极值的类型。</strong></p><h2 id="center-p-二元的三种情况-p-center"><center><p>二元的三种情况</p></center></h2><p>  <strong>二元二次函数</strong>（二次型）：</p><p>$$f(x,y)=ax^2+2bxy+cy^2$$</p><p>  <strong>写成矩阵形式</strong>：</p><p>$$f=\begin{pmatrix}x&amp;y\end{pmatrix}\begin{pmatrix}a&amp;b\\b&amp;c\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=X^\top AX$$</p><p>  <strong>三种曲面</strong>：</p><table><thead><tr><th>类型</th><th>图形</th><th>条件</th></tr></thead><tbody><tr><td><strong>正定</strong></td><td><strong>碗</strong>（向上）</td><td>$a&gt;0$ 且 $ac-b^2&gt;0$</td></tr><tr><td><strong>负定</strong></td><td><strong>帽子</strong>（向下）</td><td>$a&lt;0$ 且 $ac-b^2&gt;0$</td></tr><tr><td><strong>不定</strong></td><td><strong>鞍形</strong>（马鞍）</td><td>$ac-b^2&lt;0$</td></tr></tbody></table><p>  <strong>所以&quot;$A$ 的类型&quot;决定了曲面形状</strong> ✓</p><h2 id="center-p-鞍点为什么最难-p-center"><center><p>鞍点为什么最难</p></center></h2><p>  <strong>鞍形曲面</strong>上，原点沿一个方向是极小、沿另一个方向是极大。</p><p>  <strong>例</strong>：$f(x,y)=x^2-y^2$</p><p>  沿 $x$ 轴：$f=x^2$——<strong>极小</strong> ✓</p><p>  沿 $y$ 轴：$f=-y^2$——<strong>极大</strong> ✓</p><p>  <strong>所以原点既不是极大也不是极小。</strong></p><p>  <strong>这就是优化里的&quot;鞍点&quot;</strong>——梯度为零，但不是极值。</p><p>  <strong>深度学习的高维损失函数里，鞍点比局部极小多得多</strong>——这是深度学习能工作的原因之一。</p><div class="note info flat"><p><strong>为什么高维&quot;几乎处处是鞍点&quot;</strong></p><p>  在 $n$ 维空间，二阶导数矩阵有 $n$ 个特征值。</p><p>  <strong>要成为极小值</strong>，需要<strong>所有</strong>特征值都为正。若每个特征值独立地取正负，概率是 $2^{-n}$。</p><p>  <strong>所以维度越高，极少量的点才是&quot;真正的极小&quot;</strong>——绝大多数驻点是鞍点。</p><p>  <strong>而 SGD 之所以能训练，正是因为它能&quot;逃离&quot;鞍点</strong>（梯度噪声）。</p></div><hr><h1 id="center-p-二、标准：二次型与正定性-p-center"><center><p>二、标准：二次型与正定性</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-二次型的定义-p-center"><center><p>二次型的定义</p></center></h2><blockquote><p><strong>定义</strong>：$n$ 个变量的<strong>二次齐次多项式</strong></p><p>$$Q(\vec x)=\sum_{i,j}a_{ij}x_ix_j$$</p><p>叫<strong>二次型</strong>。</p></blockquote><p>  <strong>对称化</strong>：任何二次型都可写成 $Q(\vec x)=\vec x^\top A\vec x$，其中**$A$ 对称**（可取 $a_{ij}$ 与 $a_{ji}$ 的平均）。</p><p>  <strong>所以&quot;二次型&quot;与&quot;对称矩阵&quot;一一对应。</strong></p><h2 id="center-p-正定的定义-p-center"><center><p>正定的定义</p></center></h2><blockquote><p><strong>定义</strong>：对称矩阵 $A$ 叫<strong>正定</strong>，若对<strong>一切</strong> $\vec x\ne\vec 0$，</p><p>$$\vec x^\top A\vec x&gt;0$$</p></blockquote><p>  <strong>类似地</strong>：负定（$&lt;0$）、半正定（$\ge0$）、不定（有正有负）。</p><h2 id="center-p-五个等价判据-p-center"><center><p>五个等价判据</p></center></h2><blockquote><p><strong>定理</strong>：$A$ 正定 ⟺ 下列任一成立：</p><ol><li><strong>所有特征值 &gt; 0</strong></li><li><strong>所有顺序主子式 &gt; 0</strong>（Sylvester 判据）</li><li>存在可逆 $P$ 使 $A=P^\top P$</li><li>存在可逆 $P$ 使 $P^\top AP=I$</li><li>LU 分解中<strong>所有主元 &gt; 0</strong></li></ol></blockquote><p>  <strong>最常用的是第 2 条</strong>——<strong>顺序主子式</strong>（左上角的 $k\times k$ 行列式）<strong>全正</strong>。</p><p>  <strong>例</strong>：$A=\begin{pmatrix}2&amp;1\\1&amp;2\end{pmatrix}$</p><ul><li>一阶主子式：$2&gt;0$ ✓</li><li>二阶主子式：$4-1=3&gt;0$ ✓</li></ul><p><strong>所以正定</strong> ✓</p><h2 id="center-p-Hessian-判别法-p-center"><center><p>Hessian 判别法</p></center></h2><p>  <strong>数学分析 5.4 节的&quot;二元极值判别法&quot;</strong>：</p><p>  设 $f(x,y)$ 在 $P_0$ 处梯度为零，$H$ 是 Hessian 矩阵：</p><p>$$H=\begin{pmatrix}f_{xx}&amp;f_{xy}\\f_{xy}&amp;f_{yy}\end{pmatrix}$$</p><table><thead><tr><th>$H$ 的类型</th><th>结论</th></tr></thead><tbody><tr><td><strong>正定</strong></td><td><strong>极小值</strong></td></tr><tr><td><strong>负定</strong></td><td><strong>极大值</strong></td></tr><tr><td><strong>不定</strong></td><td><strong>鞍点</strong></td></tr><tr><td><strong>半正定/半负定</strong></td><td><strong>无法判断</strong>（需要更高阶导数）</td></tr></tbody></table><p>  <strong>而&quot;二元&quot;时</strong>：</p><ul><li>正定 ⟺ $f_{xx}&gt;0$ 且 $f_{xx}f_{yy}-f_{xy}^2&gt;0$</li><li>不定 ⟺ $f_{xx}f_{yy}-f_{xy}^2&lt;0$</li></ul><p>  <strong>这就是标准的&quot;$AC-B^2$&quot;判别法</strong>——<strong>很多教材只给了这个特例，没讲背后是二次型的正定性。</strong></p><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：只检查&quot;所有对角元为正&quot;</strong></p><p>  <strong>不够！</strong> $\begin{pmatrix}1&amp;2\\2&amp;1\end{pmatrix}$ 对角元都是 1，但不定（特征值 $3,-1$）。</p><p><strong>错误二：把&quot;半正定&quot;当成&quot;正定&quot;</strong></p><p>  半正定允许 $\vec x^\top A\vec x=0$（$\vec x\ne\vec 0$），此时<strong>无法判断极值类型</strong>。</p><p><strong>错误三：用&quot;子式全正&quot;但用的是&quot;任意子式&quot;</strong></p><p>  必须是<strong>顺序主子式</strong>（左上角），不是任意子式。</p><p><strong>错误四：忘记 $H$ 必须对称</strong></p><p>  Hessian 在二阶偏导连续时对称（Clairaut 定理）。若不连续，<strong>&quot;正定&quot;这个概念都不成立</strong>。</p><p><strong>错误五：以为&quot;梯度为零&quot;就是极值</strong></p><p>  可能是鞍点。</p><p><strong>错误六：混淆&quot;正定&quot;与&quot;非奇异&quot;</strong></p><p>  正定 ⟹ 非奇异，但反之不成立（$\operatorname{diag}(1,-1)$ 非奇异但不定）。</p></div><hr><h1 id="center-p-三、深入：惯性定理与-Hessian-判别法的证明-p-center"><center><p>三、深入：惯性定理与 Hessian 判别法的证明</p></center></h1><p>  <strong>（这一部分是严格证明。）</strong></p><h2 id="center-p-Hessian-判别法的证明-p-center"><center><p>Hessian 判别法的证明</p></center></h2><details class="folding-tag" cyan><summary> 泰勒展开 + 二次型的符号 </summary>              <div class='content'>              <p>  设 $\nabla f(P_0)=\vec 0$。由泰勒公式（数学分析 1.6 节）：</p><p>$$f(P_0+\vec h)=f(P_0)+\frac12\vec h^\top H\vec h+o(\lVert\vec h\rVert^2)$$</p><p>  <strong>若 $H$ 正定</strong>，设最小特征值 $\lambda_{\min}&gt;0$，则</p><p>$$\vec h^\top H\vec h\ge\lambda_{\min}\lVert\vec h\rVert^2$$</p><p>  所以当 $\lVert\vec h\rVert$ 足够小时，$f(P_0+\vec h)-f(P_0)\ge\left(\dfrac{\lambda_{\min}}2-o(1)\right)\lVert\vec h\rVert^2&gt;0$ ✓</p><p>  <strong>所以 $P_0$ 是极小值</strong> ✓</p><p>  <strong>若 $H$ 不定</strong>，有特征向量 $\vec u$（正）与 $\vec v$（负）：</p><ul><li>$f(P_0+t\vec u)-f(P_0)&gt;0$（$t$ 小时）</li><li>$f(P_0+t\vec v)-f(P_0)&lt;0$</li></ul><p>  <strong>所以沿不同方向增减不同——鞍点</strong> ✓ $\blacksquare$</p><p>  <strong>注意</strong>：这里<strong>关键是用到了谱定理</strong>（特征值实数、正交基）——<strong>这就是 5.2 节的重要性</strong>。</p>              </div>            </details><h2 id="center-p-惯性定理（Sylvester）-p-center"><center><p>惯性定理（Sylvester）</p></center></h2><blockquote><p><strong>定理</strong>：二次型的<strong>正项个数、负项个数、零项个数</strong>在任何非退化线性变换下<strong>不变</strong>。</p></blockquote><p>  <strong>这三个数叫惯性指数</strong>，$(p,q,z)$ 是二次型的<strong>不变量</strong>。</p><p>  <strong>所以&quot;正定&quot;是内蕴性质</strong>——不管用哪组坐标，$p=n$ 就是正定。</p><details class="folding-tag" cyan><summary> 惯性定理的证明 </summary>              <div class='content'>              <p>  <strong>做法</strong>：把二次型化成&quot;配方法&quot;的标准形 $Q=\sum\lambda_i y_i^2$。</p><p>  <strong>要证</strong>：正系数个数 $p$ 与变换的选择无关。</p><p>  <strong>反证</strong>：假设有两组标准形，正项数分别是 $p$ 与 $p'$，且 $p&gt;p'$。</p><p>  考虑两个子空间：</p><ul><li>$V_+$（在第一种标准形里 $y_1,\dots,y_p$ 张成的）</li><li>$W$（在第二种标准形里 $y'_{p'+1},\dots,y'_n$ 张成的，维数 $n-p'$）</li></ul><p>  <strong>维数和</strong> $p+(n-p')&gt;n$，所以 $V_+\cap W\ne{\vec 0}$。</p><p>  取 $\vec x\ne\vec 0$ 在这个交里：</p><ul><li>由 $V_+$：$Q(\vec x)&gt;0$（因为 $\vec x$ 在正项部分）</li><li>由 $W$：$Q(\vec x)\le0$（因为 $W$ 里没有正项）</li></ul><p>  <strong>矛盾</strong> ✓ 所以 $p=p'$ ✓ $\blacksquare$</p><p>  <strong>这个证明的精髓</strong>：<strong>用维数论证保证两个&quot;符号相反&quot;的子空间必有非零交</strong>——<strong>非常巧妙</strong>。</p>              </div>            </details><h2 id="center-p-为什么-A-top-A-是半正定的-p-center"><center><p>为什么 $A^\top A$ 是半正定的</p></center></h2><p>  对任何 $\vec x$：</p><p>$$\vec x^\top(A^\top A)\vec x=(A\vec x)^\top(A\vec x)=\lVert A\vec x\rVert^2\ge0$$</p><p>  <strong>所以半正定</strong> ✓</p><p>  <strong>而且</strong>：等号成立 ⟺ $A\vec x=\vec 0$ ⟺ $\vec x\in N(A)$。</p><p>  <strong>所以</strong>：$A^\top A$ 正定 ⟺ $N(A)={\vec 0}$ ⟺ $A$ <strong>列满秩</strong>。</p><p>  <strong>这就是为什么最小二乘要求&quot;列满秩&quot;</strong>（3.1 节 / 5.1 节）——否则正规方程无唯一解。</p><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：惯性定理与相对论-p-center"><center><p>历史：惯性定理与相对论</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1750s</td><td>欧拉、拉格朗日</td><td>二次型与配方法</td></tr><tr><td><strong>1852</strong></td><td><strong>西尔维斯特</strong></td><td>&quot;惯性定理&quot;（Sylvester's law of inertia）</td></tr><tr><td>1858</td><td>凯莱</td><td>矩阵形式</td></tr><tr><td>1866</td><td>埃尔米特</td><td>复二次型</td></tr><tr><td><strong>1908</strong></td><td><strong>闵可夫斯基</strong></td><td>相对论的四维二次型</td></tr></tbody></table><p>  <strong>惯性定理有一个惊人的物理应用</strong>：<strong>狭义相对论的时空间隔</strong>。</p><p>  <strong>间隔</strong>：</p><p>$$s^2=c^2t^2-x^2-y^2-z^2$$</p><p>  <strong>写成矩阵</strong>：$A=\operatorname{diag}(1,-1,-1,-1)$，<strong>惯性指数 $(1,3,0)$</strong>。</p><p>  <strong>这个 (1,3) 是所有惯性系都一样的</strong>——<strong>这就是&quot;时空间隔是绝对的&quot;的数学表达</strong>。</p><p>  <strong>而且</strong>：</p><ul><li>类时间隔（$s^2&gt;0$）：可以被光速以内的运动连接</li><li>类空间隔（$s^2&lt;0$）：无法连接</li><li>类光间隔（$s^2=0$）：正好是光速</li></ul><p>  <strong>所以&quot;因果结构&quot;完全由二次型的符号决定。</strong></p><div class="note info flat"><p><strong>为什么相对论需要&quot;不定&quot;二次型</strong></p><p>  <strong>欧氏空间</strong>的度规是 $\operatorname{diag}(1,1,1,1)$——<strong>正定</strong>。</p><p>  <strong>闵可夫斯基时空</strong>的度规是 $\operatorname{diag}(1,-1,-1,-1)$——<strong>不定</strong>。</p><p>  <strong>这个&quot;不定&quot;不是数学缺陷，而是物理必需</strong>：<br>因为时间与空间<strong>本质不同</strong>（时间是单向的，空间不是）。</p><p>  <strong>所以&quot;正定&quot;与&quot;不定&quot;的区分，在物理上有真实含义。</strong></p></div><h2 id="center-p-联系：最优化里的凸性-p-center"><center><p>联系：最优化里的凸性</p></center></h2><p>  <strong>凸函数</strong>的定义：$f(\lambda\vec x+(1-\lambda)\vec y)\le\lambda f(\vec x)+(1-\lambda)f(\vec y)$。</p><p>  <strong>二阶充分条件</strong>：<strong>Hessian 半正定 ⟹ 凸</strong>。</p><p>  <strong>所以&quot;二次型正定&quot;与&quot;函数凸&quot;是同一件事的两种说法</strong>（局部 vs 全局）。</p><p>  <strong>凸优化为什么容易</strong>：</p><ul><li><strong>任何局部极小都是全局极小</strong></li><li>没有鞍点（除了在最优点外）</li></ul><p>  <strong>所以</strong>：机器学习里的&quot;损失函数设计&quot;本质上就是在<strong>保证 Hessian 半正定</strong>。</p><p>  <strong>例</strong>：交叉熵 + softmax 是凸的，而&quot;均方误差 + sigmoid&quot;<strong>不凸</strong>——这就是为什么分类任务用交叉熵。</p><h2 id="center-p-应用：控制论里的-Lyapunov-函数-p-center"><center><p>应用：控制论里的 Lyapunov 函数</p></center></h2><p>  <strong>稳定性分析</strong>的核心是找一个&quot;能量函数&quot;。</p><p>  <strong>线性系统</strong> $\dot{\vec x}=A\vec x$ 的 Lyapunov 函数常取：</p><p>$$V(\vec x)=\vec x^\top P\vec x$$</p><p>  <strong>若 $P$ 正定</strong>，且</p><p>$$\dot V=\vec x^\top(A^\top P+PA)\vec x&lt;0$$</p><p>  则系统<strong>渐近稳定</strong>。</p><p>  <strong>这写成方程</strong>：</p><p>$$A^\top P+PA=-Q,\qquad Q\text{ 正定}$$</p><p>  <strong>这叫 Lyapunov 方程</strong>——<strong>它的可解性完全由二次型的正定性决定</strong>。</p><p>  <strong>这就是&quot;正定性&quot;在工程里的直接价值</strong>。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 6.5 节正定矩阵与优化。</p><h2 id="center-p-应用：机器学习里的核方法-p-center"><center><p>应用：机器学习里的核方法</p></center></h2><p>  <strong>核方法</strong>的核心是<strong>核矩阵必须半正定</strong>。</p><p>  <strong>核函数</strong> $k(\vec x,\vec y)$ 对应的<strong>核矩阵</strong> $K_{ij}=k(\vec x_i,\vec x_j)$。</p><p>  <strong>Mercer 定理</strong>：$k$ 是<strong>有效核</strong> ⟺ $K$ <strong>半正定</strong>。</p><p>  <strong>为什么必须半正定</strong>：因为它必须是某个内积空间里的内积——而内积的 Gram 矩阵总是半正定的。</p><p>  <strong>验证</strong>：$K_{ij}=\langle\phi(\vec x_i),\phi(\vec x_j)\rangle$，则对任何 $\vec c$：</p><p>$$\vec c^\top K\vec c=\left\lVert\sum c_i\phi(\vec x_i)\right\rVert^2\ge0\quad\checkmark$$</p><p>  <strong>所以&quot;正定性&quot;是&quot;存在一个内积表示&quot;的几何条件。</strong></p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 7 章正算子。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 6.5 节。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>二次型</strong></td><td>$\vec x^\top A\vec x$，对应对称矩阵</td></tr><tr><td><strong>正定</strong></td><td>对所有 $\vec x\ne\vec 0$，$\vec x^\top A\vec x&gt;0$</td></tr><tr><td><strong>五判据</strong></td><td>特征值全正 / 顺序主子式全正 / $A=P^\top P$ / $P^\top AP=I$ / 主元全正</td></tr><tr><td><strong>Hessian</strong></td><td>正定 ⟹ 极小；不定 ⟹ 鞍点；半定 ⟹ 无法判断</td></tr><tr><td><strong>惯性定理</strong></td><td>正/负/零项个数是不变量</td></tr><tr><td><strong>$A^\top A$</strong></td><td>半正定；正定 ⟺ 列满秩</td></tr><tr><td><strong>物理</strong></td><td>时空间隔的 $(1,3)$ 惯性指数</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>到这里，大部分矩阵都能&quot;化简&quot;了：</p><ul><li>可对角化 ⟹ 对角阵</li><li>实对称 ⟹ 正交对角阵</li><li>任何矩阵 ⟹ SVD</li></ul><p>  <strong>但还有一类&quot;顽固&quot;的矩阵</strong>——<strong>不能对角化</strong>的那些（如若尔当块）。</p><p>  <strong>下一节（第 8 章：若尔当标准型）</strong> 会问：</p><blockquote><p><strong>不能对角化时，最简形式长什么样？</strong></p></blockquote><p>  答案是<strong>若尔当标准型</strong>——它揭示了对角化失败的&quot;结构&quot;。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第五章二次型。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 7 章。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 6.5 节。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;碗、鞍、帽子&quot;三种曲面理解二次型；②二次型与对称矩阵、正定性判别（顺序主子式/Sylvester 判据）；③Hessian 判别法为什么有效、以及惯性定理；④历史、与优化/控制/相对论的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 5.2：谱定理与奇异值分解——实对称矩阵为什么这么好</title>
    <link href="https://hsmk.mikufans.date/posts/1547576a.html"/>
    <id>https://hsmk.mikufans.date/posts/1547576a.html</id>
    <published>2026-11-24T16:25:00.000Z</published>
    <updated>2026-11-24T16:25:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li>5.2 谱定理与奇异值分解：实对称矩阵为什么这么好（本篇）<br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;任何形状都能被拉成椭球&quot;建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——谱定理、正交对角化、SVD</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;谱定理为何成立&quot;与 SVD 的完整构造的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对 PCA、图像压缩、推荐系统、历史感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：任何形状都能拉成椭球-p-center"><center><p>一、基础：任何形状都能拉成椭球</p></center></h1><p>  <strong>（这一部分只需要知道&quot;线性变换&quot;。）</strong></p><h2 id="center-p-单位圆变成什么-p-center"><center><p>单位圆变成什么</p></center></h2><p>  <strong>任意一个 $2\times2$ 矩阵，都把单位圆变成一个椭圆。</strong></p><p>  <strong>这是线性代数里最美的事实之一。</strong></p><p>  <strong>三个例子</strong>：</p><table><thead><tr><th>矩阵</th><th>单位圆变成</th></tr></thead><tbody><tr><td>$\begin{pmatrix}2&amp;0\\0&amp;1\end{pmatrix}$</td><td>横向拉长的椭圆</td></tr><tr><td>$\begin{pmatrix}1&amp;1\\0&amp;1\end{pmatrix}$</td><td><strong>倾斜的椭圆</strong>（剪切）</td></tr><tr><td>$\begin{pmatrix}1&amp;1\\1&amp;1\end{pmatrix}$</td><td><strong>退化的椭圆</strong>（线段）</td></tr></tbody></table><p>  <strong>注意第二个</strong>：剪切矩阵看起来不&quot;对称&quot;，但它仍然把圆变成椭圆——<strong>只是椭圆的长短轴</strong>不<strong>沿坐标轴</strong>。</p><h2 id="center-p-椭圆的轴是什么-p-center"><center><p>椭圆的轴是什么</p></center></h2><p>  <strong>椭圆有两个主轴</strong>——它们就是<strong>特征向量</strong>！</p><p>  <strong>为什么</strong>：在主轴方向上，变换<strong>只拉伸不旋转</strong>——这正是特征向量的定义。</p><p>  <strong>所以</strong>：<strong>找到特征向量 = 找到椭圆的轴</strong>。</p><p>  <strong>而轴的半长 = 特征值的绝对值。</strong></p><h2 id="center-p-如果矩阵不对称呢-p-center"><center><p>如果矩阵不对称呢</p></center></h2><p>  <strong>问题</strong>：剪切矩阵 $\begin{pmatrix}1&amp;1\\0&amp;1\end{pmatrix}$ 的特征值都是 1（重根），<strong>但椭圆的长短轴明显不一样长</strong>！</p><p>  <strong>矛盾吗？</strong> 不矛盾——<strong>特征向量描述的是&quot;输入空间的方向&quot;，不是&quot;输出的轴&quot;。</strong></p><p>  <strong>正确的分解要用&quot;两套不同的基&quot;</strong>：</p><blockquote><p><strong>输入方向</strong>（圆的哪个方向）→ 拉伸 → <strong>输出方向</strong>（椭圆的哪根轴）</p></blockquote><p>  <strong>这就是奇异值分解（SVD）</strong>：</p><p>$$A=U\Sigma V^\top$$</p><p>  <strong>$U$ 的列 = 输出的主轴（椭圆的轴），$V$ 的列 = 输入的对应方向，$\Sigma$ 的对角元 = 半长。</strong></p><div class="note info flat"><p><strong>特征分解 vs 奇异值分解</strong></p><table><thead><tr><th></th><th>特征分解 $A=PDP^{-1}$</th><th>SVD $A=U\Sigma V^\top$</th></tr></thead><tbody><tr><td>适用</td><td><strong>只有可对角化</strong>的方阵</td><td><strong>任何矩阵</strong></td></tr><tr><td>$P$</td><td>列是特征向量，<strong>未必正交</strong></td><td>$U,V$ <strong>都是正交矩阵</strong></td></tr><tr><td>$\Sigma$</td><td>特征值，<strong>可能复数</strong></td><td>奇异值，<strong>必非负实数</strong></td></tr><tr><td>含义</td><td>一个空间里的缩放</td><td><strong>从圆到椭圆的完整描述</strong></td></tr></tbody></table><p>  <strong>所以 SVD 比特征分解更&quot;普适&quot;</strong>——它适用于<strong>任意 $m\times n$ 矩阵</strong>，包括非方阵。</p></div><hr><h1 id="center-p-二、标准：谱定理与-SVD-p-center"><center><p>二、标准：谱定理与 SVD</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-谱定理-p-center"><center><p>谱定理</p></center></h2><blockquote><p><strong>定理（实对称）</strong>：若 $A$ 是实对称矩阵（$A^\top=A$），则</p><ol><li>$A$ 的所有特征值<strong>都是实数</strong></li><li>不同特征值对应的特征向量<strong>互相正交</strong></li><li>存在<strong>正交矩阵</strong> $Q$ 使 $A=Q\Lambda Q^\top$</li></ol></blockquote><p>  <strong>推论</strong>：<strong>实对称矩阵一定可对角化</strong>，而且可以用正交矩阵。</p><p>  <strong>注意</strong>：这是 4.1 节&quot;可对角化&quot;的<strong>特例</strong>——但它比一般情形<strong>强得多</strong>（不要求特征值互异）。</p><h2 id="center-p-SVD-的定义-p-center"><center><p>SVD 的定义</p></center></h2><blockquote><p><strong>定理</strong>：任意 $A\in\mathbb{R}^{m\times n}$（$m\ge n$）都可以分解为</p><p>$$A=U\Sigma V^\top$$</p><p>其中 $U$（$m\times m$）与 $V$（$n\times n$）<strong>正交</strong>，$\Sigma$（$m\times n$）是&quot;对角阵&quot;（非对角元全零，对角元 $\sigma_1\ge\cdots\ge\sigma_n\ge0$）。</p></blockquote><p>  <strong>$\sigma_i$ 叫奇异值</strong>，$U$ 的列叫<strong>左奇异向量</strong>，$V$ 的列叫<strong>右奇异向量</strong>。</p><h2 id="center-p-SVD-与特征值的关系-p-center"><center><p>SVD 与特征值的关系</p></center></h2><p>  <strong>关键观察</strong>：</p><p>$$A^\top A=V\Sigma^\top U^\top U\Sigma V^\top=V\Sigma^2 V^\top$$</p><p>  <strong>所以</strong>：</p><p>$$\boxed{\sigma_i=\sqrt{\lambda_i(A^\top A)}}$$</p><p>  <strong>$V$ 的列是 $A^\top A$ 的特征向量</strong>——<strong>而 $A^\top A$ 是实对称的</strong>（所以谱定理保证存在！）。</p><p>  <strong>这解释了 SVD 为什么一定存在</strong>：<strong>它归结为&quot;对实对称矩阵用谱定理&quot;。</strong></p><h2 id="center-p-SVD-的几何意义-p-center"><center><p>SVD 的几何意义</p></center></h2><p>  <strong>任何线性变换都可以拆成三个简单动作</strong>：</p><figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">      Vᵀ                Σ                 U</span><br><span class="line">旋转<span class="regexp">/反射  →  沿坐标轴拉伸  →  旋转/</span>反射</span><br></pre></td></tr></table></figure><p>  <strong>所以 $A=U\Sigma V^\top$ 的含义</strong>：</p><ol><li><strong>先把空间转一下</strong>（$V^\top$）</li><li><strong>再沿坐标轴拉伸</strong>（$\Sigma$）</li><li><strong>再转一下</strong>（$U$）</li></ol><p>  <strong>&quot;任何矩阵 = 转 + 拉 + 转&quot;</strong>——这是本节的标题。</p><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：以为 SVD 就是特征分解</strong></p><p>  SVD 的 $U$ 与 $V$ 是<strong>两个不同</strong>的正交基，特征分解只有一个 $P$。</p><p><strong>错误二：以为奇异值可以为负</strong></p><p>  奇异值是<strong>非负</strong>的（$\sigma_i=\sqrt{\lambda_i}$）。</p><p><strong>错误三：把 $A^\top A$ 的秩当成 $A$ 的秩</strong></p><p>  它们<strong>相等</strong>（都等于 $A$ 的秩），但<strong>条件数差平方</strong>。</p><p><strong>错误四：SVD 的 $U$ 的列是 $A$ 的特征向量</strong></p><p>  不是！$U$ 的列是 $AA^\top$ 的特征向量，$V$ 的列是 $A^\top A$ 的。</p><p><strong>错误五：以为&quot;非方阵没有奇异值&quot;</strong></p><p>  SVD 对<strong>任意</strong> $m\times n$ 矩阵成立。</p><p><strong>错误六：用正规方程解最小二乘</strong></p><p>  $A^\top A$ 条件数平方，<strong>数值很危险</strong>。用 QR 或 SVD。</p></div><hr><h1 id="center-p-三、深入：谱定理的证明-p-center"><center><p>三、深入：谱定理的证明</p></center></h1><p>  <strong>（这一部分是严格证明。）</strong></p><h2 id="center-p-实对称矩阵特征值是实数-p-center"><center><p>实对称矩阵特征值是实数</p></center></h2><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  设 $A\vec v=\lambda\vec v$，$\vec v\ne\vec 0$（<strong>可能复向量</strong>）。</p><p>  两边取共轭转置：$\vec v^{\mathsf{H}}A^\top=\bar\lambda\vec v^{\mathsf{H}}$。</p><p>  因为 $A$ 实对称，$A^\top=A$，所以 $\vec v^{\mathsf{H}}A=\bar\lambda\vec v^{\mathsf{H}}$。</p><p>  <strong>右乘 $\vec v$</strong>：$\vec v^{\mathsf{H}}A\vec v=\bar\lambda\vec v^{\mathsf{H}}\vec v$。</p><p>  <strong>另一方面</strong>：$\vec v^{\mathsf{H}}A\vec v=\vec v^{\mathsf{H}}(\lambda\vec v)=\lambda\vec v^{\mathsf{H}}\vec v$。</p><p>  所以 $(\bar\lambda-\lambda)\vec v^{\mathsf{H}}\vec v=0$。</p><p>  <strong>而 $\vec v^{\mathsf{H}}\vec v=\lVert\vec v\rVert^2&gt;0$</strong>（$\vec v\ne0$），所以 $\bar\lambda=\lambda$，<strong>即 $\lambda$ 是实数</strong> ✓ $\blacksquare$</p>              </div>            </details><h2 id="center-p-不同特征值的特征向量正交-p-center"><center><p>不同特征值的特征向量正交</p></center></h2><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  设 $A\vec u=\lambda\vec u$，$A\vec v=\mu\vec v$，$\lambda\ne\mu$。</p><p>  <strong>考察 $\langle A\vec u,\vec v\rangle$ 两种算法</strong>：</p><p>  <strong>（1）</strong> $\langle A\vec u,\vec v\rangle=\lambda\langle\vec u,\vec v\rangle$</p><p>  <strong>（2）</strong> 由对称性 $\langle A\vec u,\vec v\rangle=\langle\vec u,A\vec v\rangle=\mu\langle\vec u,\vec v\rangle$</p><p>  所以 $(\lambda-\mu)\langle\vec u,\vec v\rangle=0$。</p><p>  <strong>但 $\lambda\ne\mu$</strong>，所以 $\langle\vec u,\vec v\rangle=0$ ✓ $\blacksquare$</p><p>  <strong>注意</strong>：这里的关键是 $\langle A\vec u,\vec v\rangle=\langle\vec u,A\vec v\rangle$——<strong>这正是&quot;对称&quot;。</strong></p>              </div>            </details><h2 id="center-p-可正交对角化（归纳法）-p-center"><center><p>可正交对角化（归纳法）</p></center></h2><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  <strong>对维数归纳</strong>。</p><p>  <strong>$n=1$</strong>：显然。</p><p>  <strong>归纳假设</strong>：结论对 $n-1$ 维成立。</p><p>  <strong>步骤</strong>：</p><ol><li>$A$ 有实特征值 $\lambda_1$（上面证了），取单位特征向量 $\vec q_1$</li><li>把 $\vec q_1$ 扩充成标准正交基 ${\vec q_1,\dots,\vec q_n}$</li><li>在这组基下，$A$ 的矩阵是</li></ol><p>$$\begin{pmatrix}\lambda_1&amp;\vec 0^\top\\\vec 0&amp;B\end{pmatrix}$$</p><p>  <strong>为什么第一列是这样</strong>：$A\vec q_1=\lambda_1\vec q_1$，所以第一列是 $(\lambda_1,0,\dots,0)$。</p><p>  <strong>为什么第一行是这样</strong>：由 $A$ 对称，矩阵也对称，所以第一行也是 $(\lambda_1,0,\dots,0)$。</p><ol start="4"><li>$B$ 是 $(n-1)\times(n-1)$ <strong>对称矩阵</strong>——用归纳假设，存在正交 $Q_0$ 使 $Q_0^\top BQ_0$ 对角</li><li>组合：$Q=P\cdot\operatorname{diag}(1,Q_0)$ 使 $Q^\top AQ$ 对角 ✓ $\blacksquare$</li></ol><p>  <strong>这个证明用到的关键事实</strong>：<strong>对称性在正交基变换下保持</strong>。</p>              </div>            </details><h2 id="center-p-SVD-的完整构造-p-center"><center><p>SVD 的完整构造</p></center></h2><p>  <strong>步骤</strong>：</p><ol><li>算 $A^\top A$（<strong>实对称、半正定</strong>）</li><li>用谱定理：$A^\top A=V\Sigma^2 V^\top$，特征值从大到小排</li><li>取前 $r$ 个非零奇异值，令 $\vec u_i=\dfrac{A\vec v_i}{\sigma_i}$</li><li><strong>验证</strong>：${\vec u_i}$ 正交</li></ol><p>$$\langle\vec u_i,\vec u_j\rangle=\frac{\langle A\vec v_i,A\vec v_j\rangle}{\sigma_i\sigma_j}=\frac{\langle\vec v_i,A^\top A\vec v_j\rangle}{\sigma_i\sigma_j}=\frac{\sigma_j^2\langle\vec v_i,\vec v_j\rangle}{\sigma_i\sigma_j}=\delta_{ij}$$</p><ol start="5"><li>把 ${\vec u_i}$ 扩充成 $\mathbb{R}^m$ 的标准正交基，补零到 $\Sigma$ ✓</li></ol><p>  <strong>所以</strong>：</p><p>$$A\vec v_i=\sigma_i\vec u_i\qquad\Longrightarrow\qquad A=U\Sigma V^\top$$</p><h2 id="center-p-低秩最优近似（Eckart-Young）-p-center"><center><p>低秩最优近似（Eckart-Young）</p></center></h2><blockquote><p><strong>定理</strong>：在所有秩 $\le k$ 的矩阵 $B$ 中，$\lVert A-B\rVert_F$ 最小的是</p></blockquote><p>$$A_k=\sum_{i=1}^{k}\sigma_i\vec u_i\vec v_i^\top$$</p><p>  <strong>证明思路</strong>：由 Frobenius 范数展开，问题变成&quot;每个奇异值的贡献&quot;，截断最大的是最优 ✓</p><p>  <strong>这就是图像压缩、PCA、降维的理论基础。</strong></p><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：从Beltrami到现代-p-center"><center><p>历史：从Beltrami到现代</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td><strong>1873</strong></td><td><strong>贝尔特拉米</strong></td><td>第一个 SVD（实方阵，且假定奇异值互异）</td></tr><tr><td>1874</td><td>若尔当</td><td>独立的类似工作（双线性型）</td></tr><tr><td><strong>1889</strong></td><td><strong>西尔维斯特</strong></td><td>&quot;奇异值&quot;这个词</td></tr><tr><td>1902</td><td>施密特</td><td>用积分方程的形式（&quot;Schmidt 分解&quot;）</td></tr><tr><td><strong>1936</strong></td><td><strong>埃卡特、杨</strong></td><td>低秩近似最优性</td></tr><tr><td>1965</td><td>戈卢布、卡汉</td><td>数值算法</td></tr><tr><td>1970s</td><td>LAPACK</td><td>稳定实现</td></tr></tbody></table><p>  <strong>&quot;SVD&quot;这个名字（Singular Value Decomposition）是 20 世纪才有的</strong>——早期叫 &quot;Schmidt 分解&quot; 或 &quot;Beltrami 分解&quot;。</p><div class="note info flat"><p><strong>&quot;奇异值&quot;为什么叫&quot;奇异&quot;</strong></p><p>  <strong>它不是&quot;奇怪的&quot;</strong>——而是英文 <strong>singular</strong> 的直译，原意是**&quot;单数的&quot;**。</p><p>  在旧文献里，<strong>&quot;singular value&quot; 指的是&quot;使 $A-\lambda I$ 奇异的那个 $\lambda$&quot;</strong>——也就是<strong>特征值</strong>。</p><p>  <strong>后来</strong>这个词被挪用来指 $\sqrt{\lambda_i(A^\top A)}$，中文就直译成&quot;奇异值&quot;了。</p><p>  <strong>所以&quot;奇异值&quot;这个名字有一点历史包袱</strong>——它和&quot;奇异&quot;（不可逆）没有直接关系。</p></div><h2 id="center-p-联系：PCA-就是-SVD-p-center"><center><p>联系：PCA 就是 SVD</p></center></h2><p>  <strong>主成分分析（PCA）</strong> 是数据科学里最常用的降维方法。</p><p>  <strong>数据</strong>：$p$ 个特征、$n$ 个样本 → 中心化后是 $n\times p$ 矩阵 $X$。</p><p>  <strong>协方差矩阵</strong>：$C=\dfrac{X^\top X}{n-1}$</p><p>  <strong>PCA 的目标</strong>：找使投影方差最大的方向——<strong>那就是 $C$ 的主特征向量</strong>。</p><p>  <strong>而 $C$ 的主特征向量 = $X$ 的</strong>右奇异向量**——**所以 PCA 就是 SVD！</p><p>  <strong>实用做法</strong>：对 $X$ 做 SVD，取前 $k$ 个右奇异向量作为主成分。</p><p>  <strong>这就是 sklearn 的 <code>PCA</code> 内部做的事</strong>（用 SVD 而不是特征分解，因为更稳定）。</p><h2 id="center-p-应用：图像压缩与推荐系统-p-center"><center><p>应用：图像压缩与推荐系统</p></center></h2><p>  <strong>图像压缩</strong>：$1000\times1000$ 图，$k=50$ 只需 $50\times2000=10^5$ 个数（原 $10^6$）——<strong>压 10 倍</strong>。</p><p>  <strong>但注意</strong>：<strong>SVD 压缩比 JPEG 差</strong>——它不能利用&quot;局部平滑性&quot;。所以实际图像压缩用 DCT（JPEG）或小波（JPEG 2000）。</p><p>  <strong>SVD 真正有用的场合</strong>：<strong>数据矩阵的低秩结构</strong>。</p><p>  <strong>推荐系统</strong>：用户-物品评分矩阵 $R$（大多为缺失值）。</p><p>  <strong>假设</strong>：$R$ 近似低秩——<strong>因为用户偏好由少数&quot;潜在因子&quot;决定</strong>。</p><p>  <strong>这就是矩阵分解（Matrix Factorization）</strong>：</p><p>$$R\approx U\Sigma V^\top$$</p><p>  <strong>Netflix Prize（2006–2009）</strong> 就是这个竞赛——<strong>SVD 的变体是获胜方案的核心</strong>。</p><p>  <strong>现代</strong>：深度学习把这块也取代了，但<strong>低秩假设仍然是最有用的先验</strong>。</p><h2 id="center-p-应用：数值稳定性与条件数-p-center"><center><p>应用：数值稳定性与条件数</p></center></h2><p>  <strong>条件数</strong>可以完全用奇异值表达：</p><p>$$\kappa(A)=\frac{\sigma_1}{\sigma_n}$$</p><p>  <strong>物理意义</strong>：<strong>&quot;最放大方向&quot;与&quot;最压缩方向&quot;之比</strong>。</p><p>  <strong>这解释了为什么正规方程危险</strong>：</p><p>$$\kappa(A^\top A)=\frac{\sigma_1^2}{\sigma_n^2}=\kappa(A)^2$$</p><p>  <strong>双侧都是 10 倍，平方就是 100 倍。</strong></p><p>  <strong>所以</strong>：</p><ul><li>双精度有 16 位有效数字</li><li>$\kappa(A)=10^8$ 时，$A^\top A$ 只剩 0 位——<strong>完全失效</strong></li></ul><p>  <strong>这就是为什么 LAPACK 的最小二乘用 QR 或 SVD，<strong>不</strong>用正规方程。</strong></p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 7 章（算子的谱定理）。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 7 章奇异值分解。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>谱定理</strong></td><td>实对称 ⟹ 特征值实、特征向量正交、可正交对角化</td></tr><tr><td><strong>SVD</strong></td><td>$A=U\Sigma V^\top$，<strong>任何矩阵都有</strong></td></tr><tr><td><strong>奇异值</strong></td><td>$\sigma_i=\sqrt{\lambda_i(A^\top A)}$，非负</td></tr><tr><td><strong>几何意义</strong></td><td>任何矩阵 = 转 + 拉 + 转</td></tr><tr><td><strong>Eckart-Young</strong></td><td>截断 SVD 是最优低秩近似</td></tr><tr><td><strong>PCA</strong></td><td>就是 SVD</td></tr><tr><td><strong>条件数</strong></td><td>$\kappa=\sigma_1/\sigma_n$；$\kappa(A^\top A)=\kappa(A)^2$</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>本节反复用到&quot;正定&quot;——但<strong>没有定义</strong>。</p><p>  <strong>下一节（第 7 章：二次型）</strong> 会补上：</p><blockquote><p><strong>$A^\top A$ 为什么一定是半正定的？</strong></p></blockquote><p>  而更重要的应用是<strong>二次型的符号</strong>——</p><blockquote><p><strong>它决定了&quot;极值是极大还是极小&quot;</strong>（Hessian 判别法）。</p></blockquote><p>  <strong>这就是数学分析 5.4 节那些判据的来源。</strong></p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第九章实对称矩阵。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 7 章。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 7 章。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;任何形状都能拉成椭球&quot;理解 SVD；②谱定理、正交对角化、SVD 的定义与构造；③谱定理的完整证明；④历史、PCA/图像压缩/推荐系统的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 5.1：内积空间与正交性——给向量装上尺子和量角器</title>
    <link href="https://hsmk.mikufans.date/posts/77b0c279.html"/>
    <id>https://hsmk.mikufans.date/posts/77b0c279.html</id>
    <published>2026-11-24T16:15:00.000Z</published>
    <updated>2026-11-24T16:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li>5.1 内积空间与正交性：给向量装上尺子和量角器（本篇）</li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;投影&quot;和&quot;夹角&quot;建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——内积公理、Cauchy-Schwarz、Gram-Schmidt</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;柯西不等式为何成立&quot;&quot;投影为何最近&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、傅里叶级数、信号处理感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：投影与夹角-p-center"><center><p>一、基础：投影与夹角</p></center></h1><p>  <strong>（这一部分只需要知道&quot;向量&quot;和&quot;点积&quot;。）</strong></p><h2 id="center-p-两条线的夹角-p-center"><center><p>两条线的夹角</p></center></h2><p>  两个向量 $\vec u=(u_1,u_2)$ 与 $\vec v=(v_1,v_2)$ 的夹角 $\theta$ 满足：</p><p>$$\vec u\cdot\vec v=\lVert\vec u\rVert\lVert\vec v\rVert\cos\theta$$</p><p>  <strong>其中 $\vec u\cdot\vec v=u_1v_1+u_2v_2$。</strong></p><p>  <strong>所以&quot;点积&quot;同时给出了长度和角度</strong>——它是<strong>度量</strong>的基础。</p><h2 id="center-p-垂直就是点积为零-p-center"><center><p>垂直就是点积为零</p></center></h2><p>  <strong>当 $\theta=90°$ 时</strong>，$\cos\theta=0$，所以</p><p>$$\vec u\perp\vec v\iff\vec u\cdot\vec v=0$$</p><p>  <strong>这就是&quot;正交&quot;的定义。</strong></p><p>  <strong>例</strong>：$(1,2)$ 与 $(2,-1)$ 的点积是 $1\times2+2\times(-1)=0$ ✓ 所以垂直。</p><h2 id="center-p-投影：影子有多长-p-center"><center><p>投影：影子有多长</p></center></h2><p>  <strong>把 $\vec v$ 投影到 $\vec u$ 上</strong>，影子长度是 $\lVert\vec v\rVert\cos\theta$。</p><p>  <strong>所以投影向量</strong>：</p><p>$$\operatorname{proj}_{\vec u}\vec v=\frac{\vec u\cdot\vec v}{\vec u\cdot\vec u}\vec u$$</p><p>  <strong>验证</strong>：它的长度是 $\dfrac{|\vec u\cdot\vec v|}{\lVert\vec u\rVert}=\lVert\vec v\rVert|\cos\theta|$ ✓</p><h2 id="center-p-投影为什么是-最近的-p-center"><center><p>投影为什么是&quot;最近的&quot;</p></center></h2><p>  <strong>直观</strong>：从点 $\vec v$ 到直线 $\vec u$ 的<strong>最短距离</strong>是<strong>垂线</strong>——而垂足正是投影点。</p><p>  <strong>所以</strong>：$\operatorname{proj}_{\vec u}\vec v$ 是直线 ${\lambda\vec u}$ 上<strong>离 $\vec v$ 最近</strong>的点。</p><p>  <strong>这正是最小二乘的思想</strong>（后面会用到）。</p><div class="note info flat"><p><strong>为什么&quot;最近点&quot;是垂足</strong></p><p>  设 $\vec p=\operatorname{proj}\vec v$，则 $\vec v-\vec p\perp\vec u$。</p><p>  对直线上任何点 $\vec q=\lambda\vec u$：</p><p>$$\lVert\vec v-\vec q\rVert^2=\lVert(\vec v-\vec p)+(\vec p-\vec q)\rVert^2=\lVert\vec v-\vec p\rVert^2+\lVert\vec p-\vec q\rVert^2$$</p><p>  <strong>（交叉项为零，因为 $\vec v-\vec p\perp\vec p-\vec q$——后者沿 $\vec u$ 方向。）</strong></p><p>  所以 $\lVert\vec v-\vec q\rVert^2\ge\lVert\vec v-\vec p\rVert^2$，等号只在 $\vec q=\vec p$ ✓</p><p>  <strong>这就是勾股定理</strong>——<strong>所以&quot;投影最近&quot;本质上是勾股定理。</strong></p></div><hr><h1 id="center-p-二、标准：内积公理与-Gram-Schmidt-p-center"><center><p>二、标准：内积公理与 Gram-Schmidt</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-内积的定义-p-center"><center><p>内积的定义</p></center></h2><blockquote><p><strong>定义</strong>：实向量空间 $V$ 上的<strong>内积</strong>是函数 $\langle\cdot,\cdot\rangle:V\times V\to\mathbb{R}$，满足：</p><ol><li><strong>对称</strong>：$\langle\vec u,\vec v\rangle=\langle\vec v,\vec u\rangle$</li><li><strong>对第一个变量线性</strong>：$\langle a\vec u+b\vec w,\vec v\rangle=a\langle\vec u,\vec v\rangle+b\langle\vec w,\vec v\rangle$</li><li><strong>正定</strong>：$\langle\vec v,\vec v\rangle\ge0$，且 $=0$ 只当 $\vec v=\vec 0$</li></ol></blockquote><p>  <strong>由定义得出</strong>：</p><p>$$\lVert\vec v\rVert=\sqrt{\langle\vec v,\vec v\rangle},\qquad \vec u\perp\vec v\iff\langle\vec u,\vec v\rangle=0$$</p><p>  <strong>注意</strong>：公理里<strong>没有提&quot;点积&quot;</strong>——所以连续性函数上的</p><p>$$\langle f,g\rangle=\int_a^b f(x)g(x),\mathrm{d}x$$</p><p><strong>也是一个内积</strong>。</p><h2 id="center-p-柯西-施瓦茨不等式-p-center"><center><p>柯西-施瓦茨不等式</p></center></h2><blockquote><p><strong>定理</strong>：$|\langle\vec u,\vec v\rangle|\le\lVert\vec u\rVert\lVert\vec v\rVert$，等号成立当且仅当两者线性相关。</p></blockquote><p>  <strong>推论</strong>：$|\cos\theta|\le1$——<strong>所以&quot;夹角&quot;这个概念总是有意义的</strong>。</p><p>  <strong>应用</strong>：</p><ul><li>三角不等式：$\lVert\vec u+\vec v\rVert\le\lVert\vec u\rVert+\lVert\vec v\rVert$</li><li>统计学里相关系数 $|\rho|\le1$</li><li>积分形式的柯西-施瓦茨：$\left(\int fg\right)^2\le\int f^2\int g^2$</li></ul><h2 id="center-p-Gram-Schmidt-正交化-p-center"><center><p>Gram-Schmidt 正交化</p></center></h2><p>  <strong>问题</strong>：给一组线性无关的向量，怎么造一组<strong>正交</strong>的？</p><p>  <strong>做法</strong>：逐个&quot;减掉投影&quot;。</p><p><strong>第一步</strong>：$\vec q_1=\dfrac{\vec a_1}{\lVert\vec a_1\rVert}$</p><p><strong>第二步</strong>：$\vec b_2=\vec a_2-\langle\vec a_2,\vec q_1\rangle\vec q_1$，然后 $\vec q_2=\dfrac{\vec b_2}{\lVert\vec b_2\rVert}$</p><p><strong>第 $k$ 步</strong>：$\vec b_k=\vec a_k-\sum_{i&lt;k}\langle\vec a_k,\vec q_i\rangle\vec q_i$，再归一化。</p><p>  <strong>本质</strong>：<strong>每来一个新向量，就把它在已有正交系上的&quot;影子&quot;减掉，剩下的自然正交。</strong></p><h2 id="center-p-正交矩阵-p-center"><center><p>正交矩阵</p></center></h2><blockquote><p><strong>定义</strong>：方阵 $Q$ 叫<strong>正交矩阵</strong>，若 $Q^\top Q=I$（即 $Q^{-1}=Q^\top$）。</p></blockquote><p>  <strong>等价说法</strong>：$Q$ 的列是<strong>标准正交组</strong>（两两正交且长度为 1）。</p><p>  <strong>性质</strong>：</p><table><thead><tr><th>性质</th><th>说明</th></tr></thead><tbody><tr><td>$Q^{-1}=Q^\top$</td><td>求逆变转置</td></tr><tr><td>$\det Q=\pm1$</td><td>体积不变（或翻转）</td></tr><tr><td>保长度</td><td>$\lVert Q\vec x\rVert=\lVert\vec x\rVert$</td></tr><tr><td>保内积</td><td>$\langle Q\vec u,Q\vec v\rangle=\langle\vec u,\vec v\rangle$</td></tr></tbody></table><p>  <strong>所以正交变换 = 旋转（或旋转 + 反射）</strong>——不改变形状。</p><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：以为内积必须是&quot;点积&quot;</strong></p><p>  任何满足三条公理的都行。<strong>甚至可以是 $x_1y_1+2x_2y_2$</strong>（加权内积）。</p><p><strong>错误二：用 $|$ 写范数</strong></p><p>  用 $\lVert\cdot\rVert$。<strong>单个竖线会被 markdown-it 配对成强调</strong>。</p><p><strong>错误三：Gram-Schmidt 忘了归一化</strong></p><p>  归一化是最后一步，<strong>少了它就不是&quot;标准&quot;正交组</strong>。</p><p><strong>错误四：以为&quot;正交&quot;等于&quot;垂直&quot;只对箭头成立</strong></p><p>  函数也可以正交（$\sin nx$ 与 $\cos mx$）——<strong>见 ④ 层</strong>。</p><p><strong>错误五：正交矩阵的行列式一定是 1</strong></p><p>  可能是 $-1$（含反射）。</p><p><strong>错误六：把&quot;正交&quot;与&quot;线性无关&quot;混为一谈</strong></p><p>  正交 ⟹ 线性无关，<strong>但反过来不成立</strong>。</p></div><hr><h1 id="center-p-三、深入：两个定理的证明-p-center"><center><p>三、深入：两个定理的证明</p></center></h1><p>  <strong>（这一部分是严格证明。）</strong></p><h2 id="center-p-柯西-施瓦茨不等式的证明-p-center"><center><p>柯西-施瓦茨不等式的证明</p></center></h2><details class="folding-tag" cyan><summary> 证明（配方法） </summary>              <div class='content'>              <p>  <strong>关键技巧</strong>：对任意实数 $t$，</p><p>$$0\le\lVert\vec u+t\vec v\rVert^2=\lVert\vec u\rVert^2+2t\langle\vec u,\vec v\rangle+t^2\lVert\vec v\rVert^2$$</p><p>  <strong>这是一个关于 $t$ 的二次式，且恒 $\ge0$。</strong></p><p>  所以<strong>判别式 $\le0$</strong>：</p><p>$$\Delta=4\langle\vec u,\vec v\rangle^2-4\lVert\vec u\rVert^2\lVert\vec v\rVert^2\le0$$</p><p>  即 $|\langle\vec u,\vec v\rangle|\le\lVert\vec u\rVert\lVert\vec v\rVert$ ✓</p><p>  <strong>等号条件</strong>：判别式为 0 ⟺ 存在 $t$ 使 $\vec u+t\vec v=\vec 0$ ⟺ 线性相关 ✓ $\blacksquare$</p><p>  <strong>这个证明的美妙之处</strong>：<strong>把&quot;不等式&quot;变成了&quot;二次式非负&quot;</strong>——这是分析里的标准技巧。</p>              </div>            </details><h2 id="center-p-投影到子空间的公式-p-center"><center><p>投影到子空间的公式</p></center></h2><p>  <strong>设 $U$ 有标准正交基 $\vec q_1,\dots,\vec q_k$</strong>，则</p><p>$$\Pi_U\vec v=\sum_{i=1}^{k}\langle\vec v,\vec q_i\rangle\vec q_i$$</p><p>  <strong>（这里 $\Pi_U$ 表示&quot;投影到 $U$ 上的算子&quot;，本文用它代替 $\operatorname{proj}$ 的长记号。）</strong></p><details class="folding-tag" cyan><summary> 为什么这是投影 </summary>              <div class='content'>              <p>  <strong>验证两件事</strong>：</p><p><strong>（1）它在 $U$ 里</strong>：显然（是 $\vec q_i$ 的组合）。</p><p><strong>（2）差与 $U$ 正交</strong>：</p><p>  对每个 $\vec q_j$：</p><p>$$\langle\vec v-\Pi_U\vec v,\ \vec q_j\rangle=\langle\vec v,\vec q_j\rangle-\sum_i\langle\vec v,\vec q_i\rangle\langle\vec q_i,\vec q_j\rangle$$</p><p>  由标准正交性 $\langle\vec q_i,\vec q_j\rangle=\delta_{ij}$，和式只剩 $i=j$ 项：</p><p>$$=\langle\vec v,\vec q_j\rangle-\langle\vec v,\vec q_j\rangle=0\quad\checkmark$$</p><p>  <strong>（3）最近性</strong>：同 ① 层的勾股论证 ✓</p><p>  <strong>所以公式正确</strong> ✓ $\blacksquare$</p><p>  <strong>注意</strong>：<strong>只有&quot;标准正交基&quot;才能用这个简单公式</strong>。若基不正交，要解正规方程。</p>              </div>            </details><h2 id="center-p-Bessel-不等式与-Parseval-等式-p-center"><center><p>Bessel 不等式与 Parseval 等式</p></center></h2><p>  <strong>若 ${\vec q_1,\dots,\vec q_k}$ 是标准正交组</strong>（可能不张成整个空间）：</p><p>$$\sum_{i=1}^{k}\langle\vec v,\vec q_i\rangle^2\le\lVert\vec v\rVert^2$$</p><p>  <strong>这叫 Bessel 不等式</strong>——物理意义是**&quot;投影的总能量不超过总能量&quot;**。</p><p>  <strong>若 ${\vec q_i}$ 张成整个空间（是基）</strong>，则<strong>等号成立</strong>——<strong>Parseval 等式</strong>：</p><p>$$\lVert\vec v\rVert^2=\sum_{i=1}^{n}\langle\vec v,\vec q_i\rangle^2$$</p><p>  <strong>这就是&quot;能量守恒&quot;</strong>——<strong>投影不丢失信息</strong>。</p><p>  <strong>与数学分析 4.4 节完全对应</strong>：那里的 Parseval 等式就是这里的连续版本。</p><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：内积的抽象化-p-center"><center><p>历史：内积的抽象化</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1821</td><td>柯西</td><td>积分形式的柯西-施瓦茨不等式</td></tr><tr><td>1859</td><td><strong>布尼亚科夫斯基</strong></td><td>积分形式的系统化</td></tr><tr><td><strong>1878</strong></td><td><strong>施瓦茨</strong></td><td>一般形式的证明</td></tr><tr><td><strong>1907</strong></td><td><strong>施密特</strong></td><td>Gram-Schmidt 正交化（连续情形）</td></tr><tr><td>1909</td><td>格拉姆</td><td>独立的类似工作</td></tr><tr><td><strong>1929</strong></td><td><strong>冯·诺依曼</strong></td><td>希尔伯特空间的公理化</td></tr></tbody></table><p>  <strong>注意&quot;柯西-施瓦茨&quot;这个名字</strong>在不同国家叫法不同：</p><ul><li>法国：<strong>Cauchy-Schwarz</strong></li><li>俄罗斯：<strong>Cauchy-Bunyakovsky-Schwarz</strong></li><li>德国：<strong>Cauchy-Schwarzsche Ungleichung</strong></li></ul><p>  <strong>所以它有三个名字在流传</strong>——而<strong>布尼亚科夫斯基 1859 年的贡献是独立且完整的</strong>。</p><div class="note info flat"><p><strong>Gram-Schmidt 的数值问题</strong></p><p>  <strong>经典的 Gram-Schmidt（Classical GS）在浮点运算下不稳定。</strong></p><p>  <strong>改进版（Modified GS）</strong> 把投影逐个减，误差小得多。</p><p>  <strong>更好的做法</strong>：用 <strong>Householder 变换</strong>（正交矩阵）或 <strong>Givens 旋转</strong>。</p><p>  <strong>这就是为什么</strong> LAPACK 的 <code>QR</code> 分解<strong>不用</strong> Gram-Schmidt——<strong>它用的是 Householder</strong>。</p><p>  <strong>教训</strong>：<strong>数学上正确的算法，数值上可能不可靠</strong>。</p></div><h2 id="center-p-联系：傅里叶级数就是正交展开-p-center"><center><p>联系：傅里叶级数就是正交展开</p></center></h2><p>  <strong>数学分析 4.4 节的傅里叶级数，其实是本节理论在函数空间的应用。</strong></p><p>  <strong>函数空间的内积</strong>：</p><p>$$\langle f,g\rangle=\frac1\pi\int_{-\pi}^{\pi}f(x)g(x),\mathrm{d}x$$</p><p>  <strong>三角函数系是标准正交的</strong>：</p><p>$$\langle\cos nx,\cos mx\rangle=\delta_{nm},\qquad\langle\sin nx,\sin mx\rangle=\delta_{nm},\qquad\langle\cos nx,\sin mx\rangle=0$$</p><p>  <strong>所以傅里叶系数就是&quot;坐标&quot;</strong>（=投影）：</p><p>$$a_n=\langle f,\cos nx\rangle=\frac1\pi\int f(x)\cos nx,\mathrm{d}x$$</p><p>  <strong>这就是本节&quot;投影公式&quot;在无穷维的直接应用</strong> ✓</p><p>  <strong>Bessel 不等式 ⟹ 傅里叶系数平方和 $\le$ 能量 ⟹ Parseval 等式 ⟹ 能量守恒。</strong></p><p>  <strong>所以 4.4 节那些&quot;看似技巧性&quot;的等式，本质都是内积空间的几何。</strong></p><h2 id="center-p-应用：最小二乘的几何解释-p-center"><center><p>应用：最小二乘的几何解释</p></center></h2><p>  <strong>超定方程</strong> $A\vec x=\vec b$（$m&gt;n$）无解。</p><p>  <strong>最小二乘</strong>：找 $C(A)$ 里最接近 $\vec b$ 的点——<strong>就是投影</strong>。</p><p>  <strong>所以</strong>：$A\vec x_{\text{LS}}$ 就是 $\vec b$ 在 $C(A)$ 上的投影。</p><p>  <strong>而&quot;差与列空间正交&quot;给出</strong>：</p><p>$$A^\top(\vec b-A\vec x_{\text{LS}})=0\qquad\Longrightarrow\qquad A^\top A\vec x_{\text{LS}}=A^\top\vec b$$</p><p>  <strong>这就是正规方程</strong>——<strong>而它只是&quot;投影点满足差正交于子空间&quot;的代数写法</strong>。</p><p>  <strong>若 $A$ 的列不正交</strong>，$A^\top A$ 有非对角项，计算复杂。</p><p>  <strong>若先做 Gram-Schmidt 使列正交</strong>（得到 $A=QR$），则：</p><p>$$R\vec x=Q^\top\vec b$$</p><p>  <strong>这就是为什么 QR 分解是求解最小二乘的标准方法</strong>（比正规方程稳定得多）。</p><p>  <strong>正规方程的数值问题</strong>：$\kappa(A^\top A)=\kappa(A)^2$——<strong>条件数平方</strong>，非常危险。</p><h2 id="center-p-应用：信号处理里的正交-p-center"><center><p>应用：信号处理里的正交</p></center></h2><p>  <strong>为什么通信要用&quot;正交信号&quot;？</strong></p><p>  <strong>因为正交的信号互不干扰</strong>——可以同时传输，接收端能分离。</p><p>  <strong>具体</strong>：若发送 $\vec s_1,\dots,\vec s_n$ 是正交的，则接收 $\vec r=\sum\vec s_i+\vec n$，</p><p>$$\hat a_i=\langle\vec r,\vec s_i\rangle=\langle\vec s_i,\vec s_i\rangle a_i+\langle\vec n,\vec s_i\rangle$$</p><p>  <strong>每个符号只依赖自己的分量</strong>——<strong>这就是&quot;正交多址&quot;（OFDM 的基础）</strong>。</p><p>  <strong>CDMA 也是这个原理</strong>：给每个用户分配一个正交码。</p><p>  <strong>所以&quot;内积&quot;不只是数学工具，它是现代通信的物理基础。</strong></p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 6 章内积空间。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 4 章正交性。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>内积</strong></td><td>三条公理，不限于点积</td></tr><tr><td><strong>正交</strong></td><td>$\langle\vec u,\vec v\rangle=0$</td></tr><tr><td><strong>柯西-施瓦茨</strong></td><td>$</td></tr><tr><td><strong>Gram-Schmidt</strong></td><td>逐个减掉投影，得到正交基</td></tr><tr><td><strong>正交矩阵</strong></td><td>$Q^\top Q=I$，保长度保内积</td></tr><tr><td><strong>投影公式</strong></td><td>$\sum\langle\vec v,\vec q_i\rangle\vec q_i$（<strong>需标准正交基</strong>）</td></tr><tr><td><strong>Bessel/Parseval</strong></td><td>投影能量 ≤ 总能量；是基时相等</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>有了内积，就能回答 4.1 节留下的问题：</p><blockquote><p><strong>实对称矩阵能对角化吗？而且用正交矩阵？</strong></p></blockquote><p>  <strong>答案是&quot;能&quot;，而且这是整个应用数学最漂亮的定理之一</strong>——<strong>谱定理</strong>。</p><p>  它的推论包括：</p><ul><li>PCA（主成分分析）</li><li>振动模态分析</li><li>二次型的最值</li><li>奇异值分解 SVD</li></ul></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第九章欧几里得空间。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 6 章。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 4 章。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;夹角与投影&quot;理解内积；②内积公理、Cauchy-Schwarz、Gram-Schmidt；③为什么柯西不等式成立、投影为什么是&quot;最近点&quot;；④历史、与傅里叶级数/信号处理/最小二乘的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 4.1：特征值与对角化——变换的&quot;固有方向&quot;</title>
    <link href="https://hsmk.mikufans.date/posts/da61c2d4.html"/>
    <id>https://hsmk.mikufans.date/posts/da61c2d4.html</id>
    <published>2026-11-24T12:15:00.000Z</published>
    <updated>2026-11-24T12:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li>4.1 特征值与对角化：变换的&quot;固有方向&quot;（本篇）<br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;拉伸时哪些方向不变&quot;建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——特征方程、对角化条件</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;为什么不能总能对角化&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、马尔可夫链、PageRank、振动感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：拉伸时哪些方向不变-p-center"><center><p>一、基础：拉伸时哪些方向不变</p></center></h1><p>  <strong>（这一部分只需要知道&quot;线性变换&quot;。）</strong></p><h2 id="center-p-一个拉伸的例子-p-center"><center><p>一个拉伸的例子</p></center></h2><p>  考虑矩阵</p><p>$$A=\begin{pmatrix}2&amp;0\\0&amp;3\end{pmatrix}$$</p><p>  <strong>它把向量 $(x,y)$ 变成 $(2x,3y)$。</strong></p><p>  <strong>问</strong>：有没有向量，变换后<strong>方向不变</strong>、只是长度变了？</p><p>  <strong>试 $(1,0)$</strong>：$A(1,0)=(2,0)$——<strong>方向没变，长度变成 2 倍</strong> ✓</p><p>  <strong>试 $(0,1)$</strong>：$A(0,1)=(0,3)$——<strong>方向没变，长度变成 3 倍</strong> ✓</p><p>  <strong>试 $(1,1)$</strong>：$A(1,1)=(2,3)$——<strong>方向变了</strong> ✗</p><p>  <strong>所以这个矩阵有两个&quot;固有方向&quot;：$(1,0)$ 和 $(0,1)$。</strong></p><p>  <strong>这就是特征向量。</strong> 而&quot;放大倍数&quot;（2 和 3）叫<strong>特征值</strong>。</p><h2 id="center-p-写成一方程-p-center"><center><p>写成一方程</p></center></h2><p>  &quot;方向不变，只缩放&quot;用数学写出来就是：</p><p>$$A\vec v=\lambda\vec v$$</p><p>  其中 $\vec v\ne\vec 0$ 是<strong>特征向量</strong>，$\lambda$ 是<strong>特征值</strong>。</p><p>  <strong>移项</strong>：</p><p>$$(A-\lambda I)\vec v=\vec 0$$</p><p>  <strong>关键</strong>：$\vec v\ne\vec 0$，所以 $(A-\lambda I)$ <strong>必须有非零零空间</strong>，即<strong>不可逆</strong>！</p><p>  <strong>所以</strong>：</p><p>$$\det(A-\lambda I)=0$$</p><p>  <strong>这个方程叫特征方程</strong>，它是 $\lambda$ 的 $n$ 次多项式（<strong>特征多项式</strong>）。</p><h2 id="center-p-为什么要找特征向量-p-center"><center><p>为什么要找特征向量</p></center></h2><p>  <strong>因为在特征向量的方向上，变换变成&quot;数乘&quot;——最简单。</strong></p><p>  <strong>若 $\vec v_1,\dots,\vec v_n$ 都是特征向量</strong>，则任何 $\vec x=\sum c_i\vec v_i$ 的变换是：</p><p>$$A\vec x=\sum c_i\lambda_i\vec v_i$$</p><p>  <strong>变换被&quot;分解&quot;成了各个方向上的独立缩放。</strong></p><p>  <strong>这就是对角化</strong>——<strong>找到一组由特征向量组成的基</strong>。</p><div class="note info flat"><p><strong>&quot;对角化&quot;到底对角化了什么</strong></p><p>  若有一组特征向量组成的基，则在这组基下，变换的矩阵是<strong>对角阵</strong>：</p><p>$$D=\begin{pmatrix}\lambda_1&amp;&amp;\\&amp;\ddots&amp;\\&amp;&amp;\lambda_n\end{pmatrix}$$</p><p>  <strong>而由 2.1 节的相似公式</strong>：</p><p>$$A=PDP^{-1}$$</p><p>  其中 $P$ 的列是特征向量。</p><p>  <strong>所以对角化的含义</strong>：<strong>换一组基，让变换变成&quot;纯缩放&quot;。</strong></p><p>  <strong>矩阵乘法</strong>：$A^k=PD^kP^{-1}$——这就让&quot;矩阵的高次幂&quot;变得容易算（只需求 $\lambda^k$）。</p></div><hr><h1 id="center-p-二、标准：特征方程与对角化-p-center"><center><p>二、标准：特征方程与对角化</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-定义与计算-p-center"><center><p>定义与计算</p></center></h2><blockquote><p><strong>定义</strong>：$\lambda$ 是 $A$ 的<strong>特征值</strong>，若 $\det(A-\lambda I)=0$。对应的<strong>特征向量</strong>是 $(A-\lambda I)\vec v=\vec 0$ 的非零解。</p></blockquote><p>  <strong>计算步骤</strong>：</p><ol><li>算 $\det(A-\lambda I)$——得到一个多项式</li><li>求它的根（$n$ 次多项式有 $n$ 个复根，计重数）</li><li>对每个 $\lambda$，解 $(A-\lambda I)\vec v=0$ 得特征向量</li></ol><p><strong>例</strong>：</p><p>$$A=\begin{pmatrix}3&amp;1\\0&amp;2\end{pmatrix}$$</p><p>  <strong>第 1 步</strong>：$A-\lambda I=\begin{pmatrix}3-\lambda&amp;1\\0&amp;2-\lambda\end{pmatrix}$</p><p>  <strong>第 2 步</strong>：$\det=(3-\lambda)(2-\lambda)$，所以 $\lambda_1=3$、$\lambda_2=2$</p><p>  <strong>第 3 步</strong>：</p><ul><li>$\lambda=3$：$(A-3I)=\begin{pmatrix}0&amp;1\\0&amp;-1\end{pmatrix}$，解是 $(1,0)$</li><li>$\lambda=2$：$(A-2I)=\begin{pmatrix}1&amp;1\\0&amp;0\end{pmatrix}$，解是 $(1,-1)$</li></ul><p>  <strong>所以</strong></p><p>$$P=\begin{pmatrix}1&amp;1\\0&amp;-1\end{pmatrix},\qquad D=\begin{pmatrix}3&amp;0\\0&amp;2\end{pmatrix}$$</p><p>  <strong>验证</strong>：$P^{-1}AP=D$ ✓</p><h2 id="center-p-两条基本性质-p-center"><center><p>两条基本性质</p></center></h2><table><thead><tr><th>性质</th><th>说明</th></tr></thead><tbody><tr><td><strong>迹</strong> $\operatorname{tr}(A)=\lambda_1+\cdots+\lambda_n$</td><td>特征值之和 = 对角线之和</td></tr><tr><td><strong>行列式</strong> $\det(A)=\lambda_1\cdots\lambda_n$</td><td>特征值之积 = 行列式</td></tr></tbody></table><p>  <strong>这两条很有用</strong>：解特征方程后可以用它们<strong>验算</strong>。</p><p>  <strong>几何解释</strong>：$\det A$ 是&quot;体积放大倍数&quot;——那正好是各方向放大倍数的乘积 ✓</p><h2 id="center-p-对角化条件-p-center"><center><p>对角化条件</p></center></h2><blockquote><p><strong>定理</strong>：$A$（$n\times n$）<strong>可对角化</strong> ⟺ 它有 $n$ 个<strong>线性无关</strong>的特征向量。</p></blockquote><p>  <strong>充分条件（好用）</strong>：</p><ol><li><strong>有 $n$ 个互不相同的特征值</strong> ⟹ 可对角化</li><li>$A$ 是<strong>实对称矩阵</strong> ⟹ 可对角化（而且可以用正交矩阵对角化，第 6 章）</li><li>$A$ 的<strong>最小多项式</strong>没有重根 ⟹ 可对角化</li></ol><p>  <strong>必要条件</strong>：对每个特征值 $\lambda$，</p><p>$$\text{几何重数}\le\text{代数重数}$$</p><p>  其中：</p><ul><li><strong>代数重数</strong> = $\lambda$ 在特征多项式里作为根的重数</li><li><strong>几何重数</strong> = $\ker(A-\lambda I)$ 的维数 = 特征向量的个数</li></ul><h2 id="center-p-不能对角化的例子-p-center"><center><p>不能对角化的例子</p></center></h2><p>$$J=\begin{pmatrix}1&amp;1\\0&amp;1\end{pmatrix}$$</p><p>  <strong>特征方程</strong>：$(1-\lambda)^2=0$，所以 $\lambda=1$（<strong>代数重数 2</strong>）。</p><p>  <strong>特征向量</strong>：$(J-I)=\begin{pmatrix}0&amp;1\\0&amp;0\end{pmatrix}$，解是 $(1,0)$ 的倍数——<strong>几何重数只有 1</strong>。</p><p>  <strong>所以几何重数 &lt; 代数重数，不能对角化。</strong></p><p>  <strong>这个矩阵叫&quot;若尔当块&quot;</strong>（第 8 章细讲）。</p><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：以为&quot;有特征值就能对角化&quot;</strong></p><p>  配对不上（如上面的若尔当块）。</p><p><strong>错误二：算特征向量时取了零向量</strong></p><p>  特征向量必须<strong>非零</strong>。</p><p><strong>错误三：以为特征值是实数</strong></p><p>  实矩阵可能有<strong>复特征值</strong>（如旋转矩阵的 $\pm\mathrm{i}$）。</p><p><strong>错误四：混淆 $A$ 与 $A^\top$ 的特征向量</strong></p><p>  它们的特征值相同，但<strong>特征向量一般不同</strong>。</p><p><strong>错误五：以为&quot;特征向量唯一&quot;</strong></p><p>  特征向量<strong>可以任意缩放</strong>（任何非零倍数都是）。<strong>所以要说&quot;特征空间&quot;，不唯一。</strong></p><p><strong>错误六：用 $\det(A-\lambda I)$ 时符号写错</strong></p><p>  $A-\lambda I$ 与 $\lambda I-A$ 差一个 $(-1)^n$，<strong>多项式符号可能全反</strong>。</p></div><hr><h1 id="center-p-三、深入：为什么不能总能对角化-p-center"><center><p>三、深入：为什么不能总能对角化</p></center></h1><p>  <strong>（这一部分是完整推导。）</strong></p><h2 id="center-p-几何重数-≤-代数重数的证明-p-center"><center><p>几何重数 ≤ 代数重数的证明</p></center></h2><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  设 $\lambda_0$ 的几何重数是 $k$，取 $\ker(A-\lambda_0 I)$ 的基 $\vec v_1,\dots,\vec v_k$，扩充成 $\mathbb{C}^n$ 的基。</p><p>  <strong>在这组基下，$A$ 的矩阵形状是</strong>：</p><p>$$A\sim\begin{pmatrix}\lambda_0 I_k&amp;B\\0&amp;C\end{pmatrix}$$</p><p>  <strong>（为什么左上角是 $\lambda_0 I_k$：因为前 $k$ 个向量是特征向量。）</strong></p><p>  <strong>特征多项式</strong>：</p><p>$$\det(A-\lambda I)=\det\begin{pmatrix}(\lambda_0-\lambda)I_k&amp;B\\0&amp;C-\lambda I\end{pmatrix}=(\lambda_0-\lambda)^k\det(C-\lambda I)$$</p><p>  <strong>所以 $\lambda_0$ 至少是 $k$ 重根</strong>，即<strong>代数重数 $\ge$ 几何重数</strong> ✓ $\blacksquare$</p><p>  <strong>推论</strong>：几何重数 = 代数重数对<strong>每个</strong>特征值都成立 ⟺ 可对角化（因为特征向量总数 = $n$）。</p>              </div>            </details><h2 id="center-p-为什么-n-个不同特征值-⟹-可对角化-p-center"><center><p>为什么&quot;$n$ 个不同特征值 ⟹ 可对角化&quot;</p></center></h2><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  <strong>要证</strong>：特征向量 $\vec v_1,\dots,\vec v_k$（对应<strong>互不相同</strong>的 $\lambda_i$）线性无关。</p><p>  <strong>反证</strong>：设存在最小的 $k$ 使 $\sum c_i\vec v_i=\vec 0$（系数不全零）。</p><p>  左乘 $A$：$\sum c_i\lambda_i\vec v_i=\vec 0$。</p><p>  原式乘 $\lambda_k$：$\sum c_i\lambda_k\vec v_i=\vec 0$。</p><p>  <strong>相减</strong>：$\sum_{i&lt;k}c_i(\lambda_i-\lambda_k)\vec v_i=\vec 0$。</p><p>  这是 $k-1$ 个向量的关系。<strong>若系数不全零</strong>，与&quot;$k$ 最小&quot;矛盾；<br><strong>若全零</strong>，则所有 $c_i=0$（$i&lt;k$），而 $\vec v_k\ne\vec 0$ 给出 $c_k=0$——矛盾 ✓ $\blacksquare$</p><p>  <strong>注意</strong>：这个结论<strong>不能反过来</strong>——可对角化不要求特征值互异（如单位阵）。</p>              </div>            </details><h2 id="center-p-对角化的用处：矩阵幂-p-center"><center><p>对角化的用处：矩阵幂</p></center></h2><p>  <strong>若 $A=PDP^{-1}$</strong>，则</p><p>$$A^k=PD^kP^{-1}$$</p><p>  <strong>而 $D^k$ 只是把对角线元素各自取 $k$ 次方。</strong></p><p>  <strong>这就是&quot;为什么马尔可夫链能收敛&quot;</strong>——见下一节。</p><p>  <strong>实用例子</strong>：Fibonacci 数列</p><p>$$F_{n+1}=F_n+F_{n-1}\ \Longrightarrow\ \begin{pmatrix}F_{n+1}\\F_n\end{pmatrix}=\begin{pmatrix}1&amp;1\\1&amp;0\end{pmatrix}\begin{pmatrix}F_n\\F_{n-1}\end{pmatrix}$$</p><p>  <strong>特征值</strong>是 $\lambda=\dfrac{1\pm\sqrt5}{2}$。</p><p>  <strong>所以</strong> $F_n=\dfrac{1}{\sqrt5}\left[\left(\dfrac{1+\sqrt5}{2}\right)^n-\left(\dfrac{1-\sqrt5}{2}\right)^n\right]$——<strong>Binet 公式</strong> ✓</p><p>  <strong>这个公式是怎么来的</strong>：$F_n$ 是矩阵幂的某个分量，而矩阵幂由特征值控制。</p><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：特征值的三次-重现-p-center"><center><p>历史：特征值的三次&quot;重现&quot;</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td><strong>1743</strong></td><td><strong>欧拉</strong></td><td>刚体转动惯量的主轴问题（隐含特征值）</td></tr><tr><td>1820s</td><td>柯西</td><td>对称矩阵的特征值理论</td></tr><tr><td><strong>1858</strong></td><td><strong>凯莱</strong></td><td>特征方程，$A^k=PD^kP^{-1}$</td></tr><tr><td>1870s</td><td>弗罗贝尼乌斯</td><td>若尔当标准型</td></tr><tr><td><strong>1929</strong></td><td><strong>冯·米塞斯</strong></td><td>幂法（数值求主特征值）</td></tr><tr><td>1961</td><td>弗朗西斯</td><td>QR 算法</td></tr></tbody></table><p>  <strong>&quot;eigen&quot; 是德语&quot;固有的、特有的&quot;</strong>——德语 <strong>eigenvalue</strong>（特征值）。</p><p>  <strong>这个词是希尔伯特 1904 年在积分方程理论里用的</strong>——他想描述&quot;算子作用后方向不变&quot;的东西。</p><div class="note info flat"><p><strong>特征值为什么在物理里到处都是</strong></p><p>  <strong>因为物理定律常常是线性的</strong>，而线性系统的&quot;固有模式&quot;就是特征向量。</p><table><thead><tr><th>领域</th><th>特征值是什么</th></tr></thead><tbody><tr><td><strong>振动</strong></td><td>固有频率的平方</td></tr><tr><td><strong>量子力学</strong></td><td>能量的可测值</td></tr><tr><td><strong>结构力学</strong></td><td>屈曲载荷</td></tr><tr><td><strong>电路</strong></td><td>自然频率</td></tr><tr><td><strong>稳定性</strong></td><td>特征值的实部符号</td></tr></tbody></table><p>  <strong>所以&quot;求特征值&quot;是整个科学计算里最核心的数值问题之一。</strong></p><p>  <strong>而这正好是「微分方程数值解」系列的稳定性分析的核心</strong>（特征值决定差分格式是否稳定）。</p></div><h2 id="center-p-联系：马尔可夫链与-PageRank-p-center"><center><p>联系：马尔可夫链与 PageRank</p></center></h2><p>  <strong>马尔可夫链</strong>：状态转移矩阵 $P$（每列和为 1）。</p><p>  <strong>平稳分布</strong> $\vec\pi$ 满足：</p><p>$$P\vec\pi=\vec\pi$$</p><p>  <strong>这就是特征值 1 的特征向量！</strong></p><p>  <strong>为什么一定存在</strong>：因为 $P$ 每列和为 1，所以 $(1,1,\dots,1)$ 是 $P^\top$ 的特征值 1 的特征向量，因此 $P$ 有特征值 1。</p><p>  <strong>PageRank 就是马尔可夫链</strong>：网页是状态，&quot;随机点击链接&quot;是转移。</p><p>  <strong>$P$ 的主特征向量就是 PageRank 分数。</strong></p><p>  <strong>实用算法</strong>：<strong>幂法</strong>——反复乘 $P$，收敛到主特征向量。</p><p>  <strong>为什么收敛</strong>：若所有特征值 $|\lambda_i|&lt;1$（除主特征值），则</p><p>$$P^k\vec x\to c_1\vec v_1$$</p><p>  <strong>所以收敛速度由&quot;次大特征值的模&quot;决定</strong>——这叫<strong>谱隙</strong>。</p><h2 id="center-p-应用：幂法与-QR-算法-p-center"><center><p>应用：幂法与 QR 算法</p></center></h2><p>  <strong>幂法</strong>（最简单的特征值算法）：</p><p>$$\vec x_{k+1}=\frac{A\vec x_k}{\lVert A\vec x_k\rVert}$$</p><p>  <strong>收敛到主特征向量</strong>（$|\lambda|$ 最大的那个）。</p><p>  <strong>QR 算法</strong>（现代标准方法）：</p><ol><li>分解 $A_k=Q_kR_k$</li><li>令 $A_{k+1}=R_kQ_k$</li><li>重复</li></ol><p>  <strong>$A_k$ 会收敛到上三角</strong>（对角是特征值）。</p><p>  <strong>为什么</strong>：$A_{k+1}=R_kQ_k=Q_k^{-1}A_kQ_k$——<strong>每一步都是一次相似变换</strong>！</p><p>  <strong>所以 QR 算法是在&quot;逐步逼近对角形&quot;</strong>——正是本节的&quot;对角化&quot;在数值上的实现。</p><p>  <strong>实用改进</strong>：先用 Householder 变换化到 Hessenberg 形，再 QR 迭代——<strong>这在 LAPACK 里是标准流程</strong>。</p><h2 id="center-p-应用：振动与模态分析-p-center"><center><p>应用：振动与模态分析</p></center></h2><p>  <strong>多自由度振动的方程</strong>：</p><p>$$M\ddot{\vec x}+K\vec x=\vec 0$$</p><p>  <strong>设 $\vec x=\vec v\mathrm{e}^{\mathrm{i}\omega t}$</strong>，得广义特征值问题：</p><p>$$K\vec v=\omega^2M\vec v$$</p><p>  <strong>特征值 $\omega^2$ 就是固有频率的平方</strong>，<strong>特征向量 $\vec v$ 就是振型</strong>。</p><p>  <strong>这就是&quot;模态分析&quot;</strong>——土木、机械、航空的结构设计都要做。</p><p>  <strong>桥梁为什么会共振</strong>：如果外界激励频率匹配某个 $\omega$，振幅会无限放大。</p><p>  <strong>（1940 年塔科马海峡大桥的倒塌，就是风引起的自激振动。）</strong></p><p>  <strong>与有限元的联系</strong>：$K$ 和 $M$ 是刚度矩阵与质量矩阵，<strong>都是稀疏对称的</strong>——<br>所以可以用特殊的特征值算法（Lanczos 法），比一般 QR 快得多。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 5 章特征值与特征向量（Axler 主张<strong>不用行列式</strong>讲特征值）。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 6 章。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>特征方程</strong></td><td>$\det(A-\lambda I)=0$</td></tr><tr><td><strong>特征值/向量</strong></td><td>$A\vec v=\lambda\vec v$，$\vec v\ne\vec 0$</td></tr><tr><td><strong>两条性质</strong></td><td>$\operatorname{tr}A=\sum\lambda$，$\det A=\prod\lambda$</td></tr><tr><td><strong>可对角化</strong></td><td>⟺ 有 $n$ 个线性无关的特征向量</td></tr><tr><td><strong>充分条件</strong></td><td>$n$ 个不同特征值；或实对称</td></tr><tr><td><strong>必要关系</strong></td><td>几何重数 $\le$ 代数重数</td></tr><tr><td><strong>对角化的用</strong></td><td>$A^k=PD^kP^{-1}$，让矩阵幂变简单</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>本节反复出现&quot;正交对角化&quot;&quot;实对称&quot;——但<strong>没有定义内积</strong>。</p><p>  <strong>下一节（第 6 章：内积空间）</strong> 会补上这个基础：</p><blockquote><p><strong>有了内积，才有&quot;长度&quot;&quot;角度&quot;&quot;垂直&quot;。</strong></p></blockquote><p>  而最重要的定理是：</p><blockquote><p><strong>实对称矩阵一定可以正交对角化</strong>（谱定理）。</p></blockquote><p>  <strong>这是整个应用数学里最有用的定理之一</strong>——因为它保证了&quot;振动模态&quot;总是实的、正交的。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第七章特征值。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 5 章。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 6 章。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;拉伸时哪些方向不变&quot;理解特征向量；②特征多项式、特征值与特征向量、对角化条件；③为什么代数重数≥几何重数、以及不能对角化时怎么办；④历史、与马尔可夫链/振动/PageRank的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 3.2：行列式——面积被放大了几倍</title>
    <link href="https://hsmk.mikufans.date/posts/41a82400.html"/>
    <id>https://hsmk.mikufans.date/posts/41a82400.html</id>
    <published>2026-11-23T20:15:00.000Z</published>
    <updated>2026-11-23T20:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li>3.2 行列式：面积被放大了几倍（本篇）<br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;单位正方形被拉成什么形状&quot;建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——公理化定义、计算公式、性质</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;为什么行列式等于带符号体积&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、雅可比行列式、数值稳定性感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：单位正方形被拉成什么-p-center"><center><p>一、基础：单位正方形被拉成什么</p></center></h1><p>  <strong>（这一部分只需要知道矩阵是&quot;线性变换&quot;。）</strong></p><h2 id="center-p-一个具体的例子-p-center"><center><p>一个具体的例子</p></center></h2><p>  考虑矩阵</p><p>$$A=\begin{pmatrix}2&amp;0\\0&amp;3\end{pmatrix}$$</p><p>  <strong>它把单位正方形 ${(x,y):0\le x,y\le1}$ 变成什么？</strong></p><p>  单位正方形的四个顶点是 $(0,0),(1,0),(1,1),(0,1)$。</p><p>  <strong>变换后</strong>：</p><p>$$(0,0)\mapsto(0,0),\quad(1,0)\mapsto(2,0),\quad(1,1)\mapsto(2,3),\quad(0,1)\mapsto(0,3)$$</p><p>  <strong>得到的是一个 $2\times3$ 的矩形。</strong></p><p>  <strong>面积变化</strong>：原来是 $1$，现在是 $6$——<strong>放大了 6 倍</strong>。</p><p>  <strong>而 $|A|=2\times3-0\times0=6$。</strong></p><p>  <strong>这就是行列式的几何意义：面积放大的倍数。</strong></p><h2 id="center-p-再看一个-压扁-的例子-p-center"><center><p>再看一个&quot;压扁&quot;的例子</p></center></h2><p>  </p><p>$$B=\begin{pmatrix}1&amp;1\\1&amp;1\end{pmatrix}$$</p><p>  <strong>单位正方形变成什么？</strong></p><p>  $(1,0)\mapsto(1,1)$，$(0,1)\mapsto(1,1)$——<strong>两个顶点跑到了同一个点！</strong></p><p>  <strong>整个正方形被压成了一条线段</strong>，面积 = 0。</p><p>  <strong>而 $|B|=1-1=0$。</strong></p><p>  <strong>所以 $|A|=0$ 的几何意义：变换把空间&quot;压扁&quot;了。</strong></p><div class="note info flat"><p><strong>这就是为什么 $|A|=0$ 等价于&quot;不可逆&quot;</strong></p><p>  <strong>把空间压扁的变换，无法还原。</strong></p><p>  就像把一张纸压成一条线——<strong>你知道它原来是一张纸，但不知道原来的样子</strong>。</p><p>  <strong>数学上</strong>：压扁意味着不同的点被映到同一个点，所以映射不是一对一的，所以没有逆。</p><p>  <strong>这也联系到 2.2 节</strong>：$|A|=0$ ⟺ 有非零零空间 ⟺ 不满秩。</p></div><h2 id="center-p-负号是什么意思-p-center"><center><p>负号是什么意思</p></center></h2><p>  </p><p>$$C=\begin{pmatrix}0&amp;1\\1&amp;0\end{pmatrix}$$</p><p>  <strong>单位正方形变成什么？</strong></p><p>  $(1,0)\mapsto(0,1)$，$(0,1)\mapsto(1,0)$——<strong>这是&quot;沿对角线翻转&quot;。</strong></p><p>  <strong>面积还是 1</strong>，所以行列式的<strong>绝对值</strong>是 1。</p><p>  <strong>但 $|C|=0\times0-1\times1=-1$。</strong></p><p>  <strong>负号表示什么？</strong></p><p>  <strong>表示&quot;翻转&quot;</strong>——原来的顺序（逆时针）变成了顺时针。</p><p>  <strong>所以行列式的完整含义</strong>：<strong>带符号的面积放大倍数</strong>——绝对值是倍数，符号表示是否翻转。</p><hr><h1 id="center-p-二、标准：定义、计算与性质-p-center"><center><p>二、标准：定义、计算与性质</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-二阶与三阶-p-center"><center><p>二阶与三阶</p></center></h2><p>  <strong>二阶</strong>：</p><p>$$\begin{vmatrix}a&amp;b\\c&amp;d\end{vmatrix}=ad-bc$$</p><p>  <strong>三阶</strong>（对角线法则，仅三阶适用）：</p><p>$$\begin{vmatrix}a_{11}&amp;a_{12}&amp;a_{13}\\a_{21}&amp;a_{22}&amp;a_{23}\\a_{31}&amp;a_{32}&amp;a_{33}\end{vmatrix}=a_{11}a_{22}a_{33}+a_{12}a_{23}a_{31}+a_{13}a_{21}a_{32}-a_{13}a_{22}a_{31}-a_{11}a_{23}a_{32}-a_{12}a_{21}a_{33}$$</p><p>  <strong>注意</strong>：对角线法则<strong>只对 $2\times2$ 和 $3\times3$ 成立</strong>，$4\times4$ 以上不能用。</p><h2 id="center-p-公理化定义-p-center"><center><p>公理化定义</p></center></h2><blockquote><p><strong>定义</strong>：行列式是满足下列三条性质的唯一函数 $\det:M_n(\mathbb{F})\to\mathbb{F}$：</p><ol><li><strong>对每一行线性</strong>：$\det(\text{把第 }i\text{ 行换成 }\vec r_i+\vec r_i')=\det(\text{用 }\vec r_i)+\det(\text{用 }\vec r_i')$</li><li><strong>换行变号</strong>：交换两行，行列式变号</li><li><strong>单位阵为 1</strong>：$\det(I)=1$</li></ol></blockquote><p>  <strong>这三条推出一整套性质</strong>：</p><table><thead><tr><th>性质</th><th>推导</th></tr></thead><tbody><tr><td>两行相同 ⟹ $\det=0$</td><td>交换后变号，但矩阵没变 ⟹ $d=-d$</td></tr><tr><td>某行全零 ⟹ $\det=0$</td><td>由多线性</td></tr><tr><td>行倍加不改变行列式</td><td>$\det(\vec r_i+k\vec r_j)=\det(\vec r_i)+k\det(\vec r_j)=0+\det(\vec r_i)$</td></tr><tr><td>$\det(AB)=\det A\cdot\det B$</td><td>需另一段证明</td></tr><tr><td>$\det(A^\top)=\det A$</td><td>行性质 = 列性质</td></tr><tr><td>$A$ 可逆 ⟺ $\det A\ne0$</td><td>消元到最后一行</td></tr></tbody></table><h2 id="center-p-展开定理（按行展开）-p-center"><center><p>展开定理（按行展开）</p></center></h2><blockquote><p><strong>定理</strong>：$\det A=\sum_{j=1}^{n}a_{ij}(-1)^{i+j}M_{ij}$，其中 $M_{ij}$ 是删去第 $i$ 行第 $j$ 列的行列式。</p></blockquote><p>  <strong>$(-1)^{i+j}$ 叫代数余子式符号</strong>，按棋盘格排列：</p><p>$$\begin{pmatrix}+&amp;-&amp;+&amp;-\\-&amp;+&amp;-&amp;+\\+&amp;-&amp;+&amp;-\\-&amp;+&amp;-&amp;+\end{pmatrix}$$</p><p>  <strong>实用建议</strong>：<strong>先消元再展开</strong>——选一行（列）中零最多的展开。</p><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：用对角线法则算 $4\times4$</strong></p><p>  对角线法则<strong>只对 $n\le3$ 成立</strong>。$4\times4$ 必须用展开定理或消元。</p><p><strong>错误二：以为 $\det(A+B)=\det A+\det B$</strong></p><p>  <strong>完全不同！</strong> 行列式<strong>对每一行</strong>线性，不是对整个矩阵。</p><p><strong>错误三：忽略符号</strong></p><p>  代数余子式的符号是 $(-1)^{i+j}$，<strong>忘了会让结果差一个负号</strong>。</p><p><strong>错误四：以为行变换不改变行列式</strong></p><p>  <strong>只有&quot;行倍加&quot;不改变</strong>。交换两行变号，某行乘 $k$ 则行列式乘 $k$。</p><p><strong>错误五：用 $\det A$ 判断非方阵</strong></p><p>  行列式只对<strong>方阵</strong>有定义。</p><p><strong>错误六：按列展开时忘了转置</strong></p><p>  按列展开的公式<strong>与按行相同</strong>（因为 $\det(A^\top)=\det A$），但<strong>余子式要删对应的行和列</strong>。</p></div><hr><h1 id="center-p-三、深入：行列式就是带符号体积-p-center"><center><p>三、深入：行列式就是带符号体积</p></center></h1><p>  <strong>（这一部分是完整推导。）</strong></p><h2 id="center-p-多线性-叉积的刻画-p-center"><center><p>多线性 + 叉积的刻画</p></center></h2><p>  <strong>先把&quot;带符号体积&quot;形式化</strong>：</p><p>  设 $\vec v_1,\dots,\vec v_n\in\mathbb{R}^n$。定义 $\operatorname{vol}(\vec v_1,\dots,\vec v_n)$ 为它们张成的<strong>有向平行体</strong>的体积，满足：</p><ol><li>对每个 $\vec v_i$ 线性</li><li>交换两个向量变号</li><li>单位立方体体积为 1</li></ol><p>  <strong>断言</strong>：这样的函数<strong>唯一</strong>，它就是 $\det$（把 $\vec v_i$ 作为行/列）。</p><p>  <strong>唯一性</strong>证明（归纳）：按第一条性质展开第一行，得到递推公式——<strong>正是展开定理</strong>。</p><p>  <strong>所以行列式的定义与几何定义是同一回事。</strong></p><h2 id="center-p-为什么-det-AB-det-A-det-B-p-center"><center><p>为什么 $\det(AB)=\det A\det B$</p></center></h2><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  <strong>方法一（体积直觉）</strong>：</p><p>  $B$ 把单位立方体拉伸 $\det B$ 倍，变成平行体 $P$。</p><p>  $A$ 再把 $P$ 拉伸 $\det A$ 倍。</p><p>  <strong>连续做两次 ⟹ 总共拉伸 $\det A\cdot\det B$ 倍</strong> ✓</p><p>  而 $AB$ 对应的正是&quot;先 $B$ 后 $A&quot;。所以 $\det(AB)=\det A\det B$ ✓</p><p>  <strong>方法二（消元）</strong>：若 $A$ 可逆，$A$ 是一串初等矩阵的积，逐个验证 ✓</p><p>  若 $A$ 不可逆，$AB$ 也不可逆，两边都是 0 ✓ $\blacksquare$</p>              </div>            </details><h2 id="center-p-行列式与秩的关系-p-center"><center><p>行列式与秩的关系</p></center></h2><p>  <strong>对 $m\times n$ 矩阵</strong>，定义 $r$ 阶子式：删去 $m-r$ 行和 $n-r$ 列得到的 $r\times r$ 行列式。</p><blockquote><p><strong>定理</strong>：$\operatorname{rank}(A)$ = <strong>最大的 $r$，使存在 $r$ 阶非零子式</strong>。</p></blockquote><p>  <strong>所以秩是&quot;能用行列式探测到的最大维度&quot;。</strong></p><p>  <strong>但数值上</strong>：这个定义<strong>非常不稳定</strong>——因为小的舍入误差会把&quot;零子式&quot;变成&quot;非零&quot;，把秩判大。</p><p>  <strong>所以数值上用 SVD</strong>（2.2 节）。</p><h2 id="center-p-伴随矩阵与逆矩阵-p-center"><center><p>伴随矩阵与逆矩阵</p></center></h2><p>  <strong>定义</strong>：$A^*$ 的第 $(i,j)$ 元是 $(-1)^{i+j}M_{ji}$（<strong>注意转置</strong>）。</p><p>  <strong>核心公式</strong>：</p><p>$$A\operatorname{adj}(A)=\operatorname{adj}(A)A=|A|I$$</p><p>  <strong>（其中 $\operatorname{adj}(A)$ 就是伴随矩阵。）</strong> 于是</p><p>$$A^{-1}=\frac{1}{|A|}\operatorname{adj}(A)$$</p><p>  <strong>这个公式在 $n\le3$ 时实用</strong>（手算逆矩阵），$n\ge4$ 时<strong>计算量太大</strong>（$O(n!)$），要用高斯消元。</p><h2 id="center-p-克拉默法则及其局限-p-center"><center><p>克拉默法则及其局限</p></center></h2><p>  <strong>若 $|A|\ne0$</strong>，则 $A\vec x=\vec b$ 有唯一解：</p><p>$$x_i=\frac{|A_i|}{|A|}$$</p><p>  其中 $A_i$ 是把 $A$ 的第 $i$ 列换成 $\vec b$。</p><p>  <strong>理论价值</strong>：给出解的显式公式。</p><p>  <strong>实用价值</strong>：<strong>几乎没有</strong>——计算 $n+1$ 个 $n$ 阶行列式是 $O(n!)$。<strong>实际用高斯消元</strong>（$O(n^3)$）。</p><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：中国比欧洲早一千八百年-p-center"><center><p>历史：中国比欧洲早一千八百年</p></center></h2><p>  <strong>行列式最早出现在中国，比西方早约一千八百年。</strong></p><table><thead><tr><th>时间</th><th>来源</th><th>内容</th></tr></thead><tbody><tr><td><strong>约公元前 1 世纪</strong></td><td><strong>《九章算术》第八章</strong></td><td>用&quot;方程术&quot;解线性方程组，隐含行列式思想</td></tr><tr><td><strong>约 3 世纪</strong></td><td><strong>刘徽注</strong></td><td>给出&quot;遍乘直除&quot;算法</td></tr><tr><td><strong>约 12 世纪</strong></td><td><strong>秦九韶</strong></td><td>更系统的算法</td></tr><tr><td><strong>1683</strong></td><td><strong>关孝和（日本）</strong></td><td>明确写出行列式展开</td></tr><tr><td>1693</td><td>莱布尼茨</td><td>独立发现</td></tr><tr><td>1750</td><td>克莱姆</td><td>克拉默法则</td></tr><tr><td>1841</td><td>柯西</td><td>行列式的现代记号与乘法定理</td></tr></tbody></table><p>  <strong>关孝和 1683 年的成果</strong>比莱布尼茨早十年——<strong>但两人都不知道对方</strong>。</p><p>  <strong>莱布尼茨的笔记里</strong>（1693 年，未发表）已经有行列式的思想，但他没称它为&quot;行列式&quot;。</p><div class="note info flat"><p><strong>&quot;行列式&quot;这个名字</strong></p><p>  英文 <strong>determinant</strong> 是高斯 1801 年起的名字，意思是&quot;<strong>决定</strong>线性方程组解的性质的那个量&quot;。</p><p>  中文&quot;行列式&quot;是<strong>直译</strong>——把&quot;行&quot;和&quot;列&quot;排成阵。</p><p>  <strong>小知识</strong>：三阶行列式的&quot;<strong>对角线法则</strong>&quot;在中文教材里常叫&quot;沙路法则&quot;（Sarrus rule），<br>是法国人 Sarrus 在 1833 年提出的。</p></div><h2 id="center-p-联系：雅可比行列式与积分换元-p-center"><center><p>联系：雅可比行列式与积分换元</p></center></h2><p>  <strong>数学分析 3.5 节</strong>讲重积分换元时用到：</p><p>$$\mathrm{d}x,\mathrm{d}y=|J|,\mathrm{d}u,\mathrm{d}v$$</p><p>  <strong>$J$ 是雅可比行列式</strong>——<strong>它就是&quot;局部面积放大倍数&quot;。</strong></p><p>  <strong>所以行列式的几何意义不是&quot;从代数推出来的结论&quot;，而是&quot;换元公式的来源&quot;</strong>。</p><p>  <strong>一个统一的理解</strong>：</p><table><thead><tr><th>场合</th><th>行列式的作用</th></tr></thead><tbody><tr><td>线性变换</td><td>体积放大倍数</td></tr><tr><td>重积分换元</td><td>局部体积放大倍数</td></tr><tr><td>概率密度变换</td><td>密度函数的缩放</td></tr><tr><td>流形上的积分</td><td>体积形式</td></tr></tbody></table><p>  <strong>所以&quot;行列式 = 体积&quot;是一个贯穿多学科的通用事实。</strong></p><h2 id="center-p-应用：数值稳定性的问题-p-center"><center><p>应用：数值稳定性的问题</p></center></h2><p>  <strong>理论上</strong>，$|A|=0$ 与 $|A|=10^{-20}$ 是两回事。</p><p>  <strong>数值上</strong>，它们<strong>几乎一样</strong>——都无法可靠求逆。</p><p>  <strong>更糟的是</strong>：行列式对<strong>缩放</strong>极度敏感：</p><p>$$\det(cA)=c^n\det A$$</p><p>  <strong>所以</strong>把 $A$ 乘以 $2$，$10$ 阶行列式就变成 $1024$ 倍——<strong>完全淹没原本的&quot;大小&quot;信息</strong>。</p><p>  <strong>实用建议</strong>：</p><ul><li><strong>不要用 $|A|$ 判断矩阵是否&quot;接近奇异&quot;</strong>——要用<strong>条件数</strong> $\kappa(A)=\lVert A\rVert\cdot\lVert A^{-1}\rVert$</li><li>或者用<strong>最小奇异值</strong> $\sigma_{\min}$</li></ul><p>  <strong>这就是为什么</strong>：LAPACK 里没有 <code>det()</code> 函数——<strong>因为它的数值意义不可靠</strong>。</p><p>  （部分语言提供 <code>det</code> 只是为了便利，<strong>内部用 LU 分解的迹</strong>计算，而非展开。）</p><h2 id="center-p-应用：体积在几何里的作用-p-center"><center><p>应用：体积在几何里的作用</p></center></h2><p>  <strong>四面体体积</strong>：顶点 $\vec a,\vec b,\vec c,\vec d$，</p><p>$$V=\frac16\left|\det\begin{pmatrix}b_1-a_1&amp;c_1-a_1&amp;d_1-a_1\\b_2-a_2&amp;c_2-a_2&amp;d_2-a_2\\b_3-a_3&amp;c_3-a_3&amp;d_3-a_3\end{pmatrix}\right|$$</p><p>  <strong>三角形面积</strong>：$\frac12\lVert(\vec b-\vec a)\times(\vec c-\vec a)\rVert$——<strong>叉积其实就是&quot;两行行列式&quot;</strong>。</p><p>  <strong>联系到本站</strong>：「微分方程数值解」系列有限元的<strong>单元体积计算</strong>就用这个公式。</p><p>  <strong>而等参变换的雅可比行列式</strong>（3.5 节）就是&quot;实际单元与参考单元的体积比&quot;。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第二章行列式。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 5 章：行列式的几何意义。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>几何意义</strong></td><td>带符号的体积放大倍数</td></tr><tr><td>**$</td><td>A</td></tr><tr><td><strong>符号</strong></td><td>表示是否翻转定向</td></tr><tr><td><strong>公理化</strong></td><td>多线性 + 换行变号 + $\det I=1$ 唯一确定</td></tr><tr><td><strong>展开定理</strong></td><td>$\sum a_{ij}(-1)^{i+j}M_{ij}$，<strong>先消元再展开</strong></td></tr><tr><td><strong>乘性</strong></td><td>$\det(AB)=\det A\det B$</td></tr><tr><td><strong>秩</strong></td><td>最大非零子式的阶 = 秩</td></tr><tr><td><strong>数值</strong></td><td>不要用 $\det$ 判断奇异，用条件数或最小奇异值</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>有了行列式，就能回答第 5 章的核心问题：</p><blockquote><p><strong>什么时候 $A$ 能对角化？</strong></p></blockquote><p>  <strong>关键工具是&quot;特征多项式&quot;</strong>：$\det(A-\lambda I)=0$。</p><p>  <strong>它的根就是特征值</strong>——而特征值的物理意义（振动频率、能量能级、稳定性）是<strong>整个应用数学的核心</strong>。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第二章。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 10 章（Axler 把行列式放最后，先讲迹与特征值）。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 5 章。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;单位正方形被拉成什么形状&quot;理解行列式；②行列式的多线性公理化定义、计算公式与性质；③为什么行列式等于&quot;带符号体积&quot;、以及展开定理的证明；④历史（中国比欧洲早一千八百年）、与雅可比行列式/数值稳定性的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 3.1：四个基本子空间——一张图看懂线性代数</title>
    <link href="https://hsmk.mikufans.date/posts/2d5b1853.html"/>
    <id>https://hsmk.mikufans.date/posts/2d5b1853.html</id>
    <published>2026-11-23T16:15:00.000Z</published>
    <updated>2026-11-23T16:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li>3.1 四个基本子空间：一张图看懂线性代数（本篇）</li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;影子、遮挡、照不到的地方&quot;建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——四个子空间的定义、维数与关系</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;正交补&quot;与&quot;维数定理&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对 Strang 的图、最小二乘、压缩感知感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：影子与遮挡-p-center"><center><p>一、基础：影子与遮挡</p></center></h1><p>  <strong>（这一部分只需要 2.2 节的&quot;秩&quot;与&quot;核&quot;概念。）</strong></p><h2 id="center-p-用手电筒照一个物体-p-center"><center><p>用手电筒照一个物体</p></center></h2><p>  想象你拿着一只手电筒，照着空间里的一个物体，在墙上投出<strong>影子</strong>。</p><p>  <strong>这里有四样东西</strong>：</p><table><thead><tr><th>场景</th><th>数学对应</th></tr></thead><tbody><tr><td>物体所在的<strong>空间</strong></td><td>定义域 $\mathbb{R}^n$</td></tr><tr><td>光<strong>照到的区域</strong></td><td>行空间 $C(A^\top)$</td></tr><tr><td>光<strong>照不到的地方</strong>（被物体挡住）</td><td>零空间 $N(A)$</td></tr><tr><td>墙上的<strong>影子</strong></td><td>列空间 $C(A)$</td></tr><tr><td>墙上<strong>影子之外的区域</strong></td><td>左零空间 $N(A^\top)$</td></tr></tbody></table><p>  <strong>关键</strong>：这四个空间<strong>两两配对</strong>，构成两个&quot;互补&quot;的分割：</p><p>$$\mathbb{R}^n=C(A^\top)+N(A)\qquad(\text{照到的部分}+\text{照不到的部分})$$</p><p>$$\mathbb{R}^m=C(A)+N(A^\top)\qquad(\text{影子}+\text{影子之外的区域})$$</p><p>  <strong>这两个都是&quot;直和&quot;</strong>：两部分的交集只有原点，且每个向量都能唯一地拆成两部分（第三节证明）。</p><p>  <strong>而两边的维数恰好对应</strong>：</p><p>$$\dim C(A^\top)=\dim C(A)=r,\qquad \dim N(A)=n-r,\qquad \dim N(A^\top)=m-r$$</p><h2 id="center-p-为什么要看这四个-p-center"><center><p>为什么要看这四个</p></center></h2><p>  <strong>因为线性方程组的全部问题，都能用这四个空间回答</strong>：</p><table><thead><tr><th>问题</th><th>用哪个空间</th></tr></thead><tbody><tr><td>$A\vec x=\vec b$ 有解吗？</td><td>$\vec b\in C(A)$ 吗？</td></tr><tr><td>有多少解？</td><td>$\dim N(A)$ 决定</td></tr><tr><td>最小二乘解是什么？</td><td>把 $\vec b$ 投影到 $C(A)$ 上</td></tr><tr><td>为什么有&quot;残差&quot;？</td><td>残差在 $N(A^\top)$ 里</td></tr></tbody></table><p>  <strong>所以这四个空间是&quot;线性代数的全局地图&quot;。</strong></p><div class="note info flat"><p><strong>这张图为什么重要</strong></p><p>  学线性代数最痛苦的是：<strong>概念太多，不知道怎么串</strong>。</p><p>  <strong>这四个子空间把它们全串起来了</strong>：</p><ul><li>秩 = 行空间维数 = 列空间维数</li><li>零度 = 零空间维数</li><li>秩-零度定理 = &quot;照到 + 照不到 = 全部&quot;</li><li>无解的条件 = $\vec b$ 落在&quot;影子外&quot;</li></ul><p>  <strong>所以记住这张图，比记住十个定义有用。</strong></p></div><hr><h1 id="center-p-二、标准：四个子空间-p-center"><center><p>二、标准：四个子空间</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-定义-p-center"><center><p>定义</p></center></h2><p>  设 $A\in\mathbb{R}^{m\times n}$，$\operatorname{rank}(A)=r$。</p><table><thead><tr><th>子空间</th><th>定义</th><th>属于</th><th>维数</th></tr></thead><tbody><tr><td><strong>行空间</strong> $C(A^\top)$</td><td>$A$ 的行张成的空间</td><td>$\mathbb{R}^n$</td><td>$r$</td></tr><tr><td><strong>零空间</strong> $N(A)$</td><td>${x:Ax=0}$</td><td>$\mathbb{R}^n$</td><td>$n-r$</td></tr><tr><td><strong>列空间</strong> $C(A)$</td><td>$A$ 的列张成的空间</td><td>$\mathbb{R}^m$</td><td>$r$</td></tr><tr><td><strong>左零空间</strong> $N(A^\top)$</td><td>${y:A^\top y=0}$</td><td>$\mathbb{R}^m$</td><td>$m-r$</td></tr></tbody></table><p>  <strong>记忆方法</strong>：$A$ 把 $\mathbb{R}^n$ 映到 $\mathbb{R}^m$。</p><ul><li>在 $\mathbb{R}^n$ 里：<strong>行空间</strong>（能&quot;动&quot;的）+ <strong>零空间</strong>（被压成 0 的）</li><li>在 $\mathbb{R}^m$ 里：<strong>列空间</strong>（能到达的）+ <strong>左零空间</strong>（到不了的）</li></ul><h2 id="center-p-两个维数定理-p-center"><center><p>两个维数定理</p></center></h2><blockquote><p><strong>定理 1</strong>（秩-零度，定义域侧）：$\dim C(A^\top)+\dim N(A)=n$</p><p><strong>定理 2</strong>（陪域侧）：$\dim C(A)+\dim N(A^\top)=m$</p></blockquote><p>  <strong>定理 1 就是 2.2 节的内容。</strong></p><p>  <strong>定理 2</strong> 由&quot;行秩=列秩&quot;与对 $A^\top$ 用定理 1 得出。</p><h2 id="center-p-正交补关系-p-center"><center><p>正交补关系</p></center></h2><blockquote><p><strong>定理 3</strong>：$N(A)=C(A^\top)^\perp$，$N(A^\top)=C(A)^\perp$</p></blockquote><p>  <strong>逐条验证第一式</strong>：$x\in N(A)$ ⟺ $Ax=0$ ⟺ $A$ 的每一行与 $x$ 内积为 0 ⟺ $x$ 与所有行正交 ⟺ $x\perp C(A^\top)$ ✓</p><p>  <strong>这解释了&quot;维数相加等于 $n$&quot;</strong>：</p><p>$$\dim C(A^\top)+\dim N(A)=\dim C(A^\top)+\dim C(A^\top)^\perp=n$$</p><p>  <strong>（正交补的维数公式 $\dim U+\dim U^\perp=n$ 需要一个引理，见第三节。）</strong></p><h2 id="center-p-解的结构（用四个空间说）-p-center"><center><p>解的结构（用四个空间说）</p></center></h2><p>  <strong>对 $A\vec x=\vec b$</strong>：</p><ol><li><strong>有解 ⟺ $\vec b\in C(A)$</strong> ⟺ $\vec b\perp N(A^\top)$</li><li>若有解，解集是 $\vec x_0+N(A)$（<strong>仿射子空间</strong>）</li><li><strong>最小范数解</strong>：取 $\vec x_0\in C(A^\top)$（与零空间正交的那个）</li></ol><p>  <strong>第 3 条为什么重要</strong>：它给出了<strong>唯一</strong>的解（否则解有无穷多个）。</p><p>  <strong>这个方法叫&quot;伪逆&quot;</strong>——$\vec x=A^+\vec b$，其中 $A^+$ 把 $\vec b$ 先投影到 $C(A)$，再在行空间里找解。</p><div class="note info flat"><p><strong>为什么最小范数解在行空间里</strong></p><p>  若 $\vec x=\vec x_{行}+\vec x_{零}$（分解到行空间与零空间），则</p><p>$$A\vec x=A\vec x_{行}+A\vec x_{零}=A\vec x_{行}$$</p><p>  <strong>所以零空间部分对解没有贡献，只是&quot;多绕路&quot;。</strong></p><p>  <strong>去掉它，范数变小，解不变</strong>——所以最小范数解必然在行空间里。</p><p>  <strong>而 $\lVert\vec x\rVert^2=\lVert\vec x_{行}\rVert^2+\lVert\vec x_{零}\rVert^2$</strong>（正交分解），所以取 $\vec x_{零}=0$ 就最小。</p></div><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：把行空间与列空间混为一谈</strong></p><p>  行空间在 $\mathbb{R}^n$，列空间在 $\mathbb{R}^m$。<strong>维数相等，但空间不同。</strong></p><p><strong>错误二：以为 $N(A)=N(A^\top)$</strong></p><p>  前者在 $\mathbb{R}^n$，后者在 $\mathbb{R}^m$。<strong>连维度都可能不同</strong>（$n-r$ vs $m-r$）。</p><p><strong>错误三：忘了零空间是 ${x:Ax=0}$ 不是 ${x:Ax=b}$</strong></p><p>  $Ax=b$ 的解集<strong>不是子空间</strong>（不含原点）。</p><p><strong>错误四：以为&quot;正交补&quot;等于&quot;补集&quot;</strong></p><p>  正交补是<strong>子空间</strong>，补集不是。</p><p><strong>错误五：用&quot;行最简形的行&quot;当行空间</strong></p><p>  行变换保持行空间，所以可以。但<strong>不能</strong>用行最简形的<strong>列</strong>当列空间——列空间会变。</p><p><strong>错误六：以为 $A$ 的秩等于&quot;非零行数&quot;就能直接读出</strong></p><p>  需要先化成<strong>行阶梯形</strong>。</p></div><hr><h1 id="center-p-三、深入：正交补与维数定理-p-center"><center><p>三、深入：正交补与维数定理</p></center></h1><p>  <strong>（这一部分是严格证明。）</strong></p><h2 id="center-p-正交补的维数定理-p-center"><center><p>正交补的维数定理</p></center></h2><blockquote><p><strong>引理</strong>：$U\subseteq\mathbb{R}^n$ 是子空间，则 $\dim U+\dim U^\perp=n$。</p></blockquote><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  设 $\dim U=k$，取 $U$ 的基 ${\vec u_1,\dots,\vec u_k}$，<strong>扩充</strong>成 $\mathbb{R}^n$ 的基</p><p>$${\vec u_1,\dots,\vec u_k,\vec w_1,\dots,\vec w_{n-k}}$$</p><p>  <strong>断言</strong>：${\vec w_1,\dots,\vec w_{n-k}}$ 是 $U^\perp$ 的基。</p><p><strong>（1）它们在 $U^\perp$ 里？</strong></p><p>  <strong>不一定！</strong> 这只是&quot;补空间&quot;，不一定是&quot;正交补&quot;。</p><p>  <strong>改正做法</strong>：用 <strong>Gram-Schmidt 正交化</strong>，从任意基出发构造<strong>正交基</strong>。</p><p>  先对 ${\vec u_1,\dots,\vec u_k}$ 做 Gram-Schmidt，得到 $U$ 的正交基（记作 $\tilde{u}_1,\dots,\tilde{u}_k$）。</p><p>  再把它们扩充成 $\mathbb{R}^n$ 的基，然后对整体做 Gram-Schmidt（前 $k$ 个不变），得到</p><p>  （前面的 $k$ 个是 $U$ 的正交基，后面 $n-k$ 个与它们全部正交。）</p><p>  <strong>（这里把向量写成 $u_i$、$w_j$ 的简写形式。）</strong></p><p>  <strong>正交基</strong>，其中后 $n-k$ 个与所有 $\tilde{\vec u}$ 正交 ✓ 所以在 $U^\perp$ 里。</p><p><strong>（2）它们张成 $U^\perp$？</strong></p><p>  任取 $\vec v\in U^\perp$，写成基的线性组合：$\vec v=\sum a_i\tilde{\vec u}_i+\sum b_j\tilde{\vec w}_j$。</p><p>  因 $\vec v\perp U$，对每个 $\tilde{\vec u}_i$ 取内积得 $a_i=\langle\vec v,\tilde{\vec u}_i\rangle=0$。</p><p>  所以 $\vec v=\sum b_j\tilde{\vec w}_j$ ✓</p><p><strong>（3）线性无关</strong>：正交组线性无关（在 $U$ 那一节已经知道）。</p><p>  所以 $\dim U^\perp=n-k$ ✓ $\blacksquare$</p><p>  <strong>注意</strong>：这个证明<strong>用到了 Gram-Schmidt</strong>，所以&quot;正交补&quot;这个概念本质上依赖内积（第 6 章）。</p>              </div>            </details><h2 id="center-p-四个子空间的正交关系图-p-center"><center><p>四个子空间的正交关系图</p></center></h2><p>  <strong>把上面的一切画成图</strong>：</p><figure class="highlight scss"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">      R^n                          <span class="selector-tag">A</span>              R^m</span><br><span class="line">┌─────────────────┐                    ┌─────────────────┐</span><br><span class="line">│  行空间 dim r    │ ──── <span class="selector-tag">A</span> ────→      │ 列空间 dim r     │</span><br><span class="line">│  <span class="built_in">C</span>(Aᵀ)          │    (<span class="number">1</span>-<span class="number">1</span> onto)      │  <span class="built_in">C</span>(A)           │</span><br><span class="line">├─────────────────┤                    ├─────────────────┤</span><br><span class="line">│  零空间 n-r      │ ──── <span class="selector-tag">A</span> ────→      │ 左零空间 m-r     │</span><br><span class="line">│  <span class="built_in">N</span>(A)           │    (→ <span class="number">0</span>)           │  <span class="built_in">N</span>(Aᵀ)          │</span><br><span class="line">└─────────────────┘                    └─────────────────┘</span><br><span class="line">       ↑ 正交 ↑                            ↑ 正交 ↑</span><br></pre></td></tr></table></figure><p>  <strong>三个关键读数</strong>：</p><ol><li><strong>$A$ 把行空间&quot;一对一&quot;地映到列空间</strong>（两者维数都是 $r$）</li><li><strong>$A$ 把零空间整个映到 ${0}$</strong></li><li><strong>两条&quot;正交分割&quot;</strong>：$\mathbb{R}^n$ 分成行空间与零空间；$\mathbb{R}^m$ 分成列空间与左零空间</li></ol><p>  <strong>读法</strong>：<strong>左边是&quot;输入&quot;，右边是&quot;输出&quot;，箭头是变换。</strong></p><p>  <strong>为什么行空间的像是列空间</strong>：行空间的向量 $\vec v=\sum c_i(\text{第 }i\text{ 行})$，$A\vec v=\sum c_iA(\text{第 }i\text{ 行})$——而 $A(\text{第 }i\text{ 行})$ 是列的组合……实际上更直接：$A\vec v$ 落在列空间，因为 $A\vec v$ 是列的线性组合。</p><p>  <strong>为什么是&quot;一对一&quot;</strong>：若 $A\vec u=A\vec v$ 且 $\vec u,\vec v$ 都在行空间，则 $\vec u-\vec v\in N(A)$；但 $\vec u-\vec v$ 也在行空间，<strong>行空间与零空间正交所以只交于原点</strong>，故 $\vec u=\vec v$ ✓</p><h2 id="center-p-这张图的用处：解方程组-p-center"><center><p>这张图的用处：解方程组</p></center></h2><p>  <strong>用图重新解释 $A\vec x=\vec b$</strong>：</p><ol><li>$\vec b$ 在不在右边上部的 $C(A)$ 里？<ul><li><strong>不在</strong> → 无解</li><li><strong>在</strong> → 有解</li></ul></li><li>解 $\vec x$ = 一个&quot;行空间里的解&quot; + $N(A)$ 里任意向量</li><li><strong>最小范数解</strong> = 取&quot;行空间里的那个唯一解&quot;</li></ol><p>  <strong>为什么行空间里的解唯一</strong>：因为 $A$ 在行空间上是<strong>一对一</strong>的（上面的证明）。</p><p>  <strong>所以这个图直接回答了 1.1 节的三个问题（无解/唯一/无穷）。</strong></p><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：Strang-的这张图-p-center"><center><p>历史：Strang 的这张图</p></center></h2><p>  <strong>这张&quot;四个基本子空间&quot;的图，是吉尔伯特·斯特朗（Gilbert Strang）在 MIT 的教学里推广开的。</strong></p><p>  他在《线性代数导论》里称之为 <strong>&quot;the big picture&quot;</strong>——<strong>线性代数的全景图</strong>。</p><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1950s</td><td>教材里的&quot;秩定理&quot;</td><td>分散地讲</td></tr><tr><td><strong>1980s</strong></td><td><strong>Strang</strong></td><td>把四个子空间画成一张图</td></tr><tr><td>2000s</td><td>在线课程（OCW）</td><td>全球传播</td></tr></tbody></table><p>  <strong>为什么这张图这么受欢迎</strong>：因为它把<strong>看起来无关的十几个概念</strong>一次性串起来。</p><p>  <strong>Strang 的教学理念</strong>：&quot;先看全局，再填细节&quot;——和绝大多数教材相反。</p><div class="note info flat"><p><strong>Strang 的另一句名言</strong></p><p>  <strong>&quot;矩阵的秩告诉你这个矩阵&quot;能干什么&quot;。&quot;</strong></p><p>  秩 $r$ 意味着：<strong>能从 $n$ 维空间里&quot;可靠地区分&quot;出 $r$ 个独立方向。</strong></p><p>  <strong>所以</strong>：</p><ul><li>秩小 = 信息被压缩了 = 这个矩阵&quot;看不全&quot;</li><li>秩满 = 没有信息丢失</li></ul><p>  <strong>数值上</strong>这就是&quot;矩阵的秩是它的&quot;有效信息量&quot;&quot;的说法（2.2 节的低秩近似）。</p></div><h2 id="center-p-联系：最小二乘与投影-p-center"><center><p>联系：最小二乘与投影</p></center></h2><p>  <strong>超定方程</strong> $A\vec x=\vec b$（$m&gt;n$）通常无解——$\vec b$ 不在 $C(A)$ 里。</p><p>  <strong>最小二乘</strong>：找 $C(A)$ 里最接近 $\vec b$ 的点。</p><p>  <strong>关键观察</strong>：那个点是<strong>正交投影</strong>（$\vec b$ 到 $C(A)$ 的垂足）。</p><p>  <strong>所以</strong>：</p><p>$$\vec b-A\vec x_{\text{LS}}\perp C(A)\qquad\Longrightarrow\qquad \vec b-A\vec x_{\text{LS}}\in N(A^\top)$$</p><p>  <strong>这就是&quot;残差在左零空间里&quot;</strong>。</p><p>  <strong>代入</strong>：</p><p>$$A^\top(\vec b-A\vec x_{\text{LS}})=0\qquad\Longrightarrow\qquad A^\top A\vec x_{\text{LS}}=A^\top\vec b$$</p><p>  <strong>这就是正规方程（normal equation）。</strong></p><p>  <strong>用四个子空间说</strong>：</p><ul><li>残差 $\in N(A^\top)$（左零空间）</li><li>解的&quot;行空间部分&quot; = 最小二乘解</li></ul><p>  <strong>所以整张图给了最小二乘一个漂亮的几何解释。</strong></p><h2 id="center-p-应用：压缩感知与稀疏恢复-p-center"><center><p>应用：压缩感知与稀疏恢复</p></center></h2><p>  <strong>压缩感知（compressed sensing）</strong> 是一个很反直觉的结果。</p><p>  <strong>问题</strong>：解 $A\vec x=\vec b$，其中 $m\ll n$（<strong>欠定</strong>，方程比未知数少）。</p><p>  <strong>按传统理论</strong>：解有无穷多个（$\dim N(A)=n-r\ge n-m$ 很大）。</p><p>  <strong>但</strong>：若 $\vec x$ 是<strong>稀疏</strong>的（大部分分量为 0），且 $A$ 满足某些条件（RIP），则<strong>可以唯一恢复</strong>！</p><p>  <strong>核心想法</strong>：在所有解里选<strong>稀疏的那个</strong>——<strong>而不是&quot;范数最小的&quot;</strong>（范数最小给出的是行空间投影，通常不稀疏）。</p><p>  <strong>L1 范数</strong>（$\sum|x_i|$）是 L0 范数的凸松弛——这是压缩感知的关键技巧。</p><p>  <strong>与本节的关系</strong>：</p><ul><li>最小范数解在<strong>行空间</strong>里 → 不稀疏</li><li>压缩感知的解<strong>不在行空间里</strong> → 稀疏</li></ul><p>  <strong>所以&quot;解的结构&quot;取决于你选的准则</strong>——这超越了四个子空间的框架，但<strong>框架告诉了你&quot;默认的解&quot;是什么</strong>。</p><h2 id="center-p-应用：控制论里的可达与可观-p-center"><center><p>应用：控制论里的可达与可观</p></center></h2><table><thead><tr><th>控制论概念</th><th>四个子空间</th></tr></thead><tbody><tr><td><strong>可达性</strong>（能控性）</td><td>列空间 $C(A)$ 覆盖全部吗？</td></tr><tr><td><strong>可观性</strong></td><td>零空间 $N(A)$ 只有 ${0}$ 吗？</td></tr></tbody></table><p>  <strong>具体</strong>：线性系统 $\dot{\vec x}=A\vec x+B\vec u$：</p><ul><li><strong>能控</strong> ⟺ $\operatorname{rank}[B,AB,A^2B,\dots]=n$</li><li><strong>能观</strong> ⟺ $\operatorname{rank}[C;CA;CA^2;\dots]=n$</li></ul><p>  <strong>注意</strong>：这里的&quot;秩&quot;是对 <strong>可控性矩阵</strong> 算的，不是 $A$ 本身。</p><p>  <strong>这说明</strong>：四个子空间的思想可以推广到<strong>分块矩阵</strong>上。</p><p>  <strong>与本站的联系</strong>：「微分方程数值解」系列的稳定性分析，也依赖 $A$ 的特征值（第 5 章）。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 3 章，但注意 Axler 刻意弱化行列式与&quot;四个子空间&quot;。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 3.5 节：这张图的正式出处。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>四个子空间</strong></td><td>行空间、零空间（$\mathbb{R}^n$）；列空间、左零空间（$\mathbb{R}^m$）</td></tr><tr><td><strong>维数</strong></td><td>$r$、$n-r$；$r$、$m-r$</td></tr><tr><td><strong>正交补</strong></td><td>$N(A)=C(A^\top)^\perp$，$N(A^\top)=C(A)^\perp$</td></tr><tr><td><strong>两个分割</strong></td><td>$\mathbb{R}^n$ 与 $\mathbb{R}^m$ 各分成&quot;投影 + 正交补&quot;</td></tr><tr><td><strong>图像</strong></td><td>$A$ 把行空间一对一映到列空间，把零空间压到 0</td></tr><tr><td><strong>解方程组</strong></td><td>有解 ⟺ $\vec b\in C(A)$；最小范数解在行空间里</td></tr><tr><td><strong>最小二乘</strong></td><td>残差在 $N(A^\top)$ ⟹ 正规方程 $A^\top A\vec x=A^\top\vec b$</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>本节大量引用&quot;内积&quot;&quot;正交&quot;，但<strong>没有定义它们</strong>。</p><p>  <strong>下一节（第 4 章：行列式）</strong> 会先换个话题——讲&quot;度量的另一种方式&quot;：</p><blockquote><p><strong>行列式 = 面积 / 体积的放大倍数。</strong></p></blockquote><p>  <strong>它和秩的关系</strong>：$|A|\ne0$ ⟺ 满秩 ⟺ 不压缩体积。</p><p>  <strong>而如果 $A$ 降秩</strong>，体积就塌成 0——这就是 $|A|=0$ 的几何意义。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第四章矩阵的秩。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 3 章。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 3.5 节。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;影子与遮挡&quot;理解四个子空间；②行空间、列空间、零空间、左零空间及其维数关系；③正交补与维数定理的完整证明；④历史、Strang 的四个子空间图、与最小二乘/压缩感知的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 2.2：秩-零度定理——被压扁的部分和留下的部分</title>
    <link href="https://hsmk.mikufans.date/posts/b30d66ae.html"/>
    <id>https://hsmk.mikufans.date/posts/b30d66ae.html</id>
    <published>2026-11-23T12:15:00.000Z</published>
    <updated>2026-11-23T12:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li>2.2 秩-零度定理：被压扁的部分和留下的部分（本篇）<br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;投影把空间压扁&quot;的直觉理解秩-零度</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——秩-零度定理、行秩=列秩</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;定理为什么成立&quot;的读者（三种证明）</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、条件数、最小二乘感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：投影压扁了多少-p-center"><center><p>一、基础：投影压扁了多少</p></center></h1><p>  <strong>（这一部分只需要 2.1 节的&quot;线性变换&quot;概念。）</strong></p><h2 id="center-p-一个投影的例子-p-center"><center><p>一个投影的例子</p></center></h2><p>  考虑把平面投影到 $x$ 轴：</p><p>$$T\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}x\\0\end{pmatrix}$$</p><p>  <strong>问</strong>：这个变换&quot;压掉了多少维度&quot;？</p><p>  <strong>直观答案</strong>：</p><ul><li>原来是<strong>二维</strong>的（整个平面）</li><li>变完只有<strong>一维</strong>（$x$ 轴）</li><li>所以<strong>压掉了一维</strong></li></ul><p>  <strong>具体压掉的是哪些点？</strong> 所有 $y$ 轴上的点：</p><p>$$T\begin{pmatrix}0\\y\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}$$</p><p>  <strong>它们全都被压到了原点</strong>——这就是<strong>核</strong>。</p><h2 id="center-p-秩-零度定理的直觉-p-center"><center><p>秩-零度定理的直觉</p></center></h2><p>  把上面的话总结成一句：</p><p>$$\text{压掉的（核）}+\text{留下的（像）}=\text{原来的维数},\qquad\text{即}\quad 1+1=2$$</p><p>  <strong>这就是秩-零度定理。</strong></p><p>  <strong>换成&quot;守恒&quot;的说法</strong>：<strong>变换不会凭空创造或消灭维度</strong>——它只是把一些维度&quot;压掉&quot;（核），剩下的&quot;保留&quot;（像）。</p><div class="note info flat"><p><strong>为什么这是&quot;守恒&quot;</strong></p><p>  想象一束光穿过一张透明纸，投在墙上：</p><ul><li><strong>纸上</strong>的图案（原空间 $V$）</li><li><strong>墙上</strong>的图案（像 $\operatorname{Im}T$）</li><li><strong>被&quot;重叠&quot;而丢失的信息</strong>（核 $\ker T$）</li></ul><p>  <strong>纸上的维数 = 墙上的维数 + 重叠掉的维数。</strong></p><p>  投影到 $x$ 轴时：纸是二维、墙是一维、重叠掉的是 $y$ 方向的一维。</p><p>  <strong>注意</strong>：如果投影<strong>不是</strong>到这个方向，而是一个&quot;斜投影&quot;，<strong>结论仍然成立</strong>——只是重叠的方式更复杂。</p></div><h2 id="center-p-三种极端情况-p-center"><center><p>三种极端情况</p></center></h2><table><thead><tr><th>变换</th><th>核</th><th>像</th><th>秩-零度</th></tr></thead><tbody><tr><td><strong>恒等</strong> $I$</td><td>${\vec 0}$（0 维）</td><td>全部（$n$ 维）</td><td>$0+n=n$ ✓</td></tr><tr><td><strong>零变换</strong></td><td>全部（$n$ 维）</td><td>${\vec 0}$（0 维）</td><td>$n+0=n$ ✓</td></tr><tr><td><strong>投影</strong>（上面例子）</td><td>$y$ 轴（1 维）</td><td>$x$ 轴（1 维）</td><td>$1+1=2$ ✓</td></tr></tbody></table><p>  <strong>恒等</strong>：什么都没压掉；<strong>零变换</strong>：全压没了；<strong>投影</strong>：压一半。</p><p>  <strong>三种情况都满足定理</strong>。</p><hr><h1 id="center-p-二、标准：定理与行秩-列秩-p-center"><center><p>二、标准：定理与行秩=列秩</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-秩-零度定理-p-center"><center><p>秩-零度定理</p></center></h2><blockquote><p><strong>定理</strong>：设 $T:V\to W$ 是线性映射，$\dim V=n&lt;\infty$，则</p><p>$$\dim\ker T+\dim\operatorname{Im}T=n$$</p></blockquote><p>  <strong>记号</strong>：$\operatorname{nullity}(T)=\dim\ker T$（零度），$\operatorname{rank}(T)=\dim\operatorname{Im}T$（秩）。</p><h2 id="center-p-矩阵的秩-p-center"><center><p>矩阵的秩</p></center></h2><p>  对矩阵 $A\in\mathbb{F}^{m\times n}$，把它看成线性映射 $A:\mathbb{F}^n\to\mathbb{F}^m$：</p><table><thead><tr><th>概念</th><th>定义</th></tr></thead><tbody><tr><td><strong>列空间</strong> $C(A)$</td><td>$A$ 的列张成的子空间 = $\operatorname{Im}A$</td></tr><tr><td><strong>零空间</strong> $N(A)$</td><td>${x:Ax=0}$ = $\ker A$</td></tr><tr><td><strong>列秩</strong></td><td>$\dim C(A)$</td></tr><tr><td><strong>行秩</strong></td><td>$\dim C(A^\top)$</td></tr></tbody></table><blockquote><p><strong>核心定理</strong>：<strong>行秩 = 列秩</strong>。这个公共值就叫 $A$ 的<strong>秩</strong>，记作 $\operatorname{rank}(A)$。</p></blockquote><p>  <strong>所以对 $A\in\mathbb{F}^{m\times n}$</strong>：</p><p>$$\operatorname{rank}(A)+\dim N(A)=n$$</p><p>  <strong>注意左边是 $n$（列数），不是 $m$</strong>。</p><h2 id="center-p-秩的等价刻画-p-center"><center><p>秩的等价刻画</p></center></h2><p>  下列<strong>全都相等</strong>：</p><ol><li>行秩</li><li>列秩</li><li>行最简形中非零行的个数</li><li><strong>最大的 $r$，使得存在 $r\times r$ 非零子式</strong>（对行列式，第 4 章细讲）</li><li>$A$ 能分解为 $A=BC$（$B$ 是 $m\times r$，$C$ 是 $r\times n$）时最大的 $r$</li></ol><p>  <strong>每一条都有用</strong>：1、2 是理论，3 是手算，4 是行列式判据，5 是&quot;低秩分解&quot;。</p><h2 id="center-p-秩的性质-p-center"><center><p>秩的性质</p></center></h2><p>  设 $A\in\mathbb{F}^{m\times n}$，$B\in\mathbb{F}^{n\times k}$：</p><table><thead><tr><th>性质</th><th>说明</th></tr></thead><tbody><tr><td>$\operatorname{rank}(A)\le\min(m,n)$</td><td>秩不超过两个维度</td></tr><tr><td>$\operatorname{rank}(AB)\le\min(\operatorname{rank}A,\operatorname{rank}B)$</td><td>相乘不增秩</td></tr><tr><td>$P,Q$ 可逆 ⟹ $\operatorname{rank}(PAQ)=\operatorname{rank}(A)$</td><td>可逆变换不改变秩</td></tr><tr><td>$\operatorname{rank}(A)=\operatorname{rank}(A^\top)$</td><td>行秩=列秩</td></tr><tr><td>$\operatorname{rank}(A+B)\le\operatorname{rank}(A)+\operatorname{rank}(B)$</td><td>次可加</td></tr></tbody></table><div class="note info flat"><p><strong>为什么&quot;相乘不增秩&quot;</strong></p><p>  把 $AB$ 看成&quot;先 $B$ 再 $A$&quot;：</p><ul><li>$B$ 把空间压到维数 $\le\operatorname{rank}(B)$</li><li>$A$ 再压一次，维数不会<strong>增加</strong></li></ul><p>  <strong>所以乘积的秩不超过因子中较小的那个。</strong></p><p>  <strong>实用推论</strong>：无论左右乘多少可逆矩阵，秩都不变——<strong>这就是为什么行变换/列变换可以判断秩</strong>。</p></div><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：把秩-零度写成 $\dim\ker+\dim\operatorname{Im}=m$</strong></p><p>  应该是<strong>定义域</strong>的维数（$n$），不是陪域（$m$）。</p><p><strong>错误二：以为&quot;秩 = 非零元个数&quot;</strong></p><p>  秩是<strong>线性无关的行/列的个数</strong>。</p><p>  <strong>反例</strong>：$\begin{pmatrix}1&amp;1\\1&amp;1\end{pmatrix}$ 有 4 个非零元，但秩 = 1。</p><p><strong>错误三：以为&quot;满秩&quot;就是&quot;所有元素都非零&quot;</strong></p><p>  满秩指 $\operatorname{rank}=\min(m,n)$，即<strong>行（或列）线性无关</strong>。</p><p><strong>错误四：用 $|A|$ 判断非方阵的秩</strong></p><p>  行列式只对方阵有定义。</p><p><strong>错误五：以为 $\operatorname{rank}(A+B)=\operatorname{rank}(A)+\operatorname{rank}(B)$</strong></p><p>  只有 $\le$。<strong>反例</strong>：$A=-B$ 且都满秩，则 $A+B=0$，秩为 0。</p><p><strong>错误六：求零空间时只求一个解</strong></p><p>  零空间是<strong>子空间</strong>，要给出它的基（基础解系）。</p></div><hr><h1 id="center-p-三、深入：三种证明-p-center"><center><p>三、深入：三种证明</p></center></h1><p>  <strong>（这一部分是严格证明。）</strong></p><h2 id="center-p-证法一：基的扩充-p-center"><center><p>证法一：基的扩充</p></center></h2><details class="folding-tag" cyan><summary> 证明（最直接） </summary>              <div class='content'>              <p>  设 $\dim\ker T=k$，取核的一组基 ${\vec v_1,\dots,\vec v_k}$。</p><p>  <strong>由基扩充定理</strong>（1.2 节），把它扩充成 $V$ 的基：</p><p>$${\vec v_1,\dots,\vec v_k,\vec u_1,\dots,\vec u_{n-k}}$$</p><p>  <strong>断言</strong>：${T(\vec u_1),\dots,T(\vec u_{n-k})}$ 是 $\operatorname{Im}T$ 的基。</p><p><strong>（1）它们张成 $\operatorname{Im}T$</strong>：</p><p>  任取 $T(\vec v)$，把 $\vec v$ 用基表示：$\vec v=\sum a_i\vec v_i+\sum b_j\vec u_j$。</p><p>  则</p><p>$$T(\vec v)=\sum a_iT(\vec v_i)+\sum b_jT(\vec u_j)=0+\sum b_jT(\vec u_j)\quad\checkmark$$</p><p><strong>（2）它们线性无关</strong>：</p><p>  设 $\sum c_jT(\vec u_j)=\vec 0$，则</p><p>$$T\left(\sum c_j\vec u_j\right)=\vec 0\ \Longrightarrow\ \sum c_j\vec u_j\in\ker T$$</p><p>  所以 $\sum c_j\vec u_j=\sum d_i\vec v_i$（核里的向量）。</p><p>  移项得 $\sum c_j\vec u_j-\sum d_i\vec v_i=\vec 0$。</p><p>  <strong>但 ${\vec v,\vec u}$ 是 $V$ 的基，线性无关</strong>，所以所有系数为 0，特别地 $c_j=0$ ✓</p><p>  于是 $\dim\operatorname{Im}T=n-k$，即 $k+(n-k)=n$ ✓ $\blacksquare$</p>              </div>            </details><h2 id="center-p-证法二：矩阵的消元-p-center"><center><p>证法二：矩阵的消元</p></center></h2><details class="folding-tag" cyan><summary> 证明（用 1.1 节的高斯消元） </summary>              <div class='content'>              <p>  把 $A$ 用初等行变换化成<strong>行最简形</strong> $R$。</p><p>  <strong>行变换不改变行空间</strong>，所以 $\operatorname{rank}(A)=\operatorname{rank}(R)=R$ 的非零行数 $=r$。</p><p>  <strong>解 $Ax=0$ 与 $Rx=0$ 同解</strong>，所以 $\dim N(A)=\dim N(R)$。</p><p>  对 $R$：主元列有 $r$ 个，自由变量有 $n-r$ 个。</p><p>  <strong>自由变量的个数 = 零空间的维数</strong>（每个自由变量给一个基向量）。</p><p>  所以 $\dim N(A)=n-r$，于是 $r+(n-r)=n$ ✓ $\blacksquare$</p><p>  <strong>注</strong>：这个证法只说明了&quot;$\operatorname{rank}+\dim N=n$&quot;，没有说明&quot;行秩=列秩&quot;。</p><p>  （行秩=列秩需要额外论证，见下一小节。）</p>              </div>            </details><h2 id="center-p-行秩-列秩的证明-p-center"><center><p>行秩=列秩的证明</p></center></h2><details class="folding-tag" cyan><summary> 证明（关键：用"转置+秩-零度"） </summary>              <div class='content'>              <p>  <strong>思路</strong>：对 $A^\top$ 用秩-零度。</p><p>  对 $A\in\mathbb{F}^{m\times n}$：</p><ul><li>对 $A$：$\operatorname{rank}(A)+\dim N(A)=n$</li><li>对 $A^\top$：$\operatorname{rank}(A^\top)+\dim N(A^\top)=m$</li></ul><p>  <strong>要证</strong>：$\operatorname{rank}(A)=\operatorname{rank}(A^\top)$。</p><p>  <strong>一个事实</strong>：$N(A^\top)=C(A)^{\perp}$（左零空间 = 列空间的正交补）。</p><p>  （这个&quot;正交补&quot;概念要等第 6 章内积空间才严格，但形式上已经清楚：$A^\top y=0$ 意味着 $y$ 与 $A$ 的每一列都正交。）</p><p>  <strong>若</strong> $\dim C(A)=r$，则 $\dim C(A)^\perp=m-r$，所以 $\dim N(A^\top)=m-r$。</p><p>  代入第二式：$\operatorname{rank}(A^\top)+(m-r)=m$，所以 $\operatorname{rank}(A^\top)=r$ ✓</p><p>  <strong>所以行秩=列秩</strong> ✓ $\blacksquare$</p><p>  <strong>注意</strong>：这个证明用了&quot;正交补的维数 $=n-\dim$&quot;——它本身也需要证（第 6 章给）。</p>              </div>            </details><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：秩的早期历史-p-center"><center><p>历史：秩的早期历史</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1858</td><td>凯莱</td><td>矩阵代数</td></tr><tr><td>1860s</td><td>西尔维斯特</td><td>&quot;二次型的秩&quot;</td></tr><tr><td>1870s</td><td>弗罗贝尼乌斯</td><td>用秩判断方程解的存在性</td></tr><tr><td>1892</td><td>杜布瓦-雷蒙</td><td>秩的现代用法（有限维）</td></tr><tr><td>1905</td><td>施密特</td><td>用秩讨论积分方程</td></tr></tbody></table><p>  <strong>&quot;秩（rank）&quot;这个词</strong>最早来自西尔维斯特（Sylvester），用来描述二次型里&quot;有效的平方项个数&quot;。</p><p>  <strong>它的现代抽象意义</strong>（&quot;像的维数&quot;）要到 20 世纪才确立。</p><div class="note info flat"><p><strong>为什么&quot;行秩=列秩&quot;让人惊讶</strong></p><p>  <strong>行和列本来是两个完全不同的方向。</strong></p><p>  矩阵 $A$ 的行在 $\mathbb{R}^n$ 里，列在 $\mathbb{R}^m$ 里（一般不相等）。</p><p>  <strong>但它们的维数总是相等。</strong></p><p>  <strong>这个事实</strong>：</p><ul><li>不显然</li><li>不是&quot;定义造出来的&quot;</li><li>而是<strong>定理</strong>（需要证明）</li></ul><p>  <strong>这是一个&quot;意外的好消息&quot;</strong>：两个不同的数恰好相等，让&quot;秩&quot;成为一个良定义的量。</p><p>  <strong>类似的&quot;两个数相等&quot;还有</strong>：特征多项式在相似变换下不变（迹和行列式都保持）。</p></div><h2 id="center-p-联系：数值计算里的-秩-p-center"><center><p>联系：数值计算里的&quot;秩&quot;</p></center></h2><p>  <strong>理论上</strong>秩是一个<strong>整数</strong>，很清晰。</p><p>  <strong>数值上</strong>秩是<strong>模糊</strong>的——因为浮点数有误差。</p><p>  <strong>例</strong>：</p><p>$$A=\begin{pmatrix}1&amp;2\\2&amp;4.0000000001\end{pmatrix}$$</p><p>  <strong>理论上</strong> $|A|=4.0000000001-4=10^{-10}\ne0$，所以<strong>满秩</strong>。</p><p>  <strong>但</strong>在原矩阵上加一个 $10^{-16}$ 的扰动，它可能变成<strong>降秩</strong>。</p><p>  <strong>实用解法</strong>：<strong>数值秩</strong>——用<strong>奇异值分解（SVD）</strong>，把小于阈值的奇异值当作 0。</p><p>  <strong>这就是</strong>：</p><ul><li>MATLAB 的 <code>rank(A, tol)</code> 用默认容差</li><li>numpy 的 <code>matrix_rank</code> 用 <code>tol = max(M,N)*eps*sigma_max</code></li></ul><p>  <strong>结果</strong>：矩阵的&quot;数值秩&quot;依赖于<strong>容差的选择</strong>——这是数值线性代数的核心问题之一。</p><h2 id="center-p-应用：最小二乘与伪逆-p-center"><center><p>应用：最小二乘与伪逆</p></center></h2><p>  <strong>超定方程</strong> $Ax=b$（$m&gt;n$）一般无解。</p><p>  <strong>最小二乘</strong>求 $\min\lVert Ax-b\rVert^2$ 的解。<strong>若 $A$ 列满秩</strong>（秩 = $n$）：</p><p>$$x=(A^\top A)^{-1}A^\top b$$</p><p>  <strong>注意</strong>：这里要求列满秩！否则 $A^\top A$ 不可逆。</p><p>  <strong>若 $A$ 不满秩</strong>：无穷多解，要用<strong>伪逆（Moore-Penrose）</strong>，取<strong>范数最小</strong>的那个。</p><p>  <strong>伪逆的构造</strong>用 SVD：</p><p>$$A^+=V\Sigma^+U^\top$$</p><p>  其中 $\Sigma^+$ 把非零奇异值取倒数（<strong>零奇异值保持为 0</strong>）。</p><p>  <strong>所以&quot;秩的判定&quot;直接决定了&quot;能不能算&quot;</strong>——这是本节理论在工程里的直接应用。</p><p>  <strong>与本站的联系</strong>：「微分方程数值解」系列的最小二乘拟合也用这个。</p><h2 id="center-p-应用：图像压缩与低秩近似-p-center"><center><p>应用：图像压缩与低秩近似</p></center></h2><p>  <strong>一幅灰度图像是一个矩阵</strong> $I\in\mathbb{R}^{m\times n}$。</p><p>  <strong>自然图像通常是&quot;近似低秩&quot;的</strong>——把它做 SVD，前面几个奇异值往往占绝大部分能量。</p><p>  <strong>截断到秩 $k$</strong>：</p><p>$$I\approx\sum_{i=1}^{k}\sigma_i\vec u_i\vec v_i^\top$$</p><p>  <strong>压缩比</strong>：原来是 $mn$ 个数，现在是 $k(m+n)$ 个。</p><p>  <strong>例</strong>：$1000\times1000$ 的图像，$k=50$ 时只需要 $50\times2000=10^5$ 个数（原来 $10^6$）——<strong>压 10 倍</strong>。</p><p>  <strong>这就是&quot;低秩近似&quot;</strong>——<strong>而&quot;秩&quot;正是衡量&quot;有效信息量&quot;的指标</strong>。</p><p>  <strong>Eckart-Young 定理</strong>（第 6 章讲）保证：截断 SVD 是<strong>最优</strong>的低秩近似（在 Frobenius 范数下）。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 3 章线性映射，第 3F 节秩-零度。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 3 章：四个基本子空间。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>秩-零度</strong></td><td>$\dim\ker+\dim\operatorname{Im}=\dim V$（<strong>定义域</strong>的维数）</td></tr><tr><td><strong>矩阵形式</strong></td><td>$\operatorname{rank}(A)+\dim N(A)=n$（<strong>列数</strong>）</td></tr><tr><td><strong>行秩=列秩</strong></td><td>公共值即 $\operatorname{rank}(A)$</td></tr><tr><td><strong>性质</strong></td><td>相乘不增秩；可逆变换不改变秩；次可加</td></tr><tr><td><strong>三种证明</strong></td><td>基的扩充 / 消元计数 / 转置+秩-零度</td></tr><tr><td><strong>数值</strong></td><td>秩在浮点下是模糊的，要用 SVD 与容差</td></tr><tr><td><strong>应用</strong></td><td>最小二乘（需列满秩）、伪逆、低秩近似</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>有了秩，就能<strong>完全说清线性方程组的解</strong>：</p><p>$$Ax=b\quad\Longleftrightarrow\quad \operatorname{rank}(A)=\operatorname{rank}(A|b)$$</p><p>  以及解空间的维数是 $n-\operatorname{rank}(A)$。</p><p>  <strong>下一节（第 3 章）会把这些串起来</strong>，并讨论<strong>四个基本子空间</strong>——它们构成一个漂亮的&quot;正交关系图&quot;。</p><p>  那个图是理解线性代数全局结构的钥匙。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第四章矩阵的秩。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 3F 节。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 3 章。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;投影压扁了多少&quot;理解秩与零度；②秩-零度定理的陈述、行秩=列秩、秩的等价定义；③定理的三种证明；④历史、与数值计算（条件数、最小二乘）的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 2.1：线性变换与矩阵表示——变换是本质，矩阵只是影子</title>
    <link href="https://hsmk.mikufans.date/posts/5c5a995d.html"/>
    <id>https://hsmk.mikufans.date/posts/5c5a995d.html</id>
    <published>2026-11-22T20:15:00.000Z</published>
    <updated>2026-11-22T20:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li>2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子（本篇）</li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用旋转、拉伸、投影三个动作建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——线性变换、矩阵表示、核与像、矩阵乘法</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;同一变换不同矩阵&quot;、&quot;乘积对应复合&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、自动微分、量子力学感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：三个动作-p-center"><center><p>一、基础：三个动作</p></center></h1><p>  <strong>（这一部分只需要知道&quot;向量&quot;是什么。）</strong></p><h2 id="center-p-变换就是一个-动-p-center"><center><p>变换就是一个&quot;动&quot;</p></center></h2><p>  把一个向量变成另一个向量——这叫<strong>变换</strong>。</p><p>  <strong>最熟悉的三个</strong>：</p><table><thead><tr><th>动作</th><th>效果</th><th>例子</th></tr></thead><tbody><tr><td><strong>旋转</strong></td><td>转一个角度</td><td>$(1,0)\mapsto(0,1)$</td></tr><tr><td><strong>拉伸</strong></td><td>某个方向变长</td><td>$(x,y)\mapsto(2x,y)$</td></tr><tr><td><strong>投影</strong></td><td>压到某个方向</td><td>$(x,y)\mapsto(x,0)$</td></tr></tbody></table><p>  <strong>它们有一个共同点</strong>：<strong>保持&quot;线性&quot;</strong>。</p><h2 id="center-p-什么叫-线性-p-center"><center><p>什么叫&quot;线性&quot;</p></center></h2><p>  <strong>两条规则</strong>：</p><ol><li><strong>保持加法</strong>：$T(\vec u+\vec v)=T(\vec u)+T(\vec v)$</li><li><strong>保持数乘</strong>：$T(a\vec v)=aT(\vec v)$</li></ol><p>  <strong>通俗说</strong>：<strong>先相加再变换 = 先变换再相加</strong>；<strong>先放大再变换 = 先变换再放大</strong>。</p><p>  <strong>例</strong>：旋转是线性的。</p><p>  转 $\vec u+\vec v$ 和&quot;分别转再相加&quot;结果一样 ✓（几何上很明显）</p><h2 id="center-p-哪些不是线性的-p-center"><center><p>哪些不是线性的</p></center></h2><p>  <strong>很多常见的变换都不是线性的</strong>：</p><table><thead><tr><th>变换</th><th>为什么不是</th></tr></thead><tbody><tr><td><strong>平移</strong> $\vec v\mapsto\vec v+\vec c$</td><td>$T(\vec 0)=\vec c\ne\vec 0$</td></tr><tr><td><strong>平方</strong> $\vec v\mapsto(v_1^2,v_2^2)$</td><td>$(u+v)^2\ne u^2+v^2$</td></tr><tr><td><strong>取长度</strong> $\vec v\mapsto\lVert\vec v\rVert$</td><td>$T(a\vec v)=\lvert a\rvert\lVert\vec v\rVert\ne aT(\vec v)$（$a&lt;0$ 时不对）</td></tr></tbody></table><div class="note info flat"><p><strong>为什么平移不是线性的</strong></p><p>  平移看起来最简单，但它<strong>不满足第一条</strong>：$T(\vec 0)=\vec c\ne\vec 0$。</p><p>  <strong>但工程里大量用到平移</strong>（图形学、机器人学）。</p><p>  <strong>解决办法</strong>：用<strong>齐次坐标</strong>——把 $n$ 维向量变成 $(n+1)$ 维：</p><p>$$\begin{pmatrix}\vec v\\1\end{pmatrix}\mapsto\begin{pmatrix}A\vec v+\vec c\\1\end{pmatrix}=\begin{pmatrix}A&amp;\vec c\\\vec 0&amp;1\end{pmatrix}\begin{pmatrix}\vec v\\1\end{pmatrix}$$</p><p>  <strong>这样平移就变成了线性变换</strong>（在更高维的空间里）。</p><p>  <strong>这是 3D 图形学里所有变换都用 $4\times4$ 矩阵的原因。</strong></p></div><h2 id="center-p-线性变换由-基的像-完全决定-p-center"><center><p>线性变换由&quot;基的像&quot;完全决定</p></center></h2><p>  <strong>这是本节最重要的直觉。</strong></p><p>  设 ${\vec e_1,\dots,\vec e_n}$ 是一组基。如果你知道每个基向量被变到哪里去：</p><p>$$T(\vec e_1),\ T(\vec e_2),\ \dots,\ T(\vec e_n)$$</p><p>  <strong>那么任何向量 $\vec v=\sum x_i\vec e_i$ 的像也就确定了</strong>：</p><p>$$T(\vec v)=T\left(\sum x_i\vec e_i\right)=\sum x_iT(\vec e_i)$$</p><p>  <strong>所以</strong>：<strong>线性变换只需记住 $n$ 个&quot;基向量的去向&quot;即可。</strong></p><p>  把这 $n$ 个像按列排成矩阵——<strong>这就是矩阵表示的来源。</strong></p><hr><h1 id="center-p-二、标准：定义、矩阵表示、核与像-p-center"><center><p>二、标准：定义、矩阵表示、核与像</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-线性变换的定义-p-center"><center><p>线性变换的定义</p></center></h2><blockquote><p><strong>定义</strong>：映射 $T:V\to W$（$V,W$ 是向量空间）称为<strong>线性映射</strong>，若</p><p>$$T(\vec u+\vec v)=T(\vec u)+T(\vec v),\qquad T(a\vec v)=aT(\vec v)$$</p><p>若 $V=W$，叫<strong>线性变换</strong>。</p></blockquote><p>  <strong>等价说法</strong>：$T\left(\sum\lambda_i\vec v_i\right)=\sum\lambda_iT(\vec v_i)$——<strong>保持线性组合</strong>。</p><p>  <strong>即时推论</strong>：$T(\vec 0)=\vec 0$。</p><h2 id="center-p-矩阵表示-p-center"><center><p>矩阵表示</p></center></h2><p>  设 ${\vec e_1,\dots,\vec e_n}$ 是 $V$ 的基，${\vec f_1,\dots,\vec f_m}$ 是 $W$ 的基。</p><p>  <strong>把每个 $T(\vec e_j)$ 用 $\vec f$ 表示</strong>：</p><p>$$T(\vec e_j)=\sum_{i=1}^{m}a_{ij}\vec f_i$$</p><p>  <strong>矩阵 $A=(a_{ij})$ 就叫 $T$ 在这两组基下的矩阵。</strong></p><p>  <strong>关键</strong>：<strong>$A$ 的第 $j$ 列 = $T(\vec e_j)$ 在 ${\vec f}$ 下的坐标。</strong></p><h2 id="center-p-坐标的对应关系-p-center"><center><p>坐标的对应关系</p></center></h2><blockquote><p><strong>定理</strong>：若 $\vec v$ 在 ${\vec e}$ 下坐标是 $\vec x$，$T(\vec v)$ 在 ${\vec f}$ 下坐标是 $\vec y$，则</p><p>$$\vec y=A\vec x$$</p></blockquote><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  $\vec v=\sum x_j\vec e_j$，所以</p><p>$$T(\vec v)=\sum x_jT(\vec e_j)=\sum x_j\sum_i a_{ij}\vec f_i=\sum_i\left(\sum_j a_{ij}x_j\right)\vec f_i$$</p><p>  括号里正是 $(A\vec x)_i$，所以坐标是 $A\vec x$ ✓ $\blacksquare$</p><p>  <strong>这个证明就是&quot;矩阵乘法的定义&quot;</strong>——矩阵乘法之所以这样定义，<strong>就是为了让&quot;变换的复合&quot;对应&quot;矩阵的乘法&quot;</strong>。</p>              </div>            </details><h2 id="center-p-核与像-p-center"><center><p>核与像</p></center></h2><blockquote><p><strong>核</strong> $\ker T={\vec v:T(\vec v)=\vec 0}$（被&quot;压扁&quot;的部分）</p><p><strong>像</strong> $\operatorname{Im}T={T(\vec v):\vec v\in V}$（能变出来的全部）</p></blockquote><p>  <strong>两者都是子空间。</strong> 而且有关系：</p><p>$$\dim(\ker T)+\dim(\operatorname{Im}T)=\dim V$$</p><p>  <strong>这叫&quot;秩-零度定理&quot;</strong>（下一节细讲）。</p><p>  <strong>直觉</strong>：</p><ul><li>变换把 $V$&quot;压&quot;到 $\operatorname{Im}T$</li><li>被压掉的那部分就是 $\ker T$</li><li><strong>丢掉多少维 + 留下多少维 = 原来多少维</strong></li></ul><h2 id="center-p-矩阵乘法-变换复合-p-center"><center><p>矩阵乘法 = 变换复合</p></center></h2><p>  <strong>若 $S:U\to V$，$T:V\to W$</strong>，则复合 $T\circ S:U\to W$ 的矩阵是</p><p>$$[T\circ S]=[T]\cdot[S]$$</p><p>  （乘积顺序：<strong>先作用的在右边</strong>）</p><div class="note warning flat"><p><strong>&quot;先作用的在右边&quot;——初学者最常错的地方</strong></p><p>  $T\circ S$ 的意思是&quot;<strong>先做 $S$，再做 $T$</strong>&quot;。</p><p>  对应的矩阵是 $[T][S]$——<strong>$S$ 的矩阵在右边</strong>。</p><p>  <strong>记忆方法</strong>：像函数复合 $f(g(x))$，$g$ 先做但写在里面；矩阵也&quot;里面先做&quot;，即右边先做。</p><p>  <strong>具体例</strong>：先旋转再拉伸，矩阵是 $[\text{拉伸}][\text{旋转}]$。</p><p>  <strong>注意</strong>：矩阵乘法<strong>不交换</strong>（$AB\ne BA$ 一般成立）——<strong>因为变换复合不交换</strong>：</p><ul><li>先旋转再拉伸 ≠ 先拉伸再旋转</li></ul><p>  <strong>所以&quot;矩阵乘法不交换&quot;不是缺陷，而是忠实地反映了现实。</strong></p></div><h2 id="center-p-算例-p-center"><center><p>算例</p></center></h2><p>  <strong>例 1</strong>：$\mathbb{R}^2$ 中逆时针旋转 $90°$ 的矩阵。</p><p>  $T(\vec e_1)=T(1,0)=(0,1)$——第 1 列是 $(0,1)^\top$</p><p>  $T(\vec e_2)=T(0,1)=(-1,0)$——第 2 列是 $(-1,0)^\top$</p><p>$$A=\begin{pmatrix}0&amp;-1\\1&amp;0\end{pmatrix}$$</p><p>  <strong>验证</strong>：$A(1,0)^\top=(0,1)^\top$ ✓；$A(0,1)^\top=(-1,0)^\top$ ✓</p><p><strong>例 2</strong>：验证&quot;转两次 90° = 转 180°&quot;。</p><p>$$A^2=\begin{pmatrix}0&amp;-1\\1&amp;0\end{pmatrix}\begin{pmatrix}0&amp;-1\\1&amp;0\end{pmatrix}=\begin{pmatrix}-1&amp;0\\0&amp;-1\end{pmatrix}=-I$$</p><p>  <strong>这正是转 $180°$ 的矩阵</strong> ✓</p><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：把 $T(\vec e_j)$ 的坐标写成行</strong></p><p>  必须是<strong>列</strong>。</p><p><strong>错误二：矩阵乘法顺序搞反</strong></p><p>  $T\circ S$ 的矩阵是 $[T][S]$，不是 $[S][T]$。</p><p><strong>错误三：以为&quot;两个变换不交换&quot;是矩阵的缺陷</strong></p><p>  矩阵乘法不交换，正是因为<strong>变换复合不交换</strong>——这是忠实的表示。</p><p><strong>错误四：把平移当成线性变换</strong></p><p>  $T(\vec v)=\vec v+\vec c$ 不是线性的（除非 $\vec c=\vec 0$）。要用齐次坐标。</p><p><strong>错误五：以为&quot;核是空集&quot;</strong></p><p>  核<strong>一定包含 $\vec 0$</strong>，所以永远不是空集。$\ker T={\vec 0}$ 表示&quot;只有零向量被压成零&quot;。</p><p><strong>错误六：混淆核与像的维数关系</strong></p><p>  $\dim\ker+\dim\operatorname{Im}=\dim V$，不是 $\dim W$。</p></div><hr><h1 id="center-p-三、深入：为什么同一变换有不同的矩阵-p-center"><center><p>三、深入：为什么同一变换有不同的矩阵</p></center></h1><p>  <strong>（这一部分是完整推导。）</strong></p><h2 id="center-p-换基后的矩阵（相似变换）-p-center"><center><p>换基后的矩阵（相似变换）</p></center></h2><details class="folding-tag" cyan><summary> 完整推导 </summary>              <div class='content'>              <p>  设 $T:V\to V$ 在基 ${\vec e}$ 下的矩阵是 $A$，在新的基 ${\vec u}=(\vec e)P$ 下的矩阵是 $B$。</p><p>  <strong>要证</strong>：$B=P^{-1}AP$。</p><p><strong>第一步：把 $\vec v$ 用两组基分别写</strong></p><p>  $\vec v=(\vec e)\vec x=(\vec u)\vec y$，由 1.3 节的坐标变换 $\vec x=P\vec y$。</p><p><strong>第二步：$T(\vec v)$ 用两组基分别写</strong></p><p>  用 ${\vec e}$：$T(\vec v)=(\vec e)A\vec x$</p><p>  用 ${\vec u}$：$T(\vec v)=(\vec u)B\vec y=(\vec e)PB\vec y$</p><p><strong>第三步：比较</strong></p><p>  $(\vec e)A\vec x=(\vec e)PB\vec y$，代入 $\vec x=P\vec y$：</p><p>$$AP\vec y=PB\vec y\qquad\text{对一切 }\vec y$$</p><p>  所以 $AP=PB$，即 $B=P^{-1}AP$ ✓ $\blacksquare$</p><p>  <strong>注意</strong>：这里 $A$ 和 $B$ 都是 $T$ 的矩阵——<strong>只是基不同</strong>。</p>              </div>            </details><div class="note info flat"><p><strong>这个公式的&quot;几何意义&quot;</strong></p><p>  $B=P^{-1}AP$ 可以读成三个动作：</p><p>$$\vec y\xrightarrow{\ P\ }\vec x\xrightarrow{\ A\ }A\vec x\xrightarrow{\ P^{-1}\ }P^{-1}A\vec x$$</p><p>  <strong>1. 换到旧基</strong>（右乘 $P$）</p><p>  <strong>2. 用旧基下的矩阵作用</strong>（乘 $A$）</p><p>  <strong>3. 换回新基</strong>（左乘 $P^{-1}$）</p><p>  <strong>所以相似变换就是&quot;换个视角做同一件事&quot;。</strong></p><p>  <strong>实用含义</strong>：如果 $A$ 复杂而 $B$ 简单（比如对角），我们可以<br>&quot;换到 $B$ 的基 → 简单计算 → 换回来&quot;。</p></div><h2 id="center-p-为什么矩阵乘积对应复合-p-center"><center><p>为什么矩阵乘积对应复合</p></center></h2><details class="folding-tag" cyan><summary> 完整证明 </summary>              <div class='content'>              <p>  设 $S:U\to V$ 在基 ${\vec g}$、${\vec e}$ 下的矩阵是 $B$，$T:V\to W$ 在 ${\vec e}$、${\vec f}$ 下的矩阵是 $A$。</p><p>  <strong>要证</strong>：$T\circ S$ 的矩阵是 $AB$。</p><p>  取 $\vec u\in U$，坐标 $\vec z$。由 $S$ 的矩阵定义：</p><p>$$S(\vec u)=(\vec e)B\vec z$$</p><p>  再作用 $T$：</p><p>$$T(S(\vec u))=(\vec f)A(B\vec z)=(\vec f)(AB)\vec z$$</p><p>  由矩阵定义（&quot;坐标变坐标&quot;），$T\circ S$ 的矩阵就是 $AB$ ✓ $\blacksquare$</p><p>  <strong>关键</strong>：$T(S(\vec u))$ 里 $S$ 的像已经是 $(\vec e)$ 的坐标形式，可以直接喂给 $A$。</p><p>  <strong>这个证明依赖 $V$ 的基在中间一致</strong>——若 $S$ 的像用一组基、$T$ 的输入用另一组基，就要多乘一个过渡矩阵。</p>              </div>            </details><h2 id="center-p-线性变换的全体构成代数-p-center"><center><p>线性变换的全体构成代数</p></center></h2><p>  <strong>记 $\operatorname{End}(V)$</strong>：$V\to V$ 的所有线性变换。</p><p>  <strong>它满足</strong>：</p><ul><li>加法：$(S+T)(\vec v)=S(\vec v)+T(\vec v)$</li><li>数乘：$(aS)(\vec v)=aS(\vec v)$</li><li>乘法（复合）：$(T\circ S)(\vec v)=T(S(\vec v))$</li></ul><p>  <strong>这就让 $\operatorname{End}(V)$ 成为一个&quot;代数&quot;</strong>——同时是向量空间和环。</p><p>  <strong>同构</strong>：$\operatorname{End}(V)\cong M_n(\mathbb{F})$（$n=\dim V$）——<strong>给定基后，变换与矩阵一一对应</strong>。</p><p>  <strong>注意&quot;给定基&quot;三个字</strong>：</p><ul><li>变换是<strong>固有的</strong>（不依赖基）</li><li>矩阵是<strong>相对的</strong>（依赖基）</li><li>同构<strong>依赖基的选择</strong></li></ul><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：矩阵是-发明-还是-发现-p-center"><center><p>历史：矩阵是&quot;发明&quot;还是&quot;发现&quot;</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1858</td><td><strong>凯莱</strong></td><td>矩阵代数，发现 $AB$ 的定义规则</td></tr><tr><td>1870s</td><td>弗罗贝尼乌斯</td><td>更系统的矩阵理论</td></tr><tr><td>1888</td><td>佩亚诺</td><td>线性变换的抽象定义</td></tr><tr><td>1920s</td><td><strong>外尔</strong></td><td>群表示论——变换与矩阵的和谐</td></tr><tr><td>1925</td><td><strong>海森伯</strong></td><td>量子力学里的矩阵（重发明）</td></tr></tbody></table><p>  <strong>凯莱 1858 说</strong>：&quot;矩阵是一种数组，不需要表示任何东西。&quot;</p><p>  <strong>他觉得矩阵只是一个&quot;记号游戏&quot;</strong>——没想到它后来会成为整个现代数学的语言。</p><div class="note info flat"><p><strong>海森伯的&quot;意外发现&quot;</strong></p><p>  <strong>1925 年，海森伯在赫尔戈兰岛养病时，重新发明了矩阵乘法。</strong></p><p>  他不知道凯莱 67 年前已经定义过，<strong>只是发现&quot;这两个数组乘起来必须这样算&quot;</strong>，才能让物理成立。</p><p>  他写完论文才从玻恩那里知道<strong>这是已经存在的数学</strong>。</p><p>  <strong>这个故事说明</strong>：数学的&quot;发明&quot;常常是被现实问题<strong>逼出来</strong>的——<br>当物理需要它时，数学家（或物理学家）就会想到同一个结构。</p><p>  <strong>矩阵力学 vs 波动力学</strong>：海森伯的矩阵力学与薛定谔的波动力学<br>看起来完全不同，<strong>但冯·诺依曼 1932 证明它们是等价的</strong>（同一个希尔伯特空间上的两种表示）。</p><p>  <strong>这就是本节的标题</strong>：变换是本质的（物理），矩阵只是影子（表示）。</p></div><h2 id="center-p-联系：自动微分就是-线性变换的复合-p-center"><center><p>联系：自动微分就是&quot;线性变换的复合&quot;</p></center></h2><p>  <strong>神经网络的一次前向传播</strong>：</p><p>$$\vec h^{(l)}=\sigma\left(W^{(l)}\vec h^{(l-1)}+\vec b^{(l)}\right)$$</p><p>  <strong>$W^{(l)}$ 就是一个线性变换</strong>（在 $n_{l-1}$ 维与 $n_l$ 维之间）。</p><p>  <strong>整个网络是这些线性变换的复合</strong>（中间隔着非线性 $\sigma$）。</p><p>  <strong>反向传播</strong>在算雅可比矩阵：</p><p>$$\frac{\partial L}{\partial \vec h^{(l-1)}}=\left(\frac{\partial \vec h^{(l)}}{\partial \vec h^{(l-1)}}\right)^{\top}\frac{\partial L}{\partial \vec h^{(l)}}$$</p><p>  其中 $\dfrac{\partial \vec h^{(l)}}{\partial \vec h^{(l-1)}}=D_\sigma W^{(l)}$（$D_\sigma$ 是非线性的对角矩阵）。</p><p>  <strong>所以反向传播 = 矩阵转置连乘</strong>——<strong>正是本节&quot;复合对应乘积&quot;的反向版本</strong>。</p><p>  <strong>与数学分析 5.2 节的联系</strong>：那是&quot;链式法则&quot;，这里是&quot;矩阵乘法的链&quot;——<strong>同一件事的两种语言</strong>。</p><h2 id="center-p-应用：量子力学中的线性变换-p-center"><center><p>应用：量子力学中的线性变换</p></center></h2><p>  <strong>量子力学的核心假设</strong>：<strong>可观测量是线性算子（自伴算子）</strong>。</p><ul><li><strong>动量</strong>：$\hat p=-\mathrm{i}\hbar\frac{\mathrm{d}}{\mathrm{d}x}$</li><li><strong>位置</strong>：$\hat x\cdot$（乘上 $x$）</li><li><strong>哈密顿量</strong>：$\hat H=-\frac{\hbar^2}{2m}\nabla^2+V$</li></ul><p>  <strong>它们作用在波函数（向量空间里的向量）上。</strong></p><p>  <strong>两个关键结论</strong>：</p><ol><li><strong>测量结果是本征值</strong>——这就是第 5 章&quot;特征值&quot;的物理意义</li><li><strong>不同可观测量可能不对易</strong>：$[\hat x,\hat p]=\mathrm{i}\hbar$</li></ol><p>  <strong>&quot;不对易&quot;就是&quot;矩阵乘法不交换&quot;</strong> ⟹ <strong>海森伯不确定性原理的数学来源</strong>。</p><p>  <strong>这是本节&quot;矩阵乘法不交换&quot;的物理后果</strong>——不是数学缺陷，而是世界的性质。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 3 章线性映射，以&quot;算子&quot;为主线。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 8 章线性变换。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>线性变换</strong></td><td>保持加法与数乘；$T(\vec 0)=\vec 0$</td></tr><tr><td><strong>矩阵表示</strong></td><td>第 $j$ 列 = $T(\vec e_j)$ 的坐标</td></tr><tr><td><strong>坐标关系</strong></td><td>$\vec y=A\vec x$</td></tr><tr><td><strong>核与像</strong></td><td>$\dim\ker+\dim\operatorname{Im}=\dim V$</td></tr><tr><td><strong>矩阵乘法</strong></td><td>$[T\circ S]=[T][S]$，<strong>先作用的在右边</strong></td></tr><tr><td><strong>不交换</strong></td><td>$AB\ne BA$ 因为变换复合不交换</td></tr><tr><td><strong>换基</strong></td><td>$B=P^{-1}AP$（换到旧基→作用→换回）</td></tr><tr><td><strong>齐次坐标</strong></td><td>把平移变成高维线性变换</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>本节留下的核心问题：</p><blockquote><p><strong>$\dim\ker T+\dim\operatorname{Im}T=\dim V$ 为什么成立？</strong></p></blockquote><p>  这个看似简单的等式叫<strong>秩-零度定理</strong>，它有多个证明（行空间/列空间的方法、矩阵消元的方法）。</p><p>  <strong>证明它需要先把&quot;行空间&quot;&quot;列空间&quot;说清</strong>——这就是下一节的内容。</p><p>  而更远的下一步（第 5 章）会问：</p><blockquote><p><strong>有没有一组基，使同一个变换的矩阵变成对角？</strong></p></blockquote></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第四章矩阵、第七章线性变换。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 3 章。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 8 章。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;旋转、拉伸、投影&quot;理解线性变换；②线性变换的定义、矩阵表示、核与像；③为什么矩阵乘积对应复合、以及&quot;同一变换不同矩阵&quot;的完整推导；④历史、与自动微分、量子力学的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 1.3：基变换与坐标变换——同一个向量，两套坐标</title>
    <link href="https://hsmk.mikufans.date/posts/ff3ef0e3.html"/>
    <id>https://hsmk.mikufans.date/posts/ff3ef0e3.html</id>
    <published>2026-11-22T16:25:00.000Z</published>
    <updated>2026-11-22T16:25:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li>1.3 基变换与坐标变换：同一个向量，两套坐标（本篇）<br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;换尺子量东西&quot;的直觉理解坐标</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——过渡矩阵与坐标变换公式</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;为什么过渡矩阵可逆&quot;、&quot;左乘还是右乘&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、图形学、QR 分解感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：换一把尺子量同一根棍子-p-center"><center><p>一、基础：换一把尺子量同一根棍子</p></center></h1><p>  <strong>（这一部分只需要 1.2 节的&quot;坐标&quot;概念。）</strong></p><h2 id="center-p-棍子没变，读数变了-p-center"><center><p>棍子没变，读数变了</p></center></h2><p>  同一根棍子，用厘米尺量是 $30$，用英寸尺量是约 $11.8$。</p><p>  <strong>棍子本身没变</strong>——变的只是<strong>刻度</strong>。</p><p>  <strong>向量也是这样</strong>：</p><p>$$\vec v=\begin{pmatrix}1\\2\end{pmatrix}$$</p><p>  在标准基下坐标是 $(1,2)$。但如果用另一组基 $\vec u_1=(1,1)$、$\vec u_2=(1,-1)$：</p><p>$$\vec v=\frac32\vec u_1-\frac12\vec u_2$$</p><p>  <strong>坐标变成 $\left(\frac32,-\frac12\right)$。</strong></p><p>  <strong>同一个向量，两组坐标。</strong></p><h2 id="center-p-问：两套坐标怎么换算-p-center"><center><p>问：两套坐标怎么换算</p></center></h2><p>  <strong>已知</strong>：$\vec v$ 在旧基 ({\vec e_1,\dots,\vec e_n}) 下坐标是 $(x_1,\dots,x_n)$。</p><p>  <strong>又知道</strong>：新基每个 $\vec u_j$ 在旧基下的坐标。</p><p>  <strong>问</strong>：$\vec v$ 在新基下的坐标 $(y_1,\dots,y_n)$ 是多少？</p><p>  <strong>想法</strong>：把两种表示都写成&quot;旧基下的坐标&quot;，然后比较。</p><p>  <strong>具体做法</strong>（见 ② 层）：求一个矩阵 $P$，使得</p><p>$$\vec x=P\vec y$$</p><p>  <strong>注意方向</strong>：是<strong>新坐标乘 $P$ 得旧坐标</strong>，不是反过来。</p><div class="note info flat"><p><strong>这个&quot;方向&quot;最容易搞反</strong></p><p>  <strong>记忆方法</strong>：把 $P$ 想成&quot;<strong>用旧语言描述新向量</strong>&quot;的翻译表。</p><p>  $\vec y$ 是&quot;用新语言说的向量&quot;，乘上 $P$ 就翻译成&quot;旧语言&quot;。</p><p>  <strong>所以</strong>：$P$ 的第 $j$ 列 = <strong>第 $j$ 个新基向量在旧基下的坐标</strong>。</p><p>  <strong>验算</strong>：取 $\vec y=(1,0,\dots,0)$（即 $\vec v=\vec u_1$），则 $P\vec y$ 就是 $P$ 的第一列——正是 $\vec u_1$ 在旧基下的坐标 ✓</p></div><h2 id="center-p-为什么要换基-p-center"><center><p>为什么要换基</p></center></h2><p>  <strong>换基不是为了&quot;好玩&quot;</strong>——它常常让问题变简单。</p><p>  <strong>例</strong>：矩阵 $\begin{pmatrix}3&amp;1\\0&amp;2\end{pmatrix}$ 看起来简单，但 $\begin{pmatrix}4&amp;-2\\1&amp;3\end{pmatrix}$ 看起来复杂。</p><p>  <strong>其实它们是同一个变换在不同基下的矩阵</strong>（第 2 章会证明）。</p><p>  <strong>换基的目标</strong>：</p><ul><li>让矩阵<strong>变成对角</strong>（最简单的形式）</li><li>让矩阵变成<strong>三对角</strong>（数值计算友好）</li><li>让矩阵变成<strong>上三角</strong>（便于求解）</li></ul><p>  <strong>这就是为什么&quot;换基&quot;是高等代数的核心技术。</strong></p><hr><h1 id="center-p-二、标准：过渡矩阵与坐标变换-p-center"><center><p>二、标准：过渡矩阵与坐标变换</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-过渡矩阵-p-center"><center><p>过渡矩阵</p></center></h2><p>  设旧基为 ({\vec e_1,\dots,\vec e_n})，新基为 ({\vec u_1,\dots,\vec u_n})。</p><p>  <strong>把新基用旧基表示</strong>：</p><p>$$\vec u_j=\sum_{i=1}^{n}p_{ij}\vec e_i\qquad(j=1,\dots,n)$$</p><p>  <strong>矩阵形式</strong>：</p><p>$$(\vec u_1,\dots,\vec u_n)=(\vec e_1,\dots,\vec e_n)P,\qquad P=(p_{ij})$$</p><p>  <strong>$P$ 就叫从旧基到新基的过渡矩阵</strong>（或<strong>变换矩阵</strong>）。</p><p>  <strong>$P$ 的第 $j$ 列 = $\vec u_j$ 在旧基下的坐标。</strong></p><h2 id="center-p-坐标变换公式-p-center"><center><p>坐标变换公式</p></center></h2><blockquote><p><strong>定理</strong>：若 $\vec v$ 在旧基下坐标是 $\vec x$，在新基下坐标是 $\vec y$，则</p><p>$$\vec x=P\vec y\qquad\text{即}\qquad \vec y=P^{-1}\vec x$$</p></blockquote><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  $\vec v$ 有两种写法：</p><p>$$\vec v=(\vec e_1,\dots,\vec e_n)\vec x\qquad(\text{旧基下面})\qquad \vec v=(\vec u_1,\dots,\vec u_n)\vec y\qquad(\text{新基下面})$$</p><p>  把 $\vec u_j=\sum p_{ij}\vec e_i$ 代入第二种：</p><p>$$\vec v=(\vec e_1,\dots,\vec e_n)P\vec y$$</p><p>  与第一式比较，得 $(\vec e_1,\dots,\vec e_n)\vec x=(\vec e_1,\dots,\vec e_n)P\vec y$。</p><p>  <strong>由基的唯一性</strong>（数学分析 1.2 节讲过坐标唯一），$\vec x=P\vec y$ ✓ $\blacksquare$</p><p>  <strong>注意</strong>：这里的&quot;唯一性&quot;来自 $\vec e_1,\dots,\vec e_n$ <strong>线性无关</strong>——不是显然的。</p>              </div>            </details><h2 id="center-p-完整算例-p-center"><center><p>完整算例</p></center></h2><p>  <strong>旧基</strong>：$\vec e_1=(1,0)$，$\vec e_2=(0,1)$</p><p>  <strong>新基</strong>：$\vec u_1=(1,1)$，$\vec u_2=(1,-1)$</p><p>  <strong>求过渡矩阵</strong>：</p><p>$$\vec u_1=1\cdot\vec e_1+1\cdot\vec e_2\ \Longrightarrow\ \text{第 1 列}=\begin{pmatrix}1\\1\end{pmatrix}$$</p><p>$$\vec u_2=1\cdot\vec e_1-1\cdot\vec e_2\ \Longrightarrow\ \text{第 2 列}=\begin{pmatrix}1\\-1\end{pmatrix}$$</p><p>所以</p><p>$$P=\begin{pmatrix}1&amp;1\\1&amp;-1\end{pmatrix}$$</p><p>  <strong>求逆</strong>：$|P|=-1-1=-2\ne0$（可逆 ✓）</p><p>$$P^{-1}=\frac{1}{-2}\begin{pmatrix}-1&amp;-1\\-1&amp;1\end{pmatrix}=\begin{pmatrix}\frac12&amp;\frac12\\\frac12&amp;-\frac12\end{pmatrix}$$</p><p>  <strong>验证</strong>：$\vec v=(1,2)$ 在新基下坐标</p><p>$$\vec y=P^{-1}\vec x=\begin{pmatrix}\frac12&amp;\frac12\\\frac12&amp;-\frac12\end{pmatrix}\begin{pmatrix}1\\2\end{pmatrix}=\begin{pmatrix}\frac32\\-\frac12\end{pmatrix}\quad\checkmark$$</p><p>  与直接计算一致 ✓</p><h2 id="center-p-过渡矩阵一定可逆-p-center"><center><p>过渡矩阵一定可逆</p></center></h2><blockquote><p><strong>定理</strong>：过渡矩阵 $P$ 一定可逆。</p></blockquote><p>  <strong>直觉</strong>：既然能&quot;换过去&quot;，当然也能&quot;换回来&quot;——来回一趟等于没换（$P^{-1}P=I$）。</p><p>  <strong>严格理由</strong>：新基也线性无关，所以 $P$ 的列线性无关，所以 $P$ 满秩，所以可逆。</p><p>  <strong>反过来的过渡矩阵</strong>：从新基到旧基的过渡矩阵是 $P^{-1}$，坐标公式变成 $\vec y=P\vec x$。</p><h2 id="center-p-把算例推广：为什么-左乘还是右乘-p-center"><center><p>把算例推广：为什么&quot;左乘还是右乘&quot;</p></center></h2><p>  <strong>这是最容易搞错的地方</strong>。两个公式：</p><table><thead><tr><th>关系</th><th>表达式</th></tr></thead><tbody><tr><td><strong>基</strong>如何变</td><td>$(\vec u)=(\vec e)P$（<strong>右乘</strong>）</td></tr><tr><td><strong>坐标</strong>如何变</td><td>$\vec x=P\vec y$（<strong>左乘</strong>）</td></tr></tbody></table><p>  <strong>为什么方向相反</strong>：因为&quot;同一个 $\vec v$&quot;，两种表达必须相等：</p><p>$$(\vec e)\vec x=(\vec u)\vec y=(\vec e)P\vec y$$</p><p>  所以 $\vec x=P\vec y$——<strong>基右乘 $P$ 意味着坐标左乘 $P$</strong>。</p><div class="note info flat"><p><strong>一个违反直觉的推论</strong></p><p>  若 $P$ 把新基映到旧基（$(\vec u)=(\vec e)P$），那么<strong>它把新坐标变成旧坐标</strong>，而不是旧坐标变新坐标。</p><p>  <strong>换句话说</strong>：$P$ 的&quot;作用方向&quot;和&quot;它表示的方向&quot;相反。</p><p>  <strong>实用记忆</strong>：&quot;<strong>矩阵描述的基变换方向，与它执行的方向相反。</strong>&quot;</p><p>  <strong>具体检查方法</strong>：取 $\vec y=(1,0,\dots,0)$，看 $P\vec y$ 是不是 $\vec u_1$ 在旧基下的坐标。</p></div><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：把过渡矩阵的列写成行</strong></p><p>  $P$ 的第 $j$ <strong>列</strong>是 $\vec u_j$ 的旧坐标。<strong>写成行就错</strong>。</p><p><strong>错误二：方向搞反</strong></p><p>  是 $\vec x=P\vec y$（新 ⟶ 旧），不是 $\vec y=P\vec x$。</p><p>  <strong>验算</strong>：取一个新基向量，看结果对不对。</p><p><strong>错误三：以为任意两个基之间都能用同一个 $P$</strong></p><p>  $P$ 依赖于<strong>选的哪两个基</strong>——换一对基，$P$ 就变。</p><p><strong>错误四：用行列式判断可逆时算错</strong></p><p>  $P$ 一定是方阵（新旧基维数相同），所以 $|P|$ 有意义。但它超常见的是 $\pm1$ 或简单值，<strong>算错符号会导致下一步方向反</strong>。</p><p><strong>错误五：以为&quot;坐标变换&quot;与&quot;线性变换&quot;是一回事</strong></p><p>  <strong>坐标变换</strong>是同一个向量换表示；<strong>线性变换</strong>是向量变另一个向量。</p><p>  两者的矩阵形式都在换基后改变——但变化规律不同（下一章讲）。</p><p><strong>错误六：非标准基时忘了过渡矩阵</strong></p><p>  若新旧基都非标准，$P$ 不能直接用&quot;新基的坐标&quot;，要先转成&quot;旧基的坐标&quot;。</p></div><hr><h1 id="center-p-三、深入：为什么可逆，以及一般情形-p-center"><center><p>三、深入：为什么可逆，以及一般情形</p></center></h1><p>  <strong>（这一部分是严格证明。）</strong></p><h2 id="center-p-过渡矩阵可逆的完整证明-p-center"><center><p>过渡矩阵可逆的完整证明</p></center></h2><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p>  设 $P=(p_{ij})$ 是从 ${\vec e}$ 到 ${\vec u}$ 的过渡矩阵。</p><p>  <strong>要证</strong>：$P$ 的列线性无关。</p><p>  <strong>假设</strong>有系数 $\lambda_1,\dots,\lambda_n$ 使</p><p>$$\sum_{j=1}^{n}\lambda_j\cdot(\text{第 }j\text{ 列})=\vec 0$$</p><p>  也就是说，把 $P\vec\lambda=\vec 0$ 看成旧基下的坐标：</p><p>$$(\vec u_1,\dots,\vec u_n)\vec\lambda=(\vec e_1,\dots,\vec e_n)P\vec\lambda=(\vec e_1,\dots,\vec e_n)\vec 0=\vec 0$$</p><p>  即</p><p>$$\lambda_1\vec u_1+\cdots+\lambda_n\vec u_n=\vec 0$$</p><p>  <strong>但 $\vec u_1,\dots,\vec u_n$ 是基，线性无关</strong>，所以 $\lambda_1=\cdots=\lambda_n=0$ ✓</p><p>  于是 $P\vec\lambda=\vec 0$ 只有零解，$P$ 可逆 ✓ $\blacksquare$</p><p>  <strong>这个证明的关键</strong>：把&quot;$P$ 的列无关&quot;翻译成&quot;$\vec u$ 无关&quot;——而 $\vec u$ 无关是已知的。</p>              </div>            </details><h2 id="center-p-一般基之间的过渡-p-center"><center><p>一般基之间的过渡</p></center></h2><p>  如果旧基 ${\vec e}$ <strong>不是标准基</strong>呢？</p><p>  <strong>做法</strong>：分两步</p><ol><li>把 ${\vec e}$ 的过渡矩阵记作 $Q$（从标准基到 ${\vec e}$）</li><li>把 ${\vec u}$ 的过渡矩阵记作 $R$（从标准基到 ${\vec u}$）</li></ol><p>  则从 ${\vec e}$ 到 ${\vec u}$ 的过渡矩阵是</p><p>$$P=Q^{-1}R$$</p><p>  <strong>推导</strong>：由 $(\vec u)=(\vec s)R$ 与 $(\vec e)=(\vec s)Q$，其中 $\vec s$ 是标准基。</p><p>  把 $(\vec s)=(\vec e)Q^{-1}$ 代入第一式：$(\vec u)=(\vec e)Q^{-1}R$ ✓</p><p>  <strong>实用含义</strong>：<strong>先转到标准基，再转到目标基</strong>——不要试图一步到位。</p><h2 id="center-p-矩阵的相似-p-center"><center><p>矩阵的相似</p></center></h2><p>  <strong>预告下一章的核心概念</strong>：若 $A$ 与 $B$ 是同一线性变换在两组基下的矩阵，则</p><p>$$B=P^{-1}AP$$</p><p>  其中 $P$ 是过渡矩阵。这叫 <strong>$A$ 与 $B$ 相似</strong>，记作 $A\sim B$。</p><p>  <strong>注意与坐标变换的区别</strong>：</p><table><thead><tr><th>对象</th><th>公式</th><th>含义</th></tr></thead><tbody><tr><td><strong>坐标</strong></td><td>$\vec y=P^{-1}\vec x$</td><td>同一个向量换表示</td></tr><tr><td><strong>矩阵</strong></td><td>$B=P^{-1}AP$</td><td>同一个变换换表示</td></tr></tbody></table><p>  <strong>两者的 $P$ 方向不同</strong>：坐标变换用 $P^{-1}$（左乘），矩阵变换用 $P^{-1}\cdot P$（两边夹）。</p><p>  <strong>为什么矩阵是&quot;两边夹&quot;</strong>：因为变换要&quot;先转到旧基、做变换、再转回来&quot;：</p><p>$$\vec y\xrightarrow{P}\vec x\xrightarrow{A}A\vec x\xrightarrow{P^{-1}}P^{-1}A\vec x=P^{-1}AP\vec y$$</p><h2 id="center-p-相似的不变量-p-center"><center><p>相似的不变量</p></center></h2><p>  <strong>相似矩阵有很多共同点</strong>——这些叫<strong>相似不变量</strong>：</p><table><thead><tr><th>不变量</th><th>为什么</th></tr></thead><tbody><tr><td><strong>行列式</strong></td><td>$\det(P^{-1}AP)=\det(P^{-1})\det A\det P=\det A$</td></tr><tr><td><strong>迹</strong></td><td>$\operatorname{tr}(P^{-1}AP)=\operatorname{tr}(AP^{-1}P)=\operatorname{tr}A$</td></tr><tr><td><strong>特征值</strong></td><td>特征多项式相同（第 5 章证）</td></tr><tr><td><strong>秩</strong></td><td>可逆矩阵乘法不改变秩</td></tr></tbody></table><p>  <strong>这就是为什么特征值是&quot;变换本身的性质&quot;</strong>，而不是&quot;矩阵的性质&quot;——换基不改变它。</p><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：从坐标系到矩阵代数-p-center"><center><p>历史：从坐标系到矩阵代数</p></center></h2><p>  <strong>&quot;换基&quot;这个思想的演化很有意思。</strong></p><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1637</td><td>笛卡尔</td><td>坐标系（解析几何的起点）</td></tr><tr><td>1683</td><td>关孝和（日本）</td><td>行列式的雏形</td></tr><tr><td>1858</td><td>凯莱</td><td>矩阵代数，注意到 $P^{-1}AP$</td></tr><tr><td>1870s</td><td>若尔当</td><td>标准型理论</td></tr><tr><td>1920s</td><td>外尔</td><td>群表示论（换基的抽象化）</td></tr></tbody></table><p>  <strong>关键洞察来自凯莱</strong>：他发现同一个变换在不同坐标系下的矩阵之间有 $P^{-1}AP$ 的关系。</p><p>  <strong>这个观察引出了&quot;相似不变量&quot;的概念</strong>——正是现代代数的核心。</p><div class="note info flat"><p><strong>关孝和的《解伏题之法》</strong></p><p>  <strong>1683 年，日本的关孝和（Seki Takakazu）独立发现了行列式</strong>，用来解线性方程组。</p><p>  这比莱布尼茨（1693）还要早十年——<strong>但两人都不知道对方的成果</strong>。</p><p>  <strong>这提醒我们</strong>：数学的发展常常是<strong>平行进行的</strong>——不同地方的人会在相近的时间发现同一个东西。</p><p>  <strong>原因</strong>：问题本身的&quot;要发生&quot;，比&quot;谁先想到&quot;更决定时间点。</p></div><h2 id="center-p-联系：计算机图形学里的-模型-视图-投影-p-center"><center><p>联系：计算机图形学里的&quot;模型-视图-投影&quot;</p></center></h2><p>  <strong>图形学里最重要的公式就是这个</strong>：</p><p>$$\vec p_{\text{screen}}=P\cdot V\cdot M\cdot\vec p_{\text{model}}$$</p><p>  <strong>四组坐标</strong>：</p><table><thead><tr><th>坐标</th><th>含义</th></tr></thead><tbody><tr><td><strong>模型坐标</strong></td><td>物体自己的坐标系</td></tr><tr><td><strong>世界坐标</strong></td><td>场景统一坐标</td></tr><tr><td><strong>视图坐标</strong></td><td>相机视角</td></tr><tr><td><strong>屏幕坐标</strong></td><td>像素位置</td></tr></tbody></table><p>  <strong>每个矩阵都是一次换基</strong>——从一个坐标系到下一个。</p><p>  <strong>这就是为什么 GPU 要专门优化矩阵乘法</strong>：一帧要处理几百万个顶点，每个都要乘三个 $4\times4$ 矩阵。</p><p>  <strong>对照本节</strong>：$M$、$V$、$P$ 就是三个过渡矩阵，只是不一定是正交的（投影矩阵会压缩维度）。</p><h2 id="center-p-应用：QR-分解与-正交基-p-center"><center><p>应用：QR 分解与&quot;正交基&quot;</p></center></h2><p>  <strong>问题</strong>：如果新基是<strong>正交基</strong>，坐标变换会变简单吗？</p><p>  <strong>答案</strong>：会！因为对正交矩阵 $Q$：</p><p>$$Q^{-1}=Q^{\top}$$</p><p>  所以 $\vec y=Q^{\top}\vec x$——<strong>求逆变成转置</strong>，计算量从 $O(n^3)$ 降到 $O(n^2)$。</p><p>  <strong>这就是 Gram-Schmidt 正交化的价值</strong>：它构造一组正交基，然后：</p><p>$$A=QR,\qquad Q\text{ 正交},\ R\text{ 上三角}$$</p><p>  <strong>QR 分解的用途</strong>：</p><ul><li><strong>最小二乘</strong>：解 $Ax\approx b$ 时，$Rx=Q^{\top}b$（上三角，回代即可）</li><li><strong>特征值算法</strong>：QR 迭代（反复做 $A=QR$, $A\gets RQ$）会收敛到对角形</li><li><strong>数值稳定性</strong>：正交变换不放大误差</li></ul><p>  <strong>与 1.1 节的 LU 对比</strong>：LU 用消元（主元），QR 用正交化（保长度）。<strong>QR 更稳，但更慢</strong>。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 3 章线性映射。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 4 章正交性。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>过渡矩阵</strong></td><td>$(\vec u)=(\vec e)P$，$P$ 的第 $j$ 列 $=\vec u_j$ 的旧坐标</td></tr><tr><td><strong>坐标变换</strong></td><td>$\vec x=P\vec y$（<strong>新乘 $P$ 得旧</strong>）</td></tr><tr><td><strong>可逆性</strong></td><td>$P$ 必然可逆（由新基线性无关推出）</td></tr><tr><td><strong>一般基之间</strong></td><td>$P=Q^{-1}R$（先到标准基）</td></tr><tr><td><strong>相似公式</strong></td><td>$B=P^{-1}AP$（两边夹，与坐标变换方向不同）</td></tr><tr><td><strong>相似不变量</strong></td><td>行列式、迹、特征值、秩</td></tr><tr><td><strong>正交基</strong></td><td>$Q^{-1}=Q^{\top}$，求逆变转置</td></tr></tbody></table><div class="note info flat"><p><strong>第 1 章收尾</strong></p><p>本章讲完了<strong>线性方程组、向量空间、基变换</strong>这三件事。</p><p>  <strong>共同的主线</strong>：<strong>同一个对象，不同的&quot;描述方式&quot;</strong>。</p><table><thead><tr><th>描述方式</th><th>对象</th></tr></thead><tbody><tr><td>方程组</td><td>解集</td></tr><tr><td>基 + 坐标</td><td>向量</td></tr><tr><td>过渡矩阵</td><td>换描述方式</td></tr></tbody></table><p>  <strong>而所有描述方式之间，都用一个矩阵联系。</strong></p><p>  <strong>下一章</strong>（第 2 章：线性变换与矩阵表示）会把这个思想推进到核心：</p><blockquote><p><strong>线性变换是本质的，矩阵只是它在一组基下的&quot;影子&quot;。</strong></p></blockquote></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第三章线性空间，第四节基变换。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 2 章基与维数。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 4 章正交性。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;换一套尺子量同一根棍子&quot;理解坐标变换；②过渡矩阵与坐标变换公式；③为什么过渡矩阵一定可逆、以及&quot;左乘还是右乘&quot;的判定；④历史、与计算机图形学、QR 分解的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 1.2：向量空间与线性相关性——把&quot;独立&quot;说清楚</title>
    <link href="https://hsmk.mikufans.date/posts/845b7a3f.html"/>
    <id>https://hsmk.mikufans.date/posts/845b7a3f.html</id>
    <published>2026-11-22T16:15:00.000Z</published>
    <updated>2026-11-22T16:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li>1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚（本篇）</li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;配颜色&quot;的直觉理解线性组合</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——向量空间、相关/无关、基与维数</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;维数为什么唯一&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、函数空间、信号处理感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：几种原料能配出什么-p-center"><center><p>一、基础：几种原料能配出什么</p></center></h1><p>  <strong>（这一部分只需要知道&quot;向量&quot;是有方向的箭头，或者一串数。）</strong></p><h2 id="center-p-配颜色-p-center"><center><p>配颜色</p></center></h2><p>  假设你只有<strong>红色</strong>和<strong>绿色</strong>两种涂料。</p><p>  <strong>问</strong>：你能配出哪些颜色？</p><p>  <strong>答案</strong>：所有&quot;红绿混合&quot;的颜色——比如 $\frac12$ 红 + $\frac12$ 绿是棕色，$\frac14$ 红 + $\frac34$ 绿是另一种棕。</p><p>  <strong>但配不出蓝色。</strong> 无论怎么混合红和绿，都得不到蓝。</p><p>  <strong>用数学语言说</strong>：</p><p>$$\text{红绿能配出的颜色}={a\cdot\text{红}+b\cdot\text{绿}:a,b\ge0}$$</p><p>  <strong>蓝色不在这集合里。</strong></p><h2 id="center-p-翻译成向量-p-center"><center><p>翻译成向量</p></center></h2><p>  把&quot;颜色&quot;换成向量。设</p><p>$$\vec e_1=\begin{pmatrix}1\\0\end{pmatrix},\qquad \vec e_2=\begin{pmatrix}0\\1\end{pmatrix}$$</p><p>  那么 $\vec e_1$ 和 $\vec e_2$ 能&quot;配出&quot;所有向量：</p><p>$$\vec x=\begin{pmatrix}x\\y\end{pmatrix}=x\vec e_1+y\vec e_2$$</p><p>  <strong>这就是二维平面上每个点。</strong></p><p>  <strong>但</strong>如果我们只有 $\vec e_1$（红色）一个向量，能配出的只有：</p><p>$${a\vec e_1:a\in\mathbb{R}}$$</p><p>  <strong>也就是 $x$ 轴这一条线</strong>——配不出 $y\ne0$ 的点。</p><div class="note info flat"><p><strong>&quot;张成&quot;这个词</strong></p><p>  上面说的&quot;能配出的所有东西&quot;，数学上叫<strong>张成（span）</strong>：</p><p>$$\operatorname{span}{\vec v_1,\dots,\vec v_k}=\left{\sum_{i=1}^{k}\lambda_i\vec v_i:\lambda_i\in\mathbb{R}\right}$$</p><p>  <strong>注意两点</strong>：</p><ol><li><strong>系数可以是负数</strong>（配颜色时不行，但向量可以&quot;反向扣掉&quot;）</li><li><strong>张成总是一个&quot;子空间&quot;</strong>——见 ② 层</li></ol><p>  所以 $\vec e_1$ 张成 $x$ 轴，${\vec e_1,\vec e_2}$ 张成整个平面。</p></div><h2 id="center-p-什么时候-多余的-p-center"><center><p>什么时候&quot;多余的&quot;</p></center></h2><p>  <strong>现在关键问题</strong>：$\vec e_1,\vec e_2$ 两个够用了，那再加一个 $\vec e_3=\begin{pmatrix}1\\1\end{pmatrix}$ 有用吗？</p><p>  <strong>没用</strong>——因为 $\vec e_3=\vec e_1+\vec e_2$，它就是&quot;红+绿&quot;，<strong>不提供任何新颜色</strong>。</p><p>  <strong>这种情况下，我们称 $\vec e_3$ 与 $\vec e_1,\vec e_2$ &quot;线性相关&quot;。</strong></p><p>  <strong>反之</strong>，$\vec e_1$ 与 $\vec e_2$ 谁也配不出对方——它们&quot;线性无关&quot;。</p><div class="note info flat"><p><strong>这就是&quot;线性相关&quot;的本质</strong></p><p>  <strong>一组向量线性相关 ⟺ 其中至少有一个是其余的线性组合。</strong></p><p>  换句话说：<strong>这组向量里有&quot;多余&quot;的。</strong></p><p>  <strong>而我们想要&quot;不多不少&quot;的一组</strong>——那叫<strong>基</strong>。</p><p>  <strong>基的性质</strong>：</p><ul><li>能张成整个空间（够用）</li><li>其中任何一个都不可删（不多余）</li></ul><p>  <strong>基里向量的个数就是维数。</strong></p></div><hr><h1 id="center-p-二、标准：向量空间、相关性与基-p-center"><center><p>二、标准：向量空间、相关性与基</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-向量空间的定义-p-center"><center><p>向量空间的定义</p></center></h2><blockquote><p><strong>定义</strong>：集合 $V$ 配上加法 $+$ 与数乘 $\cdot$（数来自域 $\mathbb{F}$，通常是 $\mathbb{R}$），若满足八条公理，则称 $V$ 是<strong>向量空间</strong>：</p><p><strong>加法</strong>：1. 交换律 2. 结合律 3. 有零元 $\vec 0$ 4. 每个元素有负元<br><strong>数乘</strong>：5. $1\vec v=\vec v$ 6. $(ab)\vec v=a(b\vec v)$<br><strong>分配律</strong>：7. $a(\vec u+\vec v)=a\vec u+a\vec v$ 8. $(a+b)\vec v=a\vec v+b\vec v$</p></blockquote><p>  <strong>注意：定义里没有提&quot;箭头&quot;&quot;长度&quot;&quot;角度&quot;。</strong></p><p>  <strong>所以向量空间不一定是几何向量</strong>：</p><table><thead><tr><th>对象</th><th>加法</th><th>数乘</th></tr></thead><tbody><tr><td>$\mathbb{R}^n$ 中的列向量</td><td>分量相加</td><td>分量乘</td></tr><tr><td>多项式 $P_n$</td><td>系数相加</td><td>系数乘</td></tr><tr><td>连续函数 $C[a,b]$</td><td>函数值相加</td><td>函数值乘</td></tr><tr><td>$m\times n$ 矩阵</td><td>矩阵相加</td><td>数乘矩阵</td></tr></tbody></table><p>  <strong>它们都是向量空间</strong>——只要满足那八条。</p><h2 id="center-p-线性相关与线性无关-p-center"><center><p>线性相关与线性无关</p></center></h2><blockquote><p><strong>定义</strong>：向量组 $\vec v_1,\dots,\vec v_k$ <strong>线性相关</strong>，若存在<strong>不全为零</strong>的数 $\lambda_1,\dots,\lambda_k$ 使</p><p>$$\lambda_1\vec v_1+\cdots+\lambda_k\vec v_k=\vec 0$$</p><p>否则称<strong>线性无关</strong>。</p></blockquote><p>  <strong>等价说法</strong>：$\vec v_1,\dots,\vec v_k$ 线性无关 ⟺ 方程</p><p>$$\lambda_1\vec v_1+\cdots+\lambda_k\vec v_k=\vec 0$$</p><p><strong>只有零解</strong> $\lambda_1=\cdots=\lambda_k=0$。</p><div class="note info flat"><p><strong>为什么&quot;不全为零&quot;这个说法很妙</strong></p><p>  如果只要求&quot;存在系数使组合为零&quot;，那么<strong>零系数永远满足</strong>——没意义。</p><p>  要求&quot;<strong>不全为零</strong>&quot;就排除了这个平凡解：</p><ul><li><strong>相关</strong>：除了全零解，还有别的解 ⟹ 有多余的向量</li><li><strong>无关</strong>：只有全零解 ⟹ 没有多余的</li></ul><p>  <strong>与 1.1 节呼应</strong>：这正是齐次线性方程组&quot;有非零解 ⟺ 系数矩阵的列线性相关&quot;。</p></div><h2 id="center-p-几个即时推论-p-center"><center><p>几个即时推论</p></center></h2><p>  <strong>推论 1</strong>：含零向量的组一定线性相关（取 $\vec 0$ 的系数为 1，其余为 0）。</p><p>  <strong>推论 2</strong>：单个非零向量线性无关。</p><p>  <strong>推论 3</strong>：两个向量线性相关 ⟺ 它们成比例（共线）。</p><p>  <strong>推论 4</strong>：$\mathbb{R}^n$ 中超过 $n$ 个向量<strong>必</strong>线性相关。</p><p>  <strong>推论 5</strong>：若一组无关，则它的任何子组也无关。</p><h2 id="center-p-基与维数-p-center"><center><p>基与维数</p></center></h2><blockquote><p><strong>定义</strong>：向量空间 $V$ 的一组向量 ${\vec e_1,\dots,\vec e_n}$ 称为<strong>基</strong>，若</p><ol><li>它们<strong>线性无关</strong></li><li>它们<strong>张成</strong> $V$（即 $V$ 中每个向量都能写成它们的线性组合）</li></ol></blockquote><p>  <strong>定理</strong>：$V$ 的任何两个基所含向量个数相同。这个数叫 $V$ 的<strong>维数</strong>，记作 $\dim V$。</p><p>  <strong>例</strong>：</p><table><thead><tr><th>空间</th><th>一组基</th><th>维数</th></tr></thead><tbody><tr><td>$\mathbb{R}^n$</td><td>标准基 $\vec e_1,\dots,\vec e_n$</td><td>$n$</td></tr><tr><td>次数 $\le n$ 的多项式 $P_n$</td><td>$1,x,x^2,\dots,x^n$</td><td>$n+1$</td></tr><tr><td>$m\times n$ 矩阵</td><td>$E_{ij}$（只有一个 1）</td><td>$mn$</td></tr><tr><td>$\mathbb{C}$ 看成 $\mathbb{R}$ 上</td><td>$1,\mathrm{i}$</td><td>2</td></tr></tbody></table><p>  <strong>注意最后一行</strong>：$\mathbb{C}$ 作为 $\mathbb{R}$ 上的向量空间是 2 维的！<strong>维数依赖于&quot;数域&quot;的选择。</strong></p><h2 id="center-p-坐标-p-center"><center><p>坐标</p></center></h2><p>  <strong>基的最大用处</strong>：把抽象向量变成<strong>坐标</strong>。</p><p>  若 ${\vec e_1,\dots,\vec e_n}$ 是基，则任何 $\vec v$ 有<strong>唯一</strong>的表示</p><p>$$\vec v=x_1\vec e_1+\cdots+x_n\vec e_n$$</p><p>  <strong>唯一性</strong>来自线性无关：若有两个表示，相减得</p><p>$$(x_1-y_1)\vec e_1+\cdots+(x_n-y_n)\vec e_n=\vec 0$$</p><p>  由无关性，全部系数为 0，所以 $x_i=y_i$ ✓</p><p>  $(x_1,\dots,x_n)$ 就叫 $\vec v$ 在这组基下的<strong>坐标</strong>。</p><div class="note info flat"><p><strong>&quot;坐标&quot;是相对的</strong></p><p>  同一个向量，换一组基，坐标就变了。</p><p>  <strong>例</strong>：$\vec v=(1,2)$ 在标准基 ${\vec e_1,\vec e_2}$ 下坐标是 $(1,2)$。</p><p>  但在基 ${\vec u_1=(1,1),\vec u_2=(1,-1)}$ 下：</p><p>$$\vec v=\frac{1+2}{2}\vec u_1+\frac{1-2}{2}\vec u_2=\frac32\vec u_1-\frac12\vec u_2$$</p><p>  <strong>坐标是 $\left(\frac32,-\frac12\right)$。</strong></p><p>  <strong>同一个向量，两组坐标。</strong> 这就是为什么下一章要讲&quot;基变换&quot;——<strong>坐标怎么跟着变</strong>。</p></div><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：以为&quot;线性无关&quot;就是&quot;两两不成比例&quot;</strong></p><p>  这只是<strong>必要</strong>条件，不是充分条件。</p><p>  <strong>反例</strong>：$\mathbb{R}^3$ 中 $(1,0,0),(0,1,0),(1,1,0)$ 两两不成比例，但三者共面，<strong>线性相关</strong>。</p><p><strong>错误二：以为&quot;张成整个空间&quot;就自动是基</strong></p><p>  可能有多余的（比如 ${\vec e_1,\vec e_2,\vec e_3}$ 在 $\mathbb{R}^2$ 中张成全部，但相关）。</p><p><strong>错误三：以为维数只由集合决定</strong></p><p>  $\mathbb{C}$ 在 $\mathbb{R}$ 上是 2 维，在 $\mathbb{C}$ 上是 1 维。<strong>维数依赖于数域。</strong></p><p><strong>错误四：混淆&quot;张成&quot;与&quot;包含&quot;</strong></p><p>  $\operatorname{span}{\vec e_1}$ 是<strong>整条 $x$ 轴</strong>，不是单个点 $\vec e_1$。</p><p><strong>错误五：以为零空间 ${\vec 0}$ 维数是 1</strong></p><p>  $\dim{\vec 0}=0$（空集是它的基）。</p><p><strong>错误六：检验相关性时不考虑&quot;负系数&quot;</strong></p><p>  配颜色时系数非负，但<strong>向量组合允许负系数</strong>——这是向量的优势。</p></div><hr><h1 id="center-p-三、深入：维数为什么唯一-p-center"><center><p>三、深入：维数为什么唯一</p></center></h1><p>  <strong>（这一部分是严格证明。）</strong></p><h2 id="center-p-替换定理（Steinitz）-p-center"><center><p>替换定理（Steinitz）</p></center></h2><blockquote><p><strong>定理</strong>：若 $\vec v_1,\dots,\vec v_m$ 线性无关，且每个都能由 $\vec u_1,\dots,\vec u_n$ 线性表示，则 $m\le n$。</p></blockquote><details class="folding-tag" cyan><summary> 证明（用消元的逆过程） </summary>              <div class='content'>              <p>  <strong>思路</strong>：把 $\vec u$ 当作&quot;原料&quot;，$\vec v$ 当作&quot;产品&quot;。定理说：<strong>产品比原料多时，一定有多余。</strong></p><p>  <strong>做法</strong>：从 ${\vec u_1,\dots,\vec u_n}$ 开始，逐个用 $\vec v$ <strong>替换</strong>：</p><p>  <strong>第一步</strong>：$\vec v_1$ 能由 $\vec u$ 表示，且 $\vec v_1\ne\vec 0$（无关），所以某个 $\vec u_i$ 的系数非零。</p><p>  把 $\vec v_1$ 移进来，把那个 $\vec u_i$ 移出去——新的 $n$ 个向量<strong>仍然张成同一空间</strong>。</p><p>  <strong>第 $k$ 步</strong>：$\vec v_1,\dots,\vec v_{k-1}$ 已经替换进去。因为 $\vec v_1,\dots,\vec v_k$ <strong>无关</strong>，$\vec v_k$ 不能被 $\vec v_1,\dots,\vec v_{k-1}$ 表示，所以它必然&quot;依赖&quot;某个还没换出去的 $\vec u_j$。</p><p>  于是可以继续替换。</p><p>  <strong>若 $m&gt;n$</strong>：替换完 $n$ 个之后，还有 $\vec v_{n+1}$ 没进来。但此时集合里只有 $\vec v$，$\vec v_{n+1}$ 能被它们表示——<strong>与线性无关矛盾</strong> ✓</p><p>  故 $m\le n$。$\blacksquare$</p>              </div>            </details><h2 id="center-p-维数唯一性的证明-p-center"><center><p>维数唯一性的证明</p></center></h2><details class="folding-tag" cyan><summary> 由替换定理直接推出 </summary>              <div class='content'>              <p>  设 ${\vec e_1,\dots,\vec e_n}$ 与 ${\vec f_1,\dots,\vec f_m}$ 都是 $V$ 的基。</p><p>  <strong>把替换定理用两次</strong>：</p><ul><li>$\vec f$ 无关，且能被 $\vec e$ 表示 ⟹ $m\le n$</li><li>$\vec e$ 无关，且能被 $\vec f$ 表示 ⟹ $n\le m$</li></ul><p>  所以 $m=n$ ✓ $\blacksquare$</p><p>  <strong>注意这个证明的漂亮之处</strong>：它没有&quot;数&quot;任何东西，<strong>纯靠&quot;能否表示&quot;的传递性</strong>。</p>              </div>            </details><h2 id="center-p-基的判别与扩充-p-center"><center><p>基的判别与扩充</p></center></h2><p>  <strong>定理</strong>（有限维）：若 $\dim V=n$，则</p><ol><li>$n$ 个向量线性无关 ⟺ 它们是基</li><li>$n$ 个向量张成 $V$ ⟺ 它们是基</li></ol><p>  <strong>为什么</strong>：</p><ul><li>无关的 $n$ 个向量，若还不张成，则能补一个进来变成 $n+1$ 个无关向量——与维数矛盾</li><li>张成的 $n$ 个向量，若还相关，则能删掉一个变成 $n-1$ 个仍张成——同样矛盾</li></ul><p>  <strong>推论</strong>（基扩充定理）：任何线性无关组都能扩充成基。</p><h2 id="center-p-无限维-是怎么回事-p-center"><center><p>&quot;无限维&quot;是怎么回事</p></center></h2><p>  若 $V$ 不能被有限个向量张成，就叫<strong>无限维</strong>。</p><p>  <strong>例</strong>：$C[0,1]$（连续函数）——因为 $1,x,x^2,\dots$ 任意多个都线性无关。</p><p>  <strong>但无限维也有&quot;基&quot;</strong>（叫 Hamel 基），只是不能用有限和表示，要用<strong>有限个的任意大</strong>的线性组合——技术上需要<strong>选择公理</strong>。</p><p>  <strong>实用上更关心的是别的概念</strong>：比如傅里叶级数用的是&quot;无穷级数&quot;，那叫<strong>Schauder 基</strong>——它不要求有限和，只要求级数收敛。</p><p>  <strong>这正是「实变函数与泛函分析」系列的内容。</strong></p><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：向量空间概念的诞生-p-center"><center><p>历史：向量空间概念的诞生</p></center></h2><p>  <strong>&quot;向量空间&quot;这个抽象概念非常年轻——比矩阵晚近一百年。</strong></p><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1844</td><td>格拉斯曼</td><td>《线性扩张论》，最早的抽象思想</td></tr><tr><td>1858</td><td>凯莱</td><td>矩阵代数</td></tr><tr><td>1888</td><td>佩亚诺</td><td>公理化向量空间（早于希尔伯特）</td></tr><tr><td><strong>1900s</strong></td><td><strong>希尔伯特</strong></td><td>在积分方程中系统用无限维空间</td></tr><tr><td>1920s</td><td>巴拿赫、冯·诺依曼</td><td>赋范空间、希尔伯特空间的公理化</td></tr><tr><td>1930s</td><td>外尔</td><td>把表示论建立在向量空间上</td></tr></tbody></table><p>  <strong>关键一步是&quot;把箭头扔掉&quot;</strong>：</p><p>  19 世纪的数学家在 $\mathbb{R}^3$ 里用向量，但他们把&quot;向量&quot;理解成&quot;有长度跟方向的箭头&quot;。</p><p>  <strong>佩亚诺 1888 说</strong>：不需要箭头！只要满足那八条公理，就叫向量空间。</p><p>  <strong>这一步的意义</strong>：它让<strong>函数</strong>也能当向量——因为函数也满足那八条。</p><div class="note info flat"><p><strong>格拉斯曼的悲剧</strong></p><p>  <strong>赫尔曼·格拉斯曼（1809–1877）是德国中学教师</strong>，业余研究数学。</p><p>  1844 年他出版《线性扩张论》，里面已经有<strong>外积</strong>（今天的楔积）和<strong>高维空间</strong>的思想——比当时的数学界超前几十年。</p><p>  <strong>但书太难读</strong>（他拒绝用图示、记号也古怪），<strong>几乎没人理解</strong>。</p><p>  直到 1862 年他改写了一个易懂的版本，才逐渐被认可。</p><p>  <strong>今天</strong>：格拉斯曼流形（Grassmannian）、外代数都以他命名，而<strong>外积正是微分形式的基础</strong>（数学分析 3.7 节）。</p></div><h2 id="center-p-联系：函数空间的-基-p-center"><center><p>联系：函数空间的&quot;基&quot;</p></center></h2><p>  <strong>傅里叶级数其实是&quot;函数空间里的基展开&quot;</strong>（呼应数学分析 4.4）。</p><p>  <strong>对照表</strong>：</p><table><thead><tr><th>$\mathbb{R}^n$</th><th>$L^2[-\pi,\pi]$</th></tr></thead><tbody><tr><td>向量 $\vec v$</td><td>函数 $f$</td></tr><tr><td>标准基 $\vec e_k$</td><td>$\cos nx$、$\sin nx$</td></tr><tr><td>内积 $\vec u\cdot\vec v$</td><td>$\int u\bar v$</td></tr><tr><td>坐标 $x_k=\vec v\cdot\vec e_k$</td><td>$a_n=\frac1\pi\int f\cos nx$</td></tr><tr><td>范数 $\sqrt{\sum x_k^2}$</td><td>$\sqrt{\int</td></tr><tr><td>Parseval：$\sum x_k^2=\lVert\vec v\rVert^2$</td><td>Parseval：$\sum a_n^2=\frac1\pi\int f^2$</td></tr></tbody></table><p>  <strong>所以傅里叶系数就是&quot;坐标&quot;</strong>——只是坐标有无穷多个。</p><p>  <strong>这与 1.1 节的&quot;无穷多解&quot;不同</strong>：那里是&quot;解集含无穷多元素&quot;，这里是&quot;坐标有无限多分量&quot;。</p><p>  <strong>这个类比是泛函分析的起点</strong>——希尔伯特空间就是&quot;无穷维的欧氏空间&quot;。</p><h2 id="center-p-应用：信号处理里的-基-p-center"><center><p>应用：信号处理里的&quot;基&quot;</p></center></h2><p>  <strong>信号处理的核心问题</strong>：用哪组基表示信号？</p><table><thead><tr><th>基</th><th>用途</th><th>特点</th></tr></thead><tbody><tr><td><strong>傅里叶基</strong></td><td>平稳信号</td><td>频率分辨率好，时间分辨率差</td></tr><tr><td><strong>小波基</strong></td><td>非平稳、突变</td><td>时频兼顾</td></tr><tr><td><strong>DCT</strong>（离散余弦）</td><td>JPEG 压缩</td><td>能量集中，适合图像</td></tr><tr><td><strong>字典学习</strong></td><td>稀疏表示</td><td>数据自适应</td></tr></tbody></table><p>  <strong>核心思想都一样</strong>：换一组基，让信号&quot;稀疏&quot;——<strong>大部分坐标接近 0</strong>。</p><p>  <strong>为什么重要</strong>：稀疏就意味着<strong>压缩</strong>。JPEG 能压到 1/10 大小，就是因为 DCT 基让图像变稀疏。</p><p>  <strong>这就是&quot;基的选择&quot;在实际工程里的价值</strong>——同一个信号，换基后的坐标完全不同。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 2 章有限维向量空间。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 3 章向量空间与子空间。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>线性组合</strong></td><td>$\sum\lambda_i\vec v_i$，系数可负</td></tr><tr><td><strong>张成</strong></td><td>所有可能的线性组合，是一个子空间</td></tr><tr><td><strong>线性相关</strong></td><td>存在不全为零的系数使组合为 $\vec 0$ ⟺ 有多余的</td></tr><tr><td><strong>线性无关</strong></td><td>只有零解</td></tr><tr><td><strong>基</strong></td><td>无关 + 张成；个数 = 维数</td></tr><tr><td><strong>坐标</strong></td><td>在给定基下的唯一表示系数</td></tr><tr><td><strong>维数唯一</strong></td><td>由替换定理推出（$m\le n$ 且 $n\le m$）</td></tr><tr><td><strong>数域影响维数</strong></td><td>$\mathbb{C}$ 在 $\mathbb{R}$ 上 2 维，在 $\mathbb{C}$ 上 1 维</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>有了基与坐标，下一步就是问：</p><blockquote><p><strong>换一组基，坐标怎么变？</strong></p></blockquote><p>  这引出<strong>过渡矩阵</strong>——一个把&quot;旧坐标&quot;变成&quot;新坐标&quot;的矩阵。</p><p>  而更根本的问题是：</p><blockquote><p><strong>线性变换本身</strong>在换基后怎么变？</p></blockquote><p>  答案会揭示一个核心思想：<strong>变换是本质的，矩阵只是它的&quot;服装&quot;。</strong></p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第三章线性空间。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 2 章。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 3 章。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;几种原料能不能配出某种颜色&quot;理解线性组合与张成；②向量空间公理、线性相关/无关、基与维数；③维数唯一性的严格证明；④历史、函数空间与信号处理的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数 1.1：线性方程组——高斯消元到底在做什么</title>
    <link href="https://hsmk.mikufans.date/posts/6c6d974.html"/>
    <id>https://hsmk.mikufans.date/posts/6c6d974.html</id>
    <published>2026-11-22T12:25:00.000Z</published>
    <updated>2026-11-22T12:25:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>高等代数 导航栏</strong></p><ul><li><a href="/posts/baee07cd.html">系列总览与导航</a><br>第 1 章 线性方程组与矩阵<ul><li>1.1 线性方程组：高斯消元到底在做什么（本篇）</li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用平面上的直线交点建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——消元法、秩、解的判定</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;行变换为什么不改变解&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、数值稳定性感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：两条直线交于一点-p-center"><center><p>一、基础：两条直线交于一点</p></center></h1><p>  <strong>（这一部分只需要会解二元一次方程组。）</strong></p><h2 id="center-p-方程组的几何意义-p-center"><center><p>方程组的几何意义</p></center></h2><p>  考虑两个方程</p><p>$$\begin{cases}2x+y=4\\ x-y=1\end{cases}$$</p><p>  <strong>每个方程都是一条直线。</strong> 第一个方程说&quot;$(x,y)$ 必须在这条线上&quot;，第二个说&quot;必须在那条线上&quot;。</p><p>  <strong>所以解方程组 = 找两条直线的交点。</strong></p><p>  用代入法：由第二式 $y=x-1$，代入第一式得 $2x+(x-1)=4$，即 $3x=5$，$x=\frac53$。</p><p>  于是 $y=\frac23$。<strong>解是唯一的</strong> ✓</p><h2 id="center-p-情况不止一种-p-center"><center><p>情况不止一种</p></center></h2><p>  两条直线的关系有三种：</p><table><thead><tr><th>关系</th><th>方程组的解</th><th>例子</th></tr></thead><tbody><tr><td><strong>相交</strong></td><td><strong>唯一解</strong></td><td>$x+y=2$，$x-y=0$</td></tr><tr><td><strong>平行</strong></td><td><strong>无解</strong></td><td>$x+y=1$，$x+y=2$</td></tr><tr><td><strong>重合</strong></td><td><strong>无穷多解</strong></td><td>$x+y=1$，$2x+2y=2$</td></tr></tbody></table><p>  <strong>注意后两种</strong>：</p><ul><li><strong>无解</strong>：两条线平行，永远不会碰</li><li><strong>无穷多解</strong>：其实是同一条线，线上每一点都是解</li></ul><p>  <strong>这三句话在三维、$n$ 维里同样成立</strong>——只是&quot;直线&quot;变成&quot;平面&quot;或&quot;超平面&quot;。</p><div class="note info flat"><p><strong>为什么&quot;无穷多解&quot;不是&quot;没答案&quot;</strong></p><p>  初学者常觉得&quot;无穷多解&quot;等于&quot;没解出来&quot;。</p><p>  <strong>但数学上它是一个完美的答案</strong>——<strong>所有解都可以用一个公式写出来</strong>。</p><p>  比如 $x+y=1$，解集是 ${(t,1-t):t\in\mathbb{R}}$——<strong>一个自由参数 $t$，所有解都在里面</strong>。</p><p>  <strong>这就叫&quot;通解&quot;</strong>——本文后面会讲怎么系统地写出它。</p></div><h2 id="center-p-为什么关心方程组-p-center"><center><p>为什么关心方程组</p></center></h2><p>  <strong>线性方程组是最基本的数学模型</strong>：</p><ul><li>电路分析（基尔霍夫定律）</li><li>结构力学（节点受力平衡）</li><li>数据拟合（最小二乘）</li><li>有限元（刚度矩阵方程 $Ku=f$）</li></ul><p>  <strong>而且它几乎是所有高等代数概念的来源</strong>：</p><table><thead><tr><th>概念</th><th>从方程组来</th></tr></thead><tbody><tr><td>矩阵</td><td>系数排成的表</td></tr><tr><td>秩</td><td>有效方程的个数</td></tr><tr><td>行列式</td><td>唯一解存在的判据</td></tr><tr><td>向量空间</td><td>所有可能的右端项</td></tr><tr><td>特征值</td><td>特殊情形（$Ax=\lambda x$）</td></tr></tbody></table><p>  <strong>所以从这里开始是对的。</strong></p><hr><h1 id="center-p-二、标准：高斯消元、秩与解的判定-p-center"><center><p>二、标准：高斯消元、秩与解的判定</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-矩阵与增广矩阵-p-center"><center><p>矩阵与增广矩阵</p></center></h2><p>  方程组</p><p>$$\begin{cases}a_{11}x_1+\cdots+a_{1n}x_n=b_1\\ \vdots\\ a_{m1}x_1+\cdots+a_{mn}x_n=b_m\end{cases}$$</p><p>  写成矩阵形式：</p><p>$$A\vec x=\vec b,\qquad A=(a_{ij})\in\mathbb{R}^{m\times n}$$</p><p>  <strong>增广矩阵</strong>：把 $\vec b$ 加到 $A$ 右边，记作 $(A|\vec b)$。</p><h2 id="center-p-初等行变换-p-center"><center><p>初等行变换</p></center></h2><p>  <strong>三种操作</strong>：</p><ol><li><strong>交换</strong>两行</li><li><strong>某行乘以非零常数</strong></li><li><strong>某行加上另一行的倍数</strong></li></ol><p>  <strong>核心定理</strong>：<strong>初等行变换不改变方程组的解集。</strong></p><p>  <strong>（这就是为什么可以&quot;消元&quot;——每一步都是等价变形。）</strong></p><h2 id="center-p-高斯消元-p-center"><center><p>高斯消元</p></center></h2><p>  <strong>目标</strong>：把矩阵化成<strong>行阶梯形</strong>（每行的首个非零元素依次向右）。</p><p>  <strong>步骤</strong>：</p><ol><li>第一列找一个非零元作主元</li><li>用它消去下面的元素</li><li>移到第二列，重复</li><li>最后回代求解</li></ol><p><strong>例</strong>：</p><p>$$(A|\vec b)=\begin{pmatrix}2&amp;1&amp;4\\ 1&amp;-1&amp;1\end{pmatrix}\xrightarrow{R_2-\frac12R_1}\begin{pmatrix}2&amp;1&amp;4\\ 0&amp;-\frac32&amp;-1\end{pmatrix}$$</p><p>  回代：$-\frac32y=-1$ ⟹ $y=\frac23$；$2x+\frac23=4$ ⟹ $x=\frac53$ ✓</p><h2 id="center-p-秩与解的判定-p-center"><center><p>秩与解的判定</p></center></h2><p>  <strong>定义</strong>：矩阵的<strong>秩</strong> $\operatorname{rank}(A)$ = 行阶梯形中非零行的个数。</p><blockquote><p><strong>判定定理</strong>：对 $A\vec x=\vec b$（$A$ 是 $m\times n$），</p><ol><li>$\operatorname{rank}(A)&lt;\operatorname{rank}(A|\vec b)$ ⟹ <strong>无解</strong></li><li>$\operatorname{rank}(A)=\operatorname{rank}(A|\vec b)=n$ ⟹ <strong>唯一解</strong></li><li>$\operatorname{rank}(A)=\operatorname{rank}(A|\vec b)&lt;n$ ⟹ <strong>无穷多解</strong>（$n-r$ 个自由参数）</li></ol></blockquote><p>  <strong>直觉解释</strong>：</p><ul><li>情况 1：方程之间<strong>矛盾</strong>（比如 $x+y=1$ 与 $x+y=2$ 一起）</li><li>情况 2：方程&quot;够多且独立&quot;</li><li>情况 3：有<strong>冗余方程</strong>，剩下 $n-r$ 个变量可以自由取</li></ul><div class="note info flat"><p><strong>秩到底在说什么</strong></p><p>  <strong>秩 = 有效方程的个数 = 线性无关的行的最大个数。</strong></p><p>  <strong>例</strong>：三个方程</p><p>$$x+y+z=1,\quad 2x+2y+2z=2,\quad x-y=0$$</p><p>  第二个方程是第一个的 2 倍——<strong>没有提供新信息</strong>。</p><p>  所以有效方程只有 <strong>2 个</strong>，而变量有 <strong>3 个</strong> ⟹ <strong>无穷多解</strong>（$3-2=1$ 个自由参数）。</p><p>  <strong>自由参数怎么选</strong>：取&quot;非主元列&quot;对应的变量，通常是 $z$。于是</p><p>$$x=y,\qquad 2x+z=1\ \Longrightarrow\ x=\frac{1-z}{2}$$</p><p>  <strong>通解</strong>：$\left(\dfrac{1-t}{2},\dfrac{1-t}{2},t\right)$，$t\in\mathbb{R}$ ✓</p></div><h2 id="center-p-齐次与非齐次-p-center"><center><p>齐次与非齐次</p></center></h2><p>  <strong>齐次</strong>：$A\vec x=\vec 0$——<strong>永远有零解</strong>。</p><p>  <strong>非齐次</strong>：$A\vec x=\vec b$——<strong>可能无解</strong>。</p><p>  <strong>关键关系</strong>（下一章会严格证明）：</p><blockquote><p>非齐次的通解 = <strong>一个特解</strong> + <strong>齐次的通解</strong></p></blockquote><p>  <strong>例</strong>：上面那个方程组，特解取 $t=0$ 得 $\left(\frac12,\frac12,0\right)$；齐次解是 $A\vec x=0$ 的 $t$ 方向。</p><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：消元时用了&quot;非初等&quot;操作</strong></p><p>  比如&quot;把第一行减去第二行，<strong>同时</strong>把第二行减去第一行&quot;——这<strong>不是</strong>初等行变换（同时改两行），可能改变解集。</p><p>  <strong>正确做法</strong>：一次只改一行。</p><p><strong>错误二：以为&quot;方程个数 ≥ 变量个数&quot;就有唯一解</strong></p><p>  还要看<strong>秩</strong>。三个方程可能只有两个独立。</p><p><strong>错误三：行变换写成列变换</strong></p><p>  <strong>初等行变换保持解集，初等列变换不保持</strong>（列变换相当于换变量，会改变解）。</p><p><strong>错误四：混淆&quot;无穷多解&quot;与&quot;无解&quot;</strong></p><p>  判据是 $\operatorname{rank}(A)$ 与 $\operatorname{rank}(A|\vec b)$ 是否相等。</p><p><strong>错误五：用 $|A|$ 判断非方阵方程组</strong></p><p>  行列式只对方阵有定义。非方阵没有&quot;$|A|$&quot;。</p><p><strong>错误六：求解后不回代检验</strong></p><p>  把解代回原方程——这是最便宜的检错。</p></div><hr><h1 id="center-p-三、深入：行变换为什么保持解集-p-center"><center><p>三、深入：行变换为什么保持解集</p></center></h1><p>  <strong>（这一部分是严格证明。）</strong></p><h2 id="center-p-三种初等行变换的证明-p-center"><center><p>三种初等行变换的证明</p></center></h2><details class="folding-tag" cyan><summary> 完整证明 </summary>              <div class='content'>              <p>  <strong>行变换 $A\mapsto EA$ 等价于左边乘一个&quot;初等矩阵&quot; $E$。</strong> 所以只要证：对任何可逆矩阵 $E$，</p><p>$$A\vec x=\vec b\iff EA\vec x=E\vec b$$</p><p><strong>方向一</strong>：若 $A\vec x=\vec b$，两边左乘 $E$ 即得 $EA\vec x=E\vec b$ ✓</p><p><strong>方向二</strong>：若 $EA\vec x=E\vec b$，两边左乘 $E^{-1}$（存在，因为初等矩阵可逆）得 $A\vec x=\vec b$ ✓</p><p>  <strong>所以关键在于：三种初等行变换对应的 $E$ 都可逆。</strong></p><ol><li><strong>交换两行</strong>：$E$ 是置换矩阵，$E^{-1}=E$（对换两次回到原样）</li><li><strong>某行乘 $c\ne0$</strong>：$E$ 是对角矩阵，$E^{-1}$ 是把 $c$ 换成 $1/c$</li><li><strong>某行加另一行的 $k$ 倍</strong>：$E^{-1}$ 是同一行加 $-k$ 倍</li></ol><p>  <strong>三种都可逆</strong> ⟹ 解集不变 ✓ $\blacksquare$</p><p>  <strong>注意</strong>：这里&quot;某行乘 $c$&quot;要求 $c\ne0$——若允许乘 0，$E$ 不可逆，可能丢解。</p>              </div>            </details><div class="note info flat"><p><strong>为什么&quot;列变换&quot;不行</strong></p><p>  右乘 $A\mapsto AE$ 相当于<strong>换变量</strong>：$\vec x\mapsto E^{-1}\vec x$。</p><p>  <strong>解集确实变了</strong>——但它变的方式是&quot;重新标记变量&quot;，不是&quot;丢解&quot;。</p><p>  <strong>所以</strong>：行变换保解集，列变换保&quot;解的维数&quot;但不保解本身。</p><p>  <strong>实用含义</strong>：解方程组只能用<strong>行</strong>变换。</p></div><h2 id="center-p-秩的两种定义等价-p-center"><center><p>秩的两种定义等价</p></center></h2><p>  <strong>定义 A</strong>（行秩）：非零行的最大个数。<br>  <strong>定义 B</strong>（列秩）：线性无关的列的最大个数。</p><blockquote><p><strong>定理</strong>：行秩 = 列秩。</p></blockquote><p>  <strong>这个定理不平凡</strong>——它说&quot;行与列这两个方向给出的秩一样&quot;。</p><p>  <strong>证明思路</strong>：高斯消元把矩阵变成行阶梯形，行数减少到 $r$；同时列也只剩下 $r$ 个独立列（其余列是前 $r$ 列的组合）。</p><p>  <strong>实用推论</strong>：$\operatorname{rank}(A)=\operatorname{rank}(A^\top)$。</p><h2 id="center-p-解的结构定理-p-center"><center><p>解的结构定理</p></center></h2><blockquote><p><strong>定理</strong>：若 $A\vec x=\vec b$ 有解，$\vec x_0$ 是一个特解，则全体解是</p><p>$${\vec x_0+\vec h:\ A\vec h=\vec 0}$$</p></blockquote><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p><strong>包含关系 1</strong>：若 $\vec h$ 是齐次解，则</p><p>$$A(\vec x_0+\vec h)=A\vec x_0+A\vec h=\vec b+\vec 0=\vec b\quad\checkmark$$</p><p><strong>包含关系 2</strong>：若 $\vec x$ 是任意解，则</p><p>$$A(\vec x-\vec x_0)=\vec b-\vec b=\vec 0$$</p><p>所以 $\vec h=\vec x-\vec x_0$ 是齐次解 ✓ $\blacksquare$</p><p>  <strong>几何意义</strong>：解集是<strong>一条经过 $\vec x_0$、方向平行于齐次解空间</strong>的仿射子空间。</p><p>  二维时它是&quot;不过原点的直线&quot;，三维时是&quot;不过原点的平面&quot;。</p>              </div>            </details><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：中国比欧洲早一千八百年-p-center"><center><p>历史：中国比欧洲早一千八百年</p></center></h2><p>  <strong>线性方程组的系统解法，最早出现在中国的《九章算术》。</strong></p><table><thead><tr><th>时间</th><th>来源</th><th>内容</th></tr></thead><tbody><tr><td><strong>约公元前 1 世纪</strong></td><td><strong>《九章算术》第八章&quot;方程&quot;</strong></td><td>用&quot;遍乘直除&quot;解三元一次方程组</td></tr><tr><td>263</td><td>刘徽注</td><td>给出了完整的算法说明</td></tr><tr><td>1247</td><td>秦九韶</td><td>推广到高次方程组</td></tr><tr><td>1750</td><td>克莱姆</td><td>给出&quot;克莱姆法则&quot;（用行列式表示解）</td></tr><tr><td>1809</td><td>高斯</td><td>最小二乘与消元法</td></tr><tr><td>1873</td><td>若尔当</td><td>把消元法推广到完全约化形式</td></tr></tbody></table><p>  <strong>《九章算术》里的具体例子</strong>（第八章第一题）用现代记号写是：</p><p>$$\begin{cases}3x+2y+z=39\\ 2x+3y+z=34\\ x+2y+3z=26\end{cases}$$</p><p>  <strong>书中给出的解法是</strong>：把系数排成表（<strong>这就是矩阵的雏形</strong>），然后按固定的步骤消去。</p><div class="note info flat"><p><strong>&quot;方程&quot;这个词的来源</strong></p><p>  <strong>《九章算术》里的&quot;方程&quot;二字，本义就是&quot;用算筹摆成的方阵&quot;。</strong></p><p>  <strong>&quot;方&quot;= 排列成方形，&quot;程&quot;= 摆列。</strong></p><p>  所以&quot;方程&quot;原本指的是<strong>矩阵</strong>，不是今天的&quot;含有未知数的等式&quot;。</p><p>  <strong>这个术语的流变很有意思</strong>：今天&quot;方程（equation）&quot;和&quot;方程组（system of equations）&quot;的用法，和古人不同的。</p><p>  <strong>而&quot;高斯消元法&quot;这个名字</strong>，虽然是西方的，但<strong>中国在牛顿出生前 1700 年就有了完整的算法。</strong></p></div><h2 id="center-p-联系：数值方法的视角-p-center"><center><p>联系：数值方法的视角</p></center></h2><p>  <strong>理论上的消元与计算机上的消元，差别很大。</strong></p><p>  <strong>理论</strong>：消元是&quot;精确的&quot;，只要主元非零就能做下去。</p><p>  <strong>数值</strong>：计算机有舍入误差，<strong>主元太小会导致除法放大误差</strong>。</p><p>  <strong>例</strong>：</p><p>$$\begin{pmatrix}10^{-20}&amp;1\\ 1&amp;1\end{pmatrix}\begin{pmatrix}x\\ y\end{pmatrix}=\begin{pmatrix}1\\ 2\end{pmatrix}$$</p><p>  <strong>按教科书顺序</strong>：用 $10^{-20}$ 作主元，第二行减去 $10^{20}$ 倍的第一行——<strong>$10^{20}$ 会让舍入误差完全淹没真解</strong>。</p><p>  <strong>实用做法</strong>：<strong>部分主元选取（partial pivoting）</strong>——每次选<strong>绝对值最大</strong>的元素作主元。</p><p>  <strong>实用后果</strong>：这一步把误差从 $O(\kappa^2)$ 降到 $O(\kappa)$（$\kappa$ 是条件数）。</p><p>  <strong>这就是为什么数值库（LAPACK、MATLAB）默认都做 pivoting。</strong></p><h2 id="center-p-应用：LU-分解与-一次分解多次求解-p-center"><center><p>应用：LU 分解与&quot;一次分解多次求解&quot;</p></center></h2><p>  <strong>高斯消元做完之后，其实已经得到了一个分解</strong>：</p><p>$$A=LU$$</p><p>  其中 $L$ 是下三角（记录消元的乘数），$U$ 是上三角（行阶梯形的结果）。</p><p>  <strong>为什么有用</strong>：</p><ul><li>若要先解 $A\vec x=\vec b_1$，再解 $A\vec x=\vec b_2$……</li><li><strong>分解只需一次</strong>，之后每次只需两次三角回代（$O(n^2)$ 而不是 $O(n^3)$）</li></ul><p>  <strong>这就是为什么</strong>：</p><ul><li>结构工程里刚度矩阵 $K$ 分解一次，然后对不同载荷反复求解</li><li>迭代法的预处理（ILU）也用这个思想</li></ul><p>  <strong>与本站的联系</strong>：「微分方程数值解」系列的刚度矩阵求解也是这个套路。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 1 章向量空间，另辟蹊径地先讲抽象空间。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 2 章消元法，几何图像最好。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>矩阵形式</strong></td><td>$A\vec x=\vec b$，增广矩阵 $(A|\vec b)$</td></tr><tr><td><strong>初等行变换</strong></td><td>交换 / 非零倍 / 行加法，<strong>保持解集</strong></td></tr><tr><td><strong>秩</strong></td><td>非零行个数 = 行秩 = 列秩</td></tr><tr><td><strong>判定</strong></td><td>秩增 ⟹ 无解；秩满 ⟹ 唯一；秩不足 ⟹ 无穷多</td></tr><tr><td><strong>解的结构</strong></td><td>通解 = 特解 + 齐次通解</td></tr><tr><td><strong>数值要点</strong></td><td>部分主元选取，LU 分解一次多次求解</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>本节里反复出现&quot;独立&quot;&quot;组合&quot;&quot;张成&quot;这些词，但都没有精确定义。</p><p><strong>下一节把它们抽象出来</strong>，得到<strong>向量空间</strong>——然后会发现：</p><blockquote><p><strong>$n$ 维空间里的一切，都可以用&quot;基 + 坐标&quot;描述。</strong></p></blockquote><p>  而&quot;维数唯一&quot;这个看起来显然的事实，其实需要证明。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第二章行列式、第三章线性方程组。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——第 1 章向量空间。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——第 2 章消元。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用两个方程的交点理解&quot;解方程组&quot;；②高斯消元、秩、解的结构判定；③为什么行变换不改变解集；④历史、与数值方法（LU 分解、条件数）的联系</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>高等代数（系列总览）</title>
    <link href="https://hsmk.mikufans.date/posts/baee07cd.html"/>
    <id>https://hsmk.mikufans.date/posts/baee07cd.html</id>
    <published>2026-11-22T12:15:00.000Z</published>
    <updated>2026-11-22T12:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<blockquote><p><strong>高等代数 导航栏</strong></p><ul><li>系列总览与导航（本篇）<br>第 1 章 线性方程组与矩阵<ul><li><a href="/posts/6c6d974.html">1.1 线性方程组：高斯消元到底在做什么</a></li><li><a href="/posts/845b7a3f.html">1.2 向量空间与线性相关性：把&quot;独立&quot;说清楚</a></li><li><a href="/posts/ff3ef0e3.html">1.3 基变换与坐标变换：同一个向量，两套坐标</a><br>第 2 章 线性变换与矩阵表示</li><li><a href="/posts/5c5a995d.html">2.1 线性变换与矩阵表示：变换是本质，矩阵只是影子</a></li><li><a href="/posts/b30d66ae.html">2.2 秩-零度定理：被压扁的部分和留下的部分</a><br>第 3 章 矩阵的秩与线性方程组的解</li><li><a href="/posts/2d5b1853.html">3.1 四个基本子空间：一张图看懂线性代数</a></li><li><a href="/posts/41a82400.html">3.2 行列式：面积被放大了几倍</a><br>第 5 章 特征值与对角化</li><li><a href="/posts/da61c2d4.html">4.1 特征值与对角化：变换的&quot;固有方向&quot;</a><br>第 6 章 内积空间与正交性</li><li><a href="/posts/77b0c279.html">5.1 内积空间与正交性：给向量装上尺子和量角器</a></li><li><a href="/posts/1547576a.html">5.2 谱定理与奇异值分解：实对称矩阵为什么这么好</a><br>第 7 章 二次型与正定性</li><li><a href="/posts/eac6723.html">6.1 二次型与正定性：极值是极大还是极小</a><br>第 8 章 若尔当标准型</li><li><a href="/posts/5e555640.html">6.2 若尔当标准型：不能对角化时的最简形式</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>这个系列是什么</strong></p><p>  高等代数讲的是<strong>线性结构</strong>——向量、矩阵、线性变换、特征值。</p><p>  它和「数学分析」是两条并行的主干：分析研究&quot;变化与极限&quot;，代数研究&quot;结构与不变量&quot;。</p><p>  <strong>两者在很多地方汇合</strong>：多元微分（雅可比矩阵）、傅里叶级数（内积空间）、微分方程的分离变量法（特征值问题）。</p></div><hr><h2 id="center-p-为什么单独讲高等代数-p-center"><center><p>为什么单独讲高等代数</p></center></h2><p>  很多工科教材把线性代数讲成&quot;算行列式、解方程组、背矩阵公式&quot;。</p><p>  <strong>但高等代数的核心不是计算，是&quot;结构&quot;。</strong></p><p>  同一个线性变换，换一组基就换一副矩阵——<strong>但特征值不变</strong>。这种&quot;变与不变&quot;的思想，才是代数的精髓。</p><p>  <strong>本系列的目标</strong>：让你看到矩阵背后那个几何对象，而不是只会做行变换。</p><h2 id="center-p-章节规划-p-center"><center><p>章节规划</p></center></h2><table><thead><tr><th>章</th><th>主题</th><th>核心问题</th></tr></thead><tbody><tr><td><strong>1</strong></td><td><strong>线性方程组与矩阵</strong></td><td>高斯消元为什么有效？秩到底在说什么？</td></tr><tr><td><strong>2</strong></td><td><strong>向量空间与线性相关性</strong></td><td>&quot;线性无关&quot;是什么意思？维数为什么唯一？</td></tr><tr><td><strong>3</strong></td><td><strong>线性变换与矩阵表示</strong></td><td>同一个变换在不同基下，矩阵怎么变？</td></tr><tr><td><strong>4</strong></td><td><strong>行列式</strong></td><td>行列式是&quot;体积&quot;还是&quot;符号&quot;？为什么它这样定义？</td></tr><tr><td><strong>5</strong></td><td><strong>特征值与对角化</strong></td><td>什么时候能对角化？不能时怎么办？</td></tr><tr><td><strong>6</strong></td><td><strong>内积空间与正交性</strong></td><td>为什么傅里叶系数是内积？</td></tr><tr><td><strong>7</strong></td><td><strong>二次型与正定性</strong></td><td>Hessian 判别法背后是什么？</td></tr><tr><td><strong>8</strong></td><td><strong>若尔当标准型</strong></td><td>不可对角化时，最简形式长什么样？</td></tr></tbody></table><div class="note info flat"><p><strong>每篇文章的四层结构</strong></p><p>  与「数学分析」系列一致：</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用例子建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;为什么&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、应用、跨学科接口感兴趣的读者</td></tr></tbody></table></div><h2 id="center-p-与本站其他系列的关系-p-center"><center><p>与本站其他系列的关系</p></center></h2><table><thead><tr><th>系列</th><th>接口</th></tr></thead><tbody><tr><td><strong>数学分析</strong></td><td>雅可比矩阵（5.3）、Hessian 判别法（5.4）、内积与 Parseval（4.4）</td></tr><tr><td><strong>微分方程数值解</strong></td><td>刚度矩阵的对称正定（5.4）、迭代法的谱半径（2.5）</td></tr><tr><td><strong>数学物理方程</strong></td><td>分离变量法求特征值问题（2.x）</td></tr></tbody></table><p>  <strong>所以本系列是「实变函数与泛函分析」的前置</strong>——那里的希尔伯特空间就是&quot;无穷维的内积空间&quot;。</p><h2 id="center-p-建议的阅读顺序-p-center"><center><p>建议的阅读顺序</p></center></h2><figure class="highlight tap"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">第<span class="number"> 1 </span>章 线性方程组与矩阵      ← 从这里开始</span><br><span class="line">   ↓</span><br><span class="line">第<span class="number"> 2 </span>章 向量空间              ← 把&quot;向量&quot;抽象化</span><br><span class="line">   ↓</span><br><span class="line">第<span class="number"> 3 </span>章 线性变换与矩阵表示    ← 核心：变换 vs 矩阵</span><br><span class="line">   ↓</span><br><span class="line">第<span class="number"> 4 </span>章 行列式                ← 补上&quot;面积/体积&quot;的度量</span><br><span class="line">   ↓</span><br><span class="line">第<span class="number"> 5 </span>章 特征值与对角化        ← 最重要的一章</span><br><span class="line">   ↓</span><br><span class="line">第 6~8 章 内积 / 二次型 / 若尔当</span><br></pre></td></tr></table></figure><div class="note warning flat"><p><strong>不需要先学数学分析</strong></p><p>  高等代数是<strong>独立</strong>的——它只依赖高中代数。</p><p>  <strong>但如果你同时在看数学分析</strong>，会经常遇到两者交汇的地方（雅可比、Hessian、Parseval），那些地方会有交叉链接。</p></div><h2 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h2><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——国内最通用的教材。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</span><span class="reference-title">参考资料</span></span></span>——以&quot;线性变换&quot;为主线，弱化行列式，最贴近本系列思路。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</span><span class="reference-title">参考资料</span></span></span>——MIT 课程教材，几何直觉最强。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://mall.hep.com.cn/goods-14464.html" target="_blank" rel="noopener">北京大学数学系几何与代数教研室前代数小组. 高等代数[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://link.springer.com/book/10.1007/978-3-319-11080-6" target="_blank" rel="noopener">AXLER S. Linear Algebra Done Right[M]. 3rd ed. Cham: Springer, 2015.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://math.mit.edu/~gs/linearalgebra/" target="_blank" rel="noopener">STRANG G. Introduction to Linear Algebra[M]. 5th ed. Wellesley: Wellesley-Cambridge Press, 2016.</a></div>]]></content>
    
    
    <summary type="html">从线性方程组出发，一路到若尔当标准型——高等代数系列的总览、章节规划与阅读路线</summary>
    
    
    
    <category term="高等代数" scheme="https://hsmk.mikufans.date/categories/%E9%AB%98%E7%AD%89%E4%BB%A3%E6%95%B0/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>数学分析 6.2：反常积分的收敛判别——为什么&quot;条件收敛&quot;如此脆弱</title>
    <link href="https://hsmk.mikufans.date/posts/69d93dfd.html"/>
    <id>https://hsmk.mikufans.date/posts/69d93dfd.html</id>
    <published>2026-11-18T16:15:00.000Z</published>
    <updated>2026-11-18T16:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>数学分析 导航栏</strong></p><ul><li><a href="/posts/cfe53629.html">系列总览与导航</a><br>第 1 章 实数、极限与微分<ul><li><a href="/posts/a4efc3f8.html">1.1 实数完备性：一切从这条公理开始</a></li><li><a href="/posts/ac14083c.html">1.2 数列极限：ε-N 语言到底在说什么</a></li><li><a href="/posts/6fe04a7.html">1.3 函数极限与连续性：闭区间三大定理</a></li><li><a href="/posts/3a8afdfc.html">1.4 导数与微分：切线到底是什么</a></li><li><a href="/posts/2f0bf545.html">1.5 中值定理：微分学的枢纽</a></li><li><a href="/posts/2b2f3724.html">1.6 泰勒公式：三种余项分别在说什么</a><br>第 2 章 微分学的应用</li><li><a href="/posts/4cb59847.html">2.1 七种不定式与洛必达法则的完整版</a></li><li><a href="/posts/fcd48ee1.html">2.2 极值、凹凸与函数作图</a><br>第 3 章 积分学</li><li><a href="/posts/405f6561.html">3.1 黎曼积分：这个定义为什么这么绕</a></li><li><a href="/posts/862d8a0a.html">3.2 微积分基本定理：最漂亮的一个定理</a></li><li><a href="/posts/ef2174eb.html">3.3 定积分的应用：从面积到弧长的统一套路</a></li><li><a href="/posts/e314c779.html">3.4 广义积分：为什么 1/x 发散而 1/x² 收敛</a></li><li><a href="/posts/aa220344.html">3.5 二重积分与重积分换元：雅可比行列式从哪来</a></li><li><a href="/posts/271eeb68.html">3.6 曲线积分与曲面积分：两类积分的区别到底在哪</a></li><li><a href="/posts/23318654.html">3.7 格林·高斯·斯托克斯：三个公式其实是同一个</a><br>第 4 章 级数</li><li><a href="/posts/5828afd0.html">4.1 数项级数：什么时候可以&quot;无限加下去&quot;</a></li><li><a href="/posts/e8e706c1.html">4.2 一致收敛：为什么&quot;每点都收敛&quot;还不够</a></li><li><a href="/posts/e2bdc01d.html">4.3 幂级数：泰勒展开什么时候成立</a></li><li><a href="/posts/9f286131.html">4.4 傅里叶级数：为什么&quot;不光滑&quot;也能展开</a><br>第 5 章 多元微分学</li><li><a href="/posts/75523d8c.html">5.1 多元极限与连续：一维的直觉在这里全部失效</a></li><li><a href="/posts/c5d9aa8a.html">5.2 偏导、全微分与方向导数：为什么&quot;偏导存在&quot;什么都不保证</a></li><li><a href="/posts/938b8e60.html">5.3 链式法则与隐函数定理：为什么&quot;链式&quot;会变成加法</a></li><li><a href="/posts/78bfd5cf.html">5.4 多元函数的极值：为什么&quot;驻点&quot;不够</a><br>第 6 章 含参积分与反常积分</li><li><a href="/posts/b2a8135e.html">6.1 含参变量积分：什么时候可以把求导和取极限搬到外面</a></li><li>6.2 反常积分的收敛判别：为什么&quot;条件收敛&quot;如此脆弱（本篇）</li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;漏斗&quot;和&quot;越走越远的尾巴&quot;建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——四种判别法与它们的分工</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;条件收敛有多脆弱&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对概率、信号处理与傅里叶分析的接口感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：面积还能算吗-p-center"><center><p>一、基础：面积还能算吗</p></center></h1><p>  <strong>（这一部分不需要任何积分基础。）</strong></p><h2 id="center-p-两种-无限-p-center"><center><p>两种&quot;无限&quot;</p></center></h2><p>  普通积分 $\displaystyle\int_a^b f(x),\mathrm{d}x$ 有两件事是确定的：<strong>起点有限，终点有限</strong>。</p><p>  <strong>但有两种情况会&quot;无限&quot;</strong>：</p><p><strong>情况一：区间无穷</strong></p><p>$$\int_1^{+\infty}\frac{\mathrm{d}x}{x}$$</p><p>  从 1 一直走到无穷远，<strong>面积是有限的还是无限的？</strong></p><p><strong>情况二：函数在端点爆炸</strong></p><p>$$\int_0^1\frac{\mathrm{d}x}{x}$$</p><p>  走到 0 附近时，函数值趋于无穷——<strong>高度无限，面积有限吗？</strong></p><p>  <strong>这两种都叫&quot;反常积分&quot;（广义积分），都是极限</strong>：</p><p>$$\int_1^{+\infty}f,\mathrm{d}x=\lim_{R\to+\infty}\int_1^Rf,\mathrm{d}x$$</p><p>$$\int_0^1f,\mathrm{d}x=\lim_{\varepsilon\to0^+}\int_\varepsilon^1f,\mathrm{d}x$$</p><p>  <strong>如果极限存在且有限，就说这个反常积分&quot;收敛&quot;。</strong></p><h2 id="center-p-直觉：为什么有的收敛有的发散-p-center"><center><p>直觉：为什么有的收敛有的发散</p></center></h2><p>  <strong>关键看&quot;衰减得够不够快&quot;。</strong></p><p><strong>$\frac1x$ 的尾巴太厚</strong></p><p>  从 1 到 $R$ 的&quot;尾巴&quot;：</p><p>$$\int_1^R\frac{\mathrm{d}x}{x}=\ln R\longrightarrow+\infty$$</p><p>  <strong>慢得像对数</strong>——虽然每位都在变小，但<strong>总面积无限增长</strong>。</p><p><strong>$\frac1{x^2}$ 的尾巴够薄</strong></p><p>$$\int_1^R\frac{\mathrm{d}x}{x^2}=1-\frac1R\longrightarrow1$$</p><p>  <strong>快速趋于 1</strong>，收敛 ✓</p><div class="note info flat"><p><strong>为什么&quot;差一个指数&quot;就天差地别</strong></p><p>  想象你在剥洋葱：</p><ul><li>$\frac1x$：每层面积都<strong>差不多一样</strong>（$\int_n^{n+1}\frac{\mathrm{d}x}{x}\approx\frac1n$）——剥无穷层，总面积无穷</li><li>$\frac1{x^2}$：每层面积<strong>越来越小</strong>（$\int_n^{n+1}\frac{\mathrm{d}x}{x^2}\approx\frac1{n^2}$）——总和有限</li></ul><p>  <strong>分界线恰好在 $p=1$</strong>：$\displaystyle\int_1^{+\infty}\frac{\mathrm{d}x}{x^p}$ 在 $p&gt;1$ 时收敛，$p\le1$ 时发散。</p><p>  <strong>这个&quot;1&quot;不是随便来的</strong>——它来自&quot;每层面积是否随层数衰减得比 1 快&quot;。</p></div><h2 id="center-p-一个反直觉的例子-p-center"><center><p>一个反直觉的例子</p></center></h2><p>  <strong>$\displaystyle\int_1^{+\infty}\frac{\sin x}{x},\mathrm{d}x$ 收敛</strong>（第四部分会算，值 $\frac\pi2$）。</p><p>  <strong>但 $\displaystyle\int_1^{+\infty}\frac{|\sin x|}{x},\mathrm{d}x$ 发散</strong>。</p><p>  <strong>同一个函数，加了绝对值就发散</strong>——这叫<strong>条件收敛</strong>。</p><p>  <strong>为什么会这样</strong>：$\sin x$ 有正有负，正负部分<strong>互相抵消</strong>；加绝对值后就全变成正的，<strong>没法抵消</strong>了。</p><p>  <strong>所以&quot;条件收敛&quot;是&quot;靠抵消撑住的收敛&quot;——非常脆弱。</strong></p><hr><h1 id="center-p-二、标准：四种判别法-p-center"><center><p>二、标准：四种判别法</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-p-积分（基准）-p-center"><center><p>p-积分（基准）</p></center></h2><p>$$\int_1^{+\infty}\frac{\mathrm{d}x}{x^p}\begin{cases}\text{收敛},&amp;p&gt;1\\\text{发散},&amp;p\le1\end{cases}\qquad\int_0^1\frac{\mathrm{d}x}{x^p}\begin{cases}\text{收敛},&amp;p&lt;1\\\text{发散},&amp;p\ge1\end{cases}$$</p><p>  <strong>注意两边条件相反</strong>——无穷远处要&quot;衰减快&quot;（$p&gt;1$），0 附近要&quot;爆炸慢&quot;（$p&lt;1$）。</p><h2 id="center-p-比较判别法-p-center"><center><p>比较判别法</p></center></h2><blockquote><p>若 $0\le f(x)\le g(x)$（在 $x$ 足够大处），则</p><p>$$\int g\ \text{收敛}\ \Longrightarrow\ \int f\ \text{收敛}\qquad\qquad \int f\ \text{发散}\ \Longrightarrow\ \int g\ \text{发散}$$</p></blockquote><p>  <strong>极限形式</strong>（更好用）：若 $\lim\frac{f}{g}=c$，$0&lt;c&lt;\infty$，则两者<strong>同敛散</strong>。</p><h2 id="center-p-Dirichlet-判别法-p-center"><center><p>Dirichlet 判别法</p></center></h2><blockquote><p>若</p><ol><li>$F(R)=\displaystyle\int_a^Rf(x),\mathrm{d}x$ <strong>有界</strong>（对一切 $R$）</li><li>$g(x)$ <strong>单调</strong>且 $g(x)\to0$（$x\to+\infty$）</li></ol><p>则 $\displaystyle\int_a^{+\infty}f(x)g(x),\mathrm{d}x$ <strong>收敛</strong>。</p></blockquote><p>  <strong>这正是处理&quot;振荡函数&quot;的工具</strong>：</p><ul><li>$f=\sin x$ 的积分 $|\cos a-\cos R|\le2$ <strong>有界</strong> ✓</li><li>$g=\frac1x$ <strong>单调递减趋于 0</strong> ✓</li></ul><p>  ⟹ $\displaystyle\int_1^\infty\frac{\sin x}{x},\mathrm{d}x$ <strong>收敛</strong> ✓</p><h2 id="center-p-Abel-判别法-p-center"><center><p>Abel 判别法</p></center></h2><blockquote><p>若</p><ol><li>$\displaystyle\int_a^{+\infty}f(x),\mathrm{d}x$ <strong>收敛</strong></li><li>$g(x)$ <strong>单调有界</strong></li></ol><p>则 $\displaystyle\int_a^{+\infty}f(x)g(x),\mathrm{d}x$ <strong>收敛</strong>。</p></blockquote><p>  <strong>区别</strong>：Dirichlet 处理&quot;$f$ 本身不收敛但有界&quot;；Abel 处理&quot;$f$ 已经收敛&quot;。</p><div class="note info flat"><p><strong>两者怎么分工</strong></p><table><thead><tr><th>情形</th><th>用哪个</th></tr></thead><tbody><tr><td>$\int\sin x$ 有界，$g\to0$</td><td><strong>Dirichlet</strong></td></tr><tr><td>$\int f$ 已收敛，$g$ 单调有界</td><td><strong>Abel</strong></td></tr></tbody></table><p>  <strong>例</strong>：$\displaystyle\int_1^\infty\frac{\sin x}{x}\cdot\frac{x}{x+1},\mathrm{d}x$</p><p>  已知 $\int\frac{\sin x}{x}$ 收敛；而 $\frac{x}{x+1}$ 单调递增有界（趋于 1）→ 用 <strong>Abel</strong> ✓</p><p>  <strong>如果用 Dirichlet</strong>：$\frac{x}{x+1}\to1$ <strong>不趋于 0</strong>，条件不满足 ✗</p></div><h2 id="center-p-判别法的选择流程-p-center"><center><p>判别法的选择流程</p></center></h2><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">被积函数有正负吗？</span><br><span class="line">├─ 没有（或可加绝对值后仍收敛）→ 绝对收敛</span><br><span class="line">│    └─ 用比较判别法 / 极限形式，与 <span class="selector-tag">p</span>-积分比</span><br><span class="line">└─ 有（加绝对值后发散）→ 条件收敛</span><br><span class="line">     ├─ 原函数有界 + 单调趋 <span class="number">0</span>  → Dirichlet</span><br><span class="line">     └─ 已知收敛 + 单调有界    → Abel</span><br></pre></td></tr></table></figure><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：忘了检查奇点</strong></p><p>  $\displaystyle\int_0^1\frac{\mathrm{d}x}{x^2}$ 有两个问题：$x=0$ 处爆炸。要先<strong>把奇点分离</strong>再判断。</p><p><strong>错误二：用比较判别法时方向搞反</strong></p><p>  $f\le g$ 且 $\int g$ 收敛 ⟹ $\int f$ 收敛。<strong>反过来不成立</strong>（$f$ 小不代表 $g$ 收敛）。</p><p><strong>错误三：以为&quot;函数趋于 0&quot;就能收敛</strong></p><p>  $\frac1x\to0$ 但 $\int_1^\infty\frac{\mathrm{d}x}{x}$ 发散。<strong>衰减速度才是关键。</strong></p><p><strong>错误四：把条件收敛当成绝对收敛</strong></p><p>  $\int\frac{\sin x}{x}$ 收敛但 $\int\left|\frac{\sin x}{x}\right|$ 发散。<strong>混淆会导致错误的重排/换序操作。</strong></p><p><strong>错误五：Dirichlet 里忽略&quot;$g$ 单调&quot;</strong></p><p>  $\int\sin x\cdot g$ 中 $g$ <strong>必须单调</strong>。若 $g$ 振荡，判别法不适用（虽然结论可能仍成立）。</p><p><strong>错误六：无穷积分和瑕积分混用 p 的条件</strong></p><p>  无穷远处 $p&gt;1$ 收敛；$0$ 附近 $p&lt;1$ 收敛。<strong>条件相反，不能混！</strong></p></div><hr><h1 id="center-p-三、深入：判别法为什么成立-p-center"><center><p>三、深入：判别法为什么成立</p></center></h1><p>  <strong>（这一部分是完整证明。）</strong></p><h2 id="center-p-p-积分的完整计算-p-center"><center><p>p-积分的完整计算</p></center></h2><details class="folding-tag" cyan><summary> 证明 </summary>              <div class='content'>              <p><strong>情形 1：$p\ne1$</strong></p><p>$$\int_1^R\frac{\mathrm{d}x}{x^p}=\left[\frac{x^{1-p}}{1-p}\right]_1^R=\frac{R^{1-p}-1}{1-p}$$</p><ul><li>$p&gt;1$：$1-p&lt;0$，$R^{1-p}\to0$，所以积分 $\to\dfrac{1}{p-1}$ <strong>收敛</strong> ✓</li><li>$p&lt;1$：$1-p&gt;0$，$R^{1-p}\to+\infty$，<strong>发散</strong> ✓</li></ul><p><strong>情形 2：$p=1$</strong></p><p>$$\int_1^R\frac{\mathrm{d}x}{x}=\ln R\to+\infty\qquad\text{发散 ✓}$$</p><p>  <strong>所以 $p=1$ 是临界点</strong>——它对应&quot;每个等面积层&quot;的情形（$\int_n^{n+1}\frac{\mathrm{d}x}{x}\approx\frac1n$，调和级数）。</p>              </div>            </details><h2 id="center-p-积分判别法：积分与级数的精确对应-p-center"><center><p>积分判别法：积分与级数的精确对应</p></center></h2><blockquote><p><strong>定理</strong>：设 $f(x)$ 在 $[1,+\infty)$ 上<strong>非负、单调递减、连续</strong>，则</p><p>$$\sum_{n=1}^{\infty}f(n)\ \text{收敛}\iff\int_1^{+\infty}f(x),\mathrm{d}x\ \text{收敛}$$</p></blockquote><details class="folding-tag" cyan><summary> 证明（用夹逼） </summary>              <div class='content'>              <p>  <strong>关键观察</strong>：由单调性，在每个小区间 $[n,n+1]$ 上</p><p>$$f(n+1)\le f(x)\le f(n)$$</p><p>  积分后：</p><p>$$f(n+1)\le\int_n^{n+1}f(x),\mathrm{d}x\le f(n)$$</p><p>  <strong>求和</strong>（$n=1$ 到 $N-1$）：</p><p>$$\sum_{n=2}^{N}f(n)\le\int_1^Nf(x),\mathrm{d}x\le\sum_{n=1}^{N-1}f(n)$$</p><p>  <strong>两个不等式分别给出两个方向</strong>：</p><ul><li>若 $\int$ 收敛，则 $\sum_{n=2}^N f(n)$ 有界 ⟹ 级数收敛</li><li>若 $\sum$ 收敛，则 $\int_1^N f$ 有界 ⟹ 积分收敛</li></ul><p>✓ $\blacksquare$</p><p>  <strong>注意</strong>：$f\ge0$ 保证单调有界 ⟹ 收敛（1.1 节）；$f$ 单调递减是关键。</p>              </div>            </details><div class="note info flat"><p><strong>这个定理的用处</strong></p><p>  <strong>它把级数和积分统一起来</strong>——所以很多关于级数的结论可以直接搬到积分，反之亦然。</p><p>  <strong>例</strong>：$\displaystyle\sum\frac1{n^p}$ 与 $\displaystyle\int_1^\infty\frac{\mathrm{d}x}{x^p}$ <strong>同时收敛</strong>，都是 $p&gt;1$ ✓</p><p>  <strong>但注意条件</strong>：$f$ 必须<strong>单调递减</strong>。若 $f$ 振荡（如 $\frac{\sin x}{x}$），对应关系会失效——那时要靠 Dirichlet。</p><p>  <strong>这也解释了为什么 $\frac{\sin x}{x}$ 的条件收敛更&quot;脆弱&quot;</strong>：它不在积分判别法的管辖范围内。</p></div><h2 id="center-p-Dirichlet-判别法的证明-p-center"><center><p>Dirichlet 判别法的证明</p></center></h2><details class="folding-tag" cyan><summary> 证明（用第二积分中值定理 / 分部积分） </summary>              <div class='content'>              <p>  记 $F(x)=\displaystyle\int_a^xf(t),\mathrm{d}t$，已知 $|F(x)|\le M$。</p><p>  <strong>分部积分</strong>（对 $f\cdot g$）：</p><p>$$\int_a^bfg,\mathrm{d}x=\left[F(x)g(x)\right]_a^b-\int_a^bF(x)g'(x),\mathrm{d}x$$</p><p>  <strong>边界项</strong>：$|F(b)g(b)|\le M|g(b)|\to0$（因 $g\to0$）✓</p><p>  <strong>剩余积分</strong>：</p><p>$$\left|\int_a^bF(x)g'(x),\mathrm{d}x\right|\le M\int_a^b|g'(x)|,\mathrm{d}x$$</p><p>  <strong>关键</strong>：$g$ <strong>单调</strong> ⟹ $|g'|=\mp g'$（符号固定）⟹</p><p>$$\int_a^b|g'|,\mathrm{d}x=|g(b)-g(a)|\le|g(a)|$$</p><p>  （因 $g$ 单调且 $g\to0$，所以 $|g(b)-g(a)|\le|g(a)|$。）</p><p>  <strong>所以整个积分被 $M|g(a)|$ 界住，与 $b$ 无关</strong> ⟹ 由柯西准则收敛 ✓ $\blacksquare$</p><p>  <strong>看清楚了没</strong>：<strong>&quot;$g$ 单调&quot;的作用就是把 $|g'|$ 变成 $g'$</strong>，从而 $\int|g'|$ 可以算出有限值。若 $g$ 不单调，$\int|g'|$ 可能无穷。</p>              </div>            </details><h2 id="center-p-条件收敛有多脆弱-p-center"><center><p>条件收敛有多脆弱</p></center></h2><p>  <strong>核心事实</strong>：</p><blockquote><p><strong>条件收敛的积分，交换&quot;正部&quot;和&quot;负部&quot;的次序会改变结果。</strong></p></blockquote><p>  <strong>这是 4.1 节&quot;条件收敛的级数重排会改变和&quot;的连续版本。</strong></p><p>  <strong>具体地</strong>：$\displaystyle\int_0^\infty\frac{\sin x}{x},\mathrm{d}x=\frac\pi2$，但如果你把它拆成</p><p>$$\int_0^\infty\frac{\sin x}{x},\mathrm{d}x\stackrel{?}{=}\int_0^\infty\frac{\sin^+x}{x},\mathrm{d}x-\int_0^\infty\frac{\sin^-x}{x},\mathrm{d}x$$</p><p>  <strong>右边两项各自都发散</strong>（都是 $+\infty$）——所以&quot;无穷减无穷&quot;，无意义。</p><div class="note danger flat"><p><strong>为什么这事很严重</strong></p><p>  <strong>如果你对条件收敛的积分做了任何&quot;拆开&quot;或&quot;重排&quot;的操作，结果可能任意。</strong></p><p>  <strong>实际后果</strong>：</p><ol><li><strong>傅里叶级数的系数计算</strong>：若只条件收敛，逐项积分的顺序会影响结果</li><li><strong>数值积分</strong>：不同的求积节点顺序可能给出不同答案</li><li><strong>物理里的重整化</strong>：发散积分的&quot;正规化&quot;本质上就是在给这种操作定规则</li></ol><p>  <strong>安全做法</strong>：先判断<strong>绝对收敛</strong>。只有绝对收敛时，才能随意交换、重排、拆开。</p></div><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-联系：与数项级数的精确对应表-p-center"><center><p>联系：与数项级数的精确对应表</p></center></h2><table><thead><tr><th>级数</th><th>积分</th><th>收敛条件</th></tr></thead><tbody><tr><td>$\sum\frac1{n^p}$</td><td>$\int_1^\infty\frac{\mathrm{d}x}{x^p}$</td><td>$p&gt;1$</td></tr><tr><td>$\sum\frac1{n\ln^p n}$</td><td>$\int_2^\infty\frac{\mathrm{d}x}{x\ln^px}$</td><td>$p&gt;1$</td></tr><tr><td>$\sum\frac{(-1)^n}{n}$</td><td>—</td><td>条件收敛（Leibniz）</td></tr><tr><td>$\sum\frac{\sin n}{n}$</td><td>$\int\frac{\sin x}{x}$</td><td>条件收敛（Dirichlet）</td></tr></tbody></table><p>  <strong>最后一行值得注意</strong>：$\sum\frac{\sin n}{n}$ 的条件收敛，用的也是 Dirichlet 判别法（级数版）——<strong>&quot;部分和有界 + 单调趋 0&quot;</strong>。</p><p>  <strong>同一套思想，两种对象。</strong></p><h2 id="center-p-应用：概率里的反常积分-p-center"><center><p>应用：概率里的反常积分</p></center></h2><p>  <strong>高斯积分的归一化常数</strong>（3.5 节算过）：</p><p>$$\int_{-\infty}^{+\infty}e^{-x^2},\mathrm{d}x=\sqrt\pi$$</p><p>  <strong>这个积分绝对收敛</strong>——因为 $e^{-x^2}$ 衰减得比任何 $x^{-p}$ 都快。</p><p>  <strong>而 $t$ 分布的&quot;重尾&quot;</strong>：$\displaystyle\int_{-\infty}^\infty\frac{\mathrm{d}x}{(1+x^2)^{k}}$ 收敛需要 $k&gt;\frac12$——对应 $t$ 分布自由度 $&gt;1$ 时均值存在。</p><p>  <strong>柯西分布的均值为无穷</strong>（$\int\frac{|x|}{1+x^2},\mathrm{d}x=\infty$）——<strong>这就是&quot;平均&quot;对柯西分布没有意义的原因</strong>，也是它违反中心极限定理的根源。</p><h2 id="center-p-应用：信号处理里的绝对可积-p-center"><center><p>应用：信号处理里的绝对可积</p></center></h2><p>  傅里叶变换要求</p><p>$$\hat f(\omega)=\int_{-\infty}^{+\infty}f(t)e^{-i\omega t},\mathrm{d}t$$</p><p>  <strong>存在的充分条件是 $f$ 绝对可积</strong>：$\int|f|&lt;+\infty$。</p><p>  <strong>若只条件收敛</strong>（如 $f=\frac{\sin t}{t}$），则 $\hat f$ 在常规意义下不完全良定义，需要<strong>分布意义</strong>（广义函数）下理解。</p><p>  <strong>这正是为什么</strong>：</p><ul><li>理想低通滤波器的冲激响应（sinc 函数）不是绝对可积的，所以它<strong>不因果、物理上不可实现</strong></li><li>工程上必须做截断，而截断就导致 Gibbs 现象（4.4 节）</li></ul><p>  <strong>一个纯分析的收敛性条件，最终变成了&quot;滤波器能不能造出来&quot;的工程约束。</strong></p><h2 id="center-p-历史-p-center"><center><p>历史</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1655</td><td>沃利斯</td><td>第一个&quot;无穷乘积&quot;</td></tr><tr><td>1660s</td><td>牛顿、莱布尼茨</td><td>形式地使用无穷积分</td></tr><tr><td>1820s</td><td>柯西</td><td>反常积分的收敛判别</td></tr><tr><td>1830s</td><td><strong>狄利克雷</strong></td><td>条件收敛、Dirichlet 判别法</td></tr><tr><td>1820s</td><td><strong>阿贝尔</strong></td><td>Abel 判别法</td></tr><tr><td>1900s</td><td>勒贝格</td><td>绝对收敛成为&quot;标准&quot;判别（Lebesgue 积分天然绝对收敛）</td></tr></tbody></table><p>  <strong>最后一行最重要</strong>：勒贝格积分的定义使得<strong>不可能有条件收敛</strong>——要么绝对可积，要么不可积。</p><p>  <strong>这既是优点（不需要担心重排），也是缺点</strong>（无法处理$\frac{\sin x}{x}$ 这类只在黎曼意义下收敛的函数）。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</span><span class="reference-title">参考资料</span></span></span>——第 7 章（函数序列与积分）、第 8 章（幂级数）。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>反常积分</strong></td><td>无穷区间 / 无界函数，定义为极限</td></tr><tr><td><strong>p-积分</strong></td><td>无穷处 $p&gt;1$ 收敛；0 附近 $p&lt;1$ 收敛</td></tr><tr><td><strong>比较判别</strong></td><td>与 p-积分比（极限形式最常用）</td></tr><tr><td><strong>Dirichlet</strong></td><td>原函数有界 + $g$ 单调趋 0</td></tr><tr><td><strong>Abel</strong></td><td>$f$ 已收敛 + $g$ 单调有界</td></tr><tr><td><strong>积分判别法</strong></td><td>$f$ 非负单调 ⟹ 级数与积分同敛散</td></tr><tr><td><strong>条件收敛</strong></td><td>脆弱：<strong>不能重排、不能随意拆开</strong></td></tr><tr><td><strong>安全做法</strong></td><td>先验绝对收敛</td></tr></tbody></table><div class="note info flat"><p><strong>第 6 章后续</strong></p><p>  反常积分的基本判别已经讲完。接下来如果要继续，会讲：</p><ul><li><strong>反常重积分与多重积分的奇点处理</strong>（3.5 节的延续）</li><li><strong>Euler 积分</strong>（$\Gamma$ 函数与 B 函数）——它们本身就是反常积分，但在概率与物理里反复出现</li></ul><p>  <strong>不过这一章也可以在这里收尾</strong>：核心的&quot;收敛判别 + 条件收敛的脆弱性&quot;已经交代清楚。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">华东师范大学数学科学学院. 数学分析: 上册[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第十一章反常积分。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</span><span class="reference-title">参考资料</span></span></span>——第 6 章黎曼-斯蒂尔切斯积分。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://abook.hep.com.cn/1210369" target="_blank" rel="noopener">华东师范大学数学科学学院. 数学分析: 上册[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://openlibrary.org/books/OL5195991M" target="_blank" rel="noopener">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①无穷远与奇点处&quot;面积&quot;还能算吗；②比较判别法、Dirichlet 与 Abel 判别法；③积分判别法与 p-积分的完整证明；④条件收敛为何不能重排、与数项级数的精确对应、以及在概率与信号处理中的意义</summary>
    
    
    
    <category term="数学分析" scheme="https://hsmk.mikufans.date/categories/%E6%95%B0%E5%AD%A6%E5%88%86%E6%9E%90/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>数学分析 6.1：含参变量积分——什么时候可以把积分号下的求导和取极限搬到外面</title>
    <link href="https://hsmk.mikufans.date/posts/b2a8135e.html"/>
    <id>https://hsmk.mikufans.date/posts/b2a8135e.html</id>
    <published>2026-11-18T12:15:00.000Z</published>
    <updated>2026-11-18T12:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>数学分析 导航栏</strong></p><ul><li><a href="/posts/cfe53629.html">系列总览与导航</a><br>第 1 章 实数、极限与微分<ul><li><a href="/posts/a4efc3f8.html">1.1 实数完备性：一切从这条公理开始</a></li><li><a href="/posts/ac14083c.html">1.2 数列极限：ε-N 语言到底在说什么</a></li><li><a href="/posts/6fe04a7.html">1.3 函数极限与连续性：闭区间三大定理</a></li><li><a href="/posts/3a8afdfc.html">1.4 导数与微分：切线到底是什么</a></li><li><a href="/posts/2f0bf545.html">1.5 中值定理：微分学的枢纽</a></li><li><a href="/posts/2b2f3724.html">1.6 泰勒公式：三种余项分别在说什么</a><br>第 2 章 微分学的应用</li><li><a href="/posts/4cb59847.html">2.1 七种不定式与洛必达法则的完整版</a></li><li><a href="/posts/fcd48ee1.html">2.2 极值、凹凸与函数作图</a><br>第 3 章 积分学</li><li><a href="/posts/405f6561.html">3.1 黎曼积分：这个定义为什么这么绕</a></li><li><a href="/posts/862d8a0a.html">3.2 微积分基本定理：最漂亮的一个定理</a></li><li><a href="/posts/ef2174eb.html">3.3 定积分的应用：从面积到弧长的统一套路</a></li><li><a href="/posts/e314c779.html">3.4 广义积分：为什么 1/x 发散而 1/x² 收敛</a></li><li><a href="/posts/aa220344.html">3.5 二重积分与重积分换元：雅可比行列式从哪来</a></li><li><a href="/posts/271eeb68.html">3.6 曲线积分与曲面积分：两类积分的区别到底在哪</a></li><li><a href="/posts/23318654.html">3.7 格林·高斯·斯托克斯：三个公式其实是同一个</a><br>第 4 章 级数</li><li><a href="/posts/5828afd0.html">4.1 数项级数：什么时候可以&quot;无限加下去&quot;</a></li><li><a href="/posts/e8e706c1.html">4.2 一致收敛：为什么&quot;每点都收敛&quot;还不够</a></li><li><a href="/posts/e2bdc01d.html">4.3 幂级数：泰勒展开什么时候成立</a></li><li><a href="/posts/9f286131.html">4.4 傅里叶级数：为什么&quot;不光滑&quot;也能展开</a><br>第 5 章 多元微分学</li><li><a href="/posts/75523d8c.html">5.1 多元极限与连续：一维的直觉在这里全部失效</a></li><li><a href="/posts/c5d9aa8a.html">5.2 偏导、全微分与方向导数：为什么&quot;偏导存在&quot;什么都不保证</a></li><li><a href="/posts/938b8e60.html">5.3 链式法则与隐函数定理：为什么&quot;链式&quot;会变成加法</a></li><li><a href="/posts/78bfd5cf.html">5.4 多元函数的极值：为什么&quot;驻点&quot;不够</a><br>第 6 章 含参积分与反常积分</li><li>6.1 含参变量积分：什么时候可以把求导和取极限搬到外面（本篇）</li><li><a href="/posts/69d93dfd.html">6.2 反常积分的收敛判别：为什么&quot;条件收敛&quot;如此脆弱</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用两个反例说清&quot;为什么这件事不显然&quot;</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——三个定理与条件</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;一致&quot;这个词特殊在哪的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对物理意义、数值计算与分布理论感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：能不能把求导搬到积分号外面-p-center"><center><p>一、基础：能不能把求导搬到积分号外面</p></center></h1><p>  <strong>（这一部分不需要任何含参积分的基础。我们先看清楚&quot;卡在哪&quot;。）</strong></p><h2 id="center-p-一个很自然的问题-p-center"><center><p>一个很自然的问题</p></center></h2><p>  假设有一个积分</p><p>$$I(t)=\int_a^b f(x,t),\mathrm{d}x$$</p><p>  这里 $t$ 是一个<strong>参数</strong>——积分是对 $x$ 做的，但结果会依赖 $t$。</p><p>  <strong>问</strong>：能不能直接对 $t$ 求导，把导数搬进积分号里？</p><p>$$\frac{\mathrm{d}I}{\mathrm{d}t}\stackrel{?}{=}\int_a^b\frac{\partial f}{\partial t}(x,t),\mathrm{d}x$$</p><p>  <strong>直觉说&quot;应该可以&quot;</strong>——求导是关于 $t$ 的，积分是关于 $x$ 的，两件事互不干扰。</p><p>  <strong>但这个直觉是错的。</strong></p><h2 id="center-p-为什么可能办不到-p-center"><center><p>为什么可能办不到</p></center></h2><p>  <strong>关键在于</strong>：积分是<strong>取极限</strong>（黎曼和的极限）。</p><p>  所以&quot;导数搬进积分号&quot;本质上是</p><p>$$\frac{\mathrm{d}}{\mathrm{d}t}\lim = ? \lim \frac{\mathrm{d}}{\mathrm{d}t}$$</p><p>  也就是<strong>两个极限能不能交换顺序</strong>。</p><p>  <strong>在 4.2 节我们见过这个问题</strong>：一致收敛时能交换，只是逐点收敛时不能。</p><p>  积分是&quot;连续参数的和&quot;——<strong>和级数是一回事</strong>，所以同样的麻烦会再次出现。</p><h2 id="center-p-反例-1：极限不能搬进去-p-center"><center><p>反例 1：极限不能搬进去</p></center></h2><p>  考虑</p><p>$$f_n(x)=nxe^{-nx^2},\qquad x\in[0,1]$$</p><p>  <strong>逐点极限</strong>：固定 $x&gt;0$ 时，$nxe^{-nx^2}\to0$。（$x=0$ 时也等于 0。）</p><p>  所以<strong>极限函数是 0</strong>，积分也是 0：</p><p>$$\lim_{n\to\infty}\int_0^1 f_n=\int_0^1 0,\mathrm{d}x=0$$</p><p>  <strong>但是</strong>，先算每个 $f_n$ 的积分：</p><p>$$\int_0^1nxe^{-nx^2},\mathrm{d}x=\left[-\frac12e^{-nx^2}\right]_0^1=\frac{1-e^{-n}}{2}\to\frac12$$</p><p>  <strong>两个答案不同：0 与 $\dfrac12$。</strong></p><p>  <strong>所以&quot;先取极限再积分&quot;和&quot;先积分再取极限&quot;不等价。</strong></p><div class="note info flat"><p><strong>问题出在哪</strong></p><p>  $f_n\to0$ 是<strong>逐点</strong>的：对每个固定的 $x$，$f_n(x)$ 最终会变小。</p><p>  但**&quot;最终&quot;的时刻依赖 $x$**：$x$ 越小，需要越大的 $n$。</p><p>  而 $f_n$ 在 $x=0$ 附近会形成一个<strong>越来越高的尖峰</strong>（峰值 $\approx\sqrt{n/2}$），面积始终是 $\frac12$，没有被&quot;压平&quot;。</p><p>  <strong>所以积分&quot;看到&quot;的是总面积，而逐点极限&quot;看不到&quot;那个尖峰。</strong></p><p>  <strong>一致收敛</strong>正是要排除这种情况——它要求<strong>所有 $x$ 同时</strong>收敛，不允许有地方&quot;掉队&quot;。</p></div><h2 id="center-p-反例-2：导数不能搬进去-p-center"><center><p>反例 2：导数不能搬进去</p></center></h2><p>  考虑函数列</p><p>$$f_n(x)=\frac{1}{n}\sin(n^2x)$$</p><p>  <strong>极限</strong>：$|f_n|\le\frac1n\to0$，<strong>而且是一致的</strong>（与 $x$ 无关的界）✓</p><p>  <strong>但导数</strong>：$f_n'(x)=n\cos(n^2x)$——<strong>根本不收敛</strong>，反而越来越大。</p><p>  <strong>所以</strong>：</p><p>$$\left(\lim f_n\right)'=0\qquad\text{而}\qquad\lim f_n'\ \text{不存在}$$</p><p>  <strong>求导与取极限不能交换。</strong></p><div class="note warning flat"><p><strong>为什么求导比积分更&quot;危险&quot;</strong></p><p>  <strong>积分是平均，求导是放大差异。</strong></p><p>  函数列之间的细小差别，在积分里会被&quot;抹平&quot;（平均掉），在求导里会被&quot;放大&quot;（乘上频率）。</p><p>  上面的 $f_n$：振幅是 $\frac1n$（小），但频率是 $n^2$（大）。<strong>乘积 $n$ 反而变大。</strong></p><p>  <strong>所以对&quot;求导能不能搬&quot;这件事，条件必须比&quot;积分能不能搬&quot;更严</strong>——这就是本文后面要讲的：连续性需要一致收敛，<strong>可导性需要&quot;导数一致收敛&quot;</strong>。</p></div><hr><h1 id="center-p-二、标准：含参积分的三个定理-p-center"><center><p>二、标准：含参积分的三个定理</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-连续性定理-p-center"><center><p>连续性定理</p></center></h2><blockquote><p><strong>定理 1</strong>：设 $f(x,t)$ 在矩形 $[a,b]\times[c,d]$ 上<strong>连续</strong>，则</p><p>$$I(t)=\int_a^bf(x,t),\mathrm{d}x$$</p><p>在 $[c,d]$ 上<strong>连续</strong>，且</p><p>$$\lim_{t\to t_0}\int_a^bf(x,t),\mathrm{d}x=\int_a^b \lim_{t\to t_0}f(x,t),\mathrm{d}x=\int_a^bf(x,t_0),\mathrm{d}x$$</p></blockquote><p>  <strong>即&quot;极限可以搬进积分号&quot;。</strong></p><details class="folding-tag" cyan><summary> 证明（用一致连续） </summary>              <div class='content'>              <p>  $f$ 在<strong>闭矩形</strong>上连续 ⟹ <strong>一致连续</strong>（1.3 节的定理，二维版）。</p><p>  所以对任意 $\varepsilon&gt;0$，存在 $\delta&gt;0$，使当 $|t-t_0|&lt;\delta$ 时，</p><p>$$|f(x,t)-f(x,t_0)|&lt;\frac{\varepsilon}{b-a}\qquad\text{对一切 }x\in[a,b]$$</p><p>  <strong>注意&quot;对一切 $x$&quot;是关键的</strong>——这正是&quot;一致&quot;的含义！</p><p>  于是</p><p>$$|I(t)-I(t_0)|\le\int_a^b|f(x,t)-f(x,t_0)|,\mathrm{d}x&lt;\frac{\varepsilon}{b-a}\cdot(b-a)=\varepsilon$$</p><p>  所以 $I$ 在 $t_0$ 处连续 ✓ $\blacksquare$</p>              </div>            </details><h2 id="center-p-可导性定理（Leibniz-法则）-p-center"><center><p>可导性定理（Leibniz 法则）</p></center></h2><blockquote><p><strong>定理 2</strong>：若 $f(x,t)$ 与 $\dfrac{\partial f}{\partial t}(x,t)$ 都在 $[a,b]\times[c,d]$ 上连续，则</p><p>$$I'(t)=\int_a^b\frac{\partial f}{\partial t}(x,t),\mathrm{d}x$$</p></blockquote><p>  <strong>核心条件</strong>：$\dfrac{\partial f}{\partial t}$ <strong>连续</strong>（不只是存在）。</p><details class="folding-tag" cyan><summary> 证明（对 $I$ 用中值定理 + 定理 1） </summary>              <div class='content'>              <p>  记 $g(x,t)=\dfrac{\partial f}{\partial t}(x,t)$。由<strong>定理 1</strong>，$J(t)=\displaystyle\int_a^bg(x,t),\mathrm{d}x$ 是连续的（因为 $g$ 连续）。</p><p>  要证 $I'(t)=J(t)$，等价于证</p><p>$$\frac{I(t+\Delta t)-I(t)}{\Delta t}=\frac1{\Delta t}\int_a^b\left[f(x,t+\Delta t)-f(x,t)\right]\mathrm{d}x\to J(t)$$</p><p>  <strong>对每个固定的 $x$</strong>，由中值定理：</p><p>$$f(x,t+\Delta t)-f(x,t)=g(x,\xi_x)\Delta t,\qquad \xi_x\in(t,t+\Delta t)$$</p><p>  于是</p><p>$$\frac{I(t+\Delta t)-I(t)}{\Delta t}-J(t)=\int_a^b\left[g(x,\xi_x)-g(x,t)\right]\mathrm{d}x$$</p><p>  <strong>由 $g$ 一致连续</strong>，当 $\Delta t\to0$ 时 $|g(x,\xi_x)-g(x,t)|$ 对所有 $x$ <strong>一致</strong>趋于 0。</p><p>  所以上式 $\to0$ ✓ $\blacksquare$</p>              </div>            </details><div class="note info flat"><p><strong>注意证明里用了几次&quot;一致&quot;</strong></p><p>  1. $\xi_x$ 依赖 $x$——<strong>不能用对某个固定 $x$ 的 $g$ 连续性</strong><br>  2. 必须用 $g$ 在矩形上的<strong>一致</strong>连续性，才能让 $\Delta t\to0$ 时的误差对所有 $x$ 同时小</p><p>  <strong>如果 $g$ 只连续而不一致连续</strong>（比如积分区间是开的或无界），证明就会断——这也预告了后面的反例。</p></div><h2 id="center-p-积分顺序交换定理（Fubini）-p-center"><center><p>积分顺序交换定理（Fubini）</p></center></h2><blockquote><p><strong>定理 3</strong>：若 $f(x,t)$ 在 $[a,b]\times[c,d]$ 上连续，则</p><p>$$\int_c^d\left(\int_a^bf(x,t),\mathrm{d}x\right)\mathrm{d}t=\int_a^b\left(\int_c^df(x,t),\mathrm{d}t\right)\mathrm{d}x$$</p></blockquote><p>  <strong>即两个累次积分可以交换顺序</strong>（且都等于二重积分）。</p><p>  <strong>这是 3.5 节二重积分的直接推论</strong>——但如果函数不连续（比如有无界点），就可能失效，见下文的反例。</p><h2 id="center-p-变限的-Leibniz-法则-p-center"><center><p>变限的 Leibniz 法则</p></center></h2><p>  若 $f(x,t)$ 与 $f_t$ 连续，$a(t),b(t)$ 可导，则</p><p>$$\frac{\mathrm{d}}{\mathrm{d}t}\int_{a(t)}^{b(t)}f(x,t),\mathrm{d}x=f(b(t),t)b'(t)-f(a(t),t)a'(t)+\int_{a(t)}^{b(t)}f_t(x,t),\mathrm{d}x$$</p><p>  <strong>三项的含义</strong>：</p><ul><li>前两项来自<strong>上下限在动</strong>（链式法则，见 5.3 节）</li><li>第三项来自<strong>被积函数在变</strong></li></ul><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：无条件把求导搬进积分号</strong></p><p>  需要 $f_t$ <strong>连续</strong>（在闭矩形上）。少了这个，可能出错。</p><p><strong>错误二：以为&quot;连续&quot;就够了</strong></p><p>  对可导性不够。$f$ 连续 + $f_t$ 存在但<strong>不连续</strong>，定理 2 失效。</p><p><strong>错误三：积分区间是无穷时直接套用</strong></p><p>  定理 2 要求<strong>闭区间</strong>（有界）。无穷区间需要<strong>一致收敛</strong>的额外条件（见第三节）。</p><p><strong>错误四：误解&quot;一致性&quot;的含义</strong></p><p>  &quot;一致收敛&quot;不是&quot;收敛得更快&quot;，而是&quot;<strong>收敛速度不依赖位置</strong>&quot;。反例 1 的 $f_n$ 就是每点都收敛但速度依赖 $x$。</p><p><strong>错误五：把 Fubini 用在无界积分域上不加验证</strong></p><p>  3.5 节已说过：<strong>反常重积分没有条件收敛</strong>。若积分不绝对收敛，&quot;先积 $x$ 还是先积 $t$&quot;会给出不同答案。</p><p><strong>错误六：忘记变限定理的前两项</strong></p><p>  只写积分项是<strong>最常见的漏项</strong>。</p></div><hr><h1 id="center-p-三、深入：一致收敛的作用-p-center"><center><p>三、深入：一致收敛的作用</p></center></h1><p>  <strong>（这一部分解释&quot;一致&quot;两字为什么是关键。）</strong></p><h2 id="center-p-无穷区间上的一致性判据-p-center"><center><p>无穷区间上的一致性判据</p></center></h2><p>  <strong>问题</strong>：若积分是 $\int_a^{+\infty}$，则定理 2 的证明中&quot;$\Delta t\to0$ 时误差对所有 $x$ <strong>一致</strong>趋 0&quot;不再自动成立。</p><p>  <strong>需要的条件</strong>：积分 $\displaystyle\int_a^{+\infty}f_t(x,t),\mathrm{d}x$ <strong>关于 $t$ 一致收敛</strong>。</p><h2 id="center-p-Weierstrass-判别法-center-center"><center><p>Weierstrass 判别法</center></center></h2><blockquote><p>若存在<strong>与 $t$ 无关</strong>的可积函数 $M(x)$ 使</p><p>$$|f(x,t)|\le M(x)\qquad\text{对一切 }t,\ x$$</p><p>且 $\displaystyle\int_a^{+\infty}M(x),\mathrm{d}x$ 收敛，</p><p>则 $\displaystyle\int_a^{+\infty}f(x,t),\mathrm{d}x$ <strong>关于 $t$ 一致收敛</strong>。</p></blockquote><p>  <strong>这是 4.2 节 Weierstrass 判别法的积分版</strong>——形式完全一样。</p><h2 id="center-p-经典应用：算一个用初等方法算不出的积分-p-center"><center><p>经典应用：算一个用初等方法算不出的积分</p></center></h2><p>  <strong>目标</strong>：计算</p><p>$$J=\int_0^{+\infty}\frac{\sin x}{x},\mathrm{d}x$$</p><p>  <strong>技巧</strong>：引入参数</p><p>$$I(t)=\int_0^{+\infty}e^{-tx}\frac{\sin x}{x},\mathrm{d}x\qquad(t&gt;0)$$</p><p>  <strong>第一步</strong>：直接算 $I'(t)$。由定理 2（在 $[t_0,\infty)$ 上验证一致收敛）：</p><p>$$I'(t)=-\int_0^{+\infty}e^{-tx}\sin x,\mathrm{d}x=-\frac{1}{1+t^2}$$</p><p>  <strong>第二步</strong>：积分回去</p><p>$$I(t)=-\arctan t+C$$</p><p>  <strong>第三步</strong>：定常数。当 $t\to+\infty$ 时 $e^{-tx}\to0$，所以 $I(t)\to0$。于是</p><p>$$0=-\frac{\pi}{2}+C\qquad\Longrightarrow\qquad C=\frac{\pi}{2}$$</p><p>  所以</p><p>$$I(t)=\frac{\pi}{2}-\arctan t$$</p><p>  <strong>第四步</strong>：令 $t\to0^+$，得</p><p>$$\int_0^{+\infty}\frac{\sin x}{x},\mathrm{d}x=\frac{\pi}{2}$$</p><div class="note info flat"><p><strong>这个技巧的妙处</strong></p><p>  <strong>$\int\frac{\sin x}{x}$ 没有初等原函数</strong>——所以求不出不定积分。</p><p>  但引入参数 $e^{-tx}$ 后，<strong>被积函数变成可以积出原函数的形式</strong>（$-e^{-tx}\sin x$ 有初等原函数），于是能求导、能积分。</p><p>  最后再让参数趋于极限值。</p><p>  <strong>这叫&quot;参数积分法&quot;（Feynman 技巧）</strong>——物理学家费曼很爱用它，他称之为&quot;积分号下求导&quot;。</p><p>  <strong>严格的依据就是定理 2。</strong></p></div><h2 id="center-p-为什么-一致-在证明中处处出现-p-center"><center><p>为什么&quot;一致&quot;在证明中处处出现</p></center></h2><p>  回顾定理 1、2 的证明，会发现一个共同模式：</p><p>$$\text{误差}(\Delta)&lt;\varepsilon\qquad\text{必须对一切 }x\text{ 同时成立}$$</p><p>  <strong>如果把&quot;一切 $x$&quot;换成&quot;每个固定的 $x$&quot;</strong>，就只知道点态信息，无法推出积分整体的性质。</p><p>  <strong>这是一致收敛在分析中反复出现的根本原因</strong>：</p><table><thead><tr><th>对象</th><th>需要一致性的原因</th></tr></thead><tbody><tr><td>函数列</td><td>$\int f_n\to\int f$</td></tr><tr><td>函数项级数</td><td>逐项积分</td></tr><tr><td>含参积分</td><td>极限、导数可搬进积分号</td></tr><tr><td>傅里叶级数（4.4）</td><td>连续 ≠ 一致收敛</td></tr></tbody></table><p>  <strong>同一件事的四种面孔。</strong></p><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-应用：为什么物理里可以随意交换-p-center"><center><p>应用：为什么物理里可以随意交换</p></center></h2><p>  在理论物理教材里，经常看到&quot;交换积分顺序&quot;、&quot;对参数求导&quot;直接写出来，<strong>不做任何验证</strong>。</p><p>  <strong>这是偷懒吗？</strong></p><p>  <strong>部分是的</strong>，但通常有理由：</p><ol><li><strong>物理的 (f) 通常是光滑的</strong>（阶数远高于连续）</li><li><strong>区间通常有界且远离奇异点</strong></li><li><strong>若结果和实验符合，说明交换合法</strong></li></ol><p>  <strong>但历史上也翻过车</strong>。最著名的例子是<strong>量子场论里的发散积分</strong>——那些积分根本不是绝对收敛的，&quot;交换顺序&quot;会得到有限但不正确的值。</p><p>  <strong>这类问题需要用重整化处理</strong>，而重整化的严格数学基础至今仍有争议。</p><div class="note info flat"><p><strong>一条实用建议</strong></p><p>  数值计算时若&quot;先积 $x$&quot;和&quot;先积 $t$&quot;给出<strong>不同结果</strong>，多半是：</p><ul><li>积分不绝对收敛（3.5 节的警告）</li><li>被积函数有奇点被跳过</li><li>截断误差没有控制好</li></ul><p>  <strong>这时不该选&quot;看起来更对的&quot;答案，而应该查清为什么不同。</strong></p></div><h2 id="center-p-联系：狄拉克-delta-函数的正当性-p-center"><center><p>联系：狄拉克 delta 函数的正当性</p></center></h2><p>  数学物理方程里大量使用</p><p>$$\int_{-\infty}^{+\infty}\delta(x)f(x),\mathrm{d}x=f(0)$$</p><p>  <strong>但 $\delta$ 不是函数</strong>——严格说，它是<strong>分布</strong>（广义函数）。</p><p>  <strong>严格的构造</strong>是用含参积分做逼近：</p><p>$$\delta_\varepsilon(x)=\frac{1}{\pi}\frac{\varepsilon}{x^2+\varepsilon^2}\qquad(\varepsilon&gt;0)$$</p><p>  对每个 $\varepsilon&gt;0$，$\delta_\varepsilon$ 是普通函数，积分正常。</p><p>  <strong>当 $\varepsilon\to0$ 时</strong>，$\delta_\varepsilon\to\delta$（在分布意义下）。</p><p>  <strong>所以&quot;把极限搬进积分&quot;这件事，正是定义分布的核心</strong>——而本文讲的一致收敛条件，就是&quot;什么时候这么做合法&quot;的答案。</p><p>  <strong>本站联系</strong>：「数学物理方程」系列用 $\delta$ 构造格林函数（MPE 3.3），而严格理解它需要本文这套工具。</p><h2 id="center-p-应用：数值求导为什么不稳-p-center"><center><p>应用：数值求导为什么不稳</p></center></h2><p>  <strong>反例 2</strong> 里 $f_n'=n\cos(n^2x)$ 不收敛，说明<strong>求导是放大的</strong>。</p><p>  <strong>数值上的后果</strong>：用差分近似导数</p><p>$$f'(x)\approx\frac{f(x+h)-f(x)}{h}$$</p><p>  若 $f$ 的测量有噪声 $\eta$（量级 $\delta$），则</p><p>$$\text{误差}\approx\frac{2\delta}{h}+\frac{h^2}{6}|f'''|$$</p><p>  <strong>第一项随 $h$ 变小而变大</strong>——这就是&quot;数值求导不稳定&quot;的根源。</p><p>  <strong>最优步长</strong>：令两项相等，得 $h\sim\delta^{1/3}$，误差 $\sim\delta^{2/3}$。</p><p>  <strong>对比</strong>：数值<strong>积分</strong>（梯形法）的误差是 $O(h^2)$，<strong>可以随 $h$ 任意变小</strong>。</p><p>  <strong>所以&quot;求导放大误差、积分抹平误差&quot;这个二元对立，在数值计算里是核心事实。</strong></p><h2 id="center-p-历史-p-center"><center><p>历史</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1690s</td><td>莱布尼茨</td><td>积分号下的微分（形式推导）</td></tr><tr><td>1880s</td><td>达布、阿贝尔</td><td>一致收敛的早期使用</td></tr><tr><td><strong>1890s</strong></td><td><strong>阿贝尔、Seidel</strong></td><td>一致收敛概念明确化</td></tr><tr><td>1900s</td><td>费耶尔、勒贝格</td><td>逐项积分与交换顺序的完整理论</td></tr><tr><td>1930s</td><td>布赫纳、Saks</td><td>含参积分的系统处理</td></tr></tbody></table><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</span><span class="reference-title">参考资料</span></span></span>——第 7 章函数序列与函数项级数、第 9 章含参积分。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">FEYNMAN R P. Surely You‘re Joking, Mr. Feynman![M]. New York: W. W. Norton, 1985.</span><span class="reference-title">参考资料</span></span></span>——费曼讲述他如何使用&quot;积分号下求导&quot;。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>结论</th><th>条件</th></tr></thead><tbody><tr><td><strong>连续性可搬</strong></td><td>$f$ 在闭矩形连续</td></tr><tr><td><strong>求导可搬</strong></td><td>$f_t$ 在闭矩形连续</td></tr><tr><td><strong>积序可换</strong></td><td>$f$ 在闭矩形连续</td></tr><tr><td><strong>无限区间</strong></td><td>需要<strong>一致收敛</strong>（Weierstrass 判别法）</td></tr><tr><td><strong>反例 1</strong></td><td>$nxe^{-nx^2}$：逐点 $\to0$ 但积分 $\to\frac12$</td></tr><tr><td><strong>反例 2</strong></td><td>$\frac1n\sin(n^2x)$：一致 $\to0$ 但导数不收敛</td></tr><tr><td><strong>核心</strong></td><td>积分是平均（抹平），求导是放大</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>含参积分讲完了，第 6 章还剩一块：**反常积分（广义积分）**的更深入部分。</p><p>  3.4 节已经讲过基本的判敛法。这一章要补的是：</p><blockquote><p><strong>反常积分与级数的精确对应关系</strong></p></blockquote><p>  比如：为什么 $\displaystyle\int_1^\infty\frac{\mathrm{d}x}{x^p}$ 与 $\displaystyle\sum\frac1{n^p}$ 同时收敛？</p><p>  以及：<strong>反常积分的&quot;条件收敛&quot;到底有多脆弱</strong>——它不像数项级数那样可以随便重排。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">华东师范大学数学科学学院. 数学分析: 下册[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第十九章含参变量积分。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</span><span class="reference-title">参考资料</span></span></span>——第 7 章、第 9 章。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">FEYNMAN R P. Surely You‘re Joking, Mr. Feynman![M]. New York: W. W. Norton, 1985.</span><span class="reference-title">参考资料</span></span></span>——积分号下求导的轶事。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://abook.hep.com.cn/1210369" target="_blank" rel="noopener">华东师范大学数学科学学院. 数学分析: 下册[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://openlibrary.org/books/OL5195991M" target="_blank" rel="noopener">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://openlibrary.org/works/OL514629W" target="_blank" rel="noopener">FEYNMAN R P. Surely You‘re Joking, Mr. Feynman![M]. New York: W. W. Norton, 1985.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①积分号下能求导吗？用两个反例说明&quot;看起来该成立的事&quot;其实会失败；②含参积分的连续性、可导性与一致性条件；③一致收敛的判别方法与完整证明；④为什么这决定了&quot;先积 x 还是先积 t&quot;的合法性，以及它在物理与数值计算中的意义</summary>
    
    
    
    <category term="数学分析" scheme="https://hsmk.mikufans.date/categories/%E6%95%B0%E5%AD%A6%E5%88%86%E6%9E%90/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>数学分析 5.4：多元函数的极值——为什么&quot;驻点&quot;不够</title>
    <link href="https://hsmk.mikufans.date/posts/78bfd5cf.html"/>
    <id>https://hsmk.mikufans.date/posts/78bfd5cf.html</id>
    <published>2026-11-17T20:20:00.000Z</published>
    <updated>2026-11-17T20:20:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>数学分析 导航栏</strong></p><ul><li><a href="/posts/cfe53629.html">系列总览与导航</a><br>第 1 章 实数、极限与微分<ul><li><a href="/posts/a4efc3f8.html">1.1 实数完备性：一切从这条公理开始</a></li><li><a href="/posts/ac14083c.html">1.2 数列极限：ε-N 语言到底在说什么</a></li><li><a href="/posts/6fe04a7.html">1.3 函数极限与连续性：闭区间三大定理</a></li><li><a href="/posts/3a8afdfc.html">1.4 导数与微分：切线到底是什么</a></li><li><a href="/posts/2f0bf545.html">1.5 中值定理：微分学的枢纽</a></li><li><a href="/posts/2b2f3724.html">1.6 泰勒公式：三种余项分别在说什么</a><br>第 2 章 微分学的应用</li><li><a href="/posts/4cb59847.html">2.1 七种不定式与洛必达法则的完整版</a></li><li><a href="/posts/fcd48ee1.html">2.2 极值、凹凸与函数作图</a><br>第 3 章 积分学</li><li><a href="/posts/405f6561.html">3.1 黎曼积分：这个定义为什么这么绕</a></li><li><a href="/posts/862d8a0a.html">3.2 微积分基本定理：最漂亮的一个定理</a></li><li><a href="/posts/ef2174eb.html">3.3 定积分的应用：从面积到弧长的统一套路</a></li><li><a href="/posts/e314c779.html">3.4 广义积分：为什么 1/x 发散而 1/x² 收敛</a></li><li><a href="/posts/aa220344.html">3.5 二重积分与重积分换元：雅可比行列式从哪来</a></li><li><a href="/posts/271eeb68.html">3.6 曲线积分与曲面积分：两类积分的区别到底在哪</a></li><li><a href="/posts/23318654.html">3.7 格林·高斯·斯托克斯：三个公式其实是同一个</a><br>第 4 章 级数</li><li><a href="/posts/5828afd0.html">4.1 数项级数：什么时候可以&quot;无限加下去&quot;</a></li><li><a href="/posts/e8e706c1.html">4.2 一致收敛：为什么&quot;每点都收敛&quot;还不够</a></li><li><a href="/posts/e2bdc01d.html">4.3 幂级数：泰勒展开什么时候成立</a></li><li><a href="/posts/9f286131.html">4.4 傅里叶级数：为什么&quot;不光滑&quot;也能展开</a><br>第 5 章 多元微分学</li><li><a href="/posts/75523d8c.html">5.1 多元极限与连续：一维的直觉在这里全部失效</a></li><li><a href="/posts/c5d9aa8a.html">5.2 偏导、全微分与方向导数：为什么&quot;偏导存在&quot;什么都不保证</a></li><li><a href="/posts/938b8e60.html">5.3 链式法则与隐函数定理：为什么&quot;链式&quot;会变成加法</a></li><li>5.4 多元函数的极值：为什么&quot;驻点&quot;不够（本篇）<br>第 6 章 含参积分与反常积分</li><li><a href="/posts/b2a8135e.html">6.1 含参变量积分：什么时候可以把求导和取极限搬到外面</a></li><li><a href="/posts/69d93dfd.html">6.2 反常积分的收敛判别：为什么&quot;条件收敛&quot;如此脆弱</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用山坡、碗、马鞍建立直觉</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——Hessian 判别法与 Lagrange 乘子</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;判别式从哪来&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对最优化、机器学习的联系感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：驻点为什么不够-p-center"><center><p>一、基础：驻点为什么不够</p></center></h1><p>  <strong>（这一部分不需要任何微积分基础。）</strong></p><h2 id="center-p-先回忆一维的做法-p-center"><center><p>先回忆一维的做法</p></center></h2><p>  一维求极值，套路很清楚：</p><ol><li>求导数为零的点（<strong>驻点</strong>）</li><li>在驻点上用二阶导数判断：$f''&gt;0$ 是极小，$f''&lt;0$ 是极大，$f''=0$ 判不出来</li></ol><p>  <strong>直观</strong>：$f'=0$ 说明切线水平（<strong>站住了</strong>）；$f''&gt;0$ 说明<strong>开口向上</strong>（碗底），$f''&lt;0$ 说明<strong>开口向下</strong>（山顶）。</p><h2 id="center-p-多元时-水平-是什么意思-p-center"><center><p>多元时&quot;水平&quot;是什么意思</p></center></h2><p>  在一座山上，&quot;站住&quot;的意思是：<strong>朝任何方向走，海拔都不再立刻升高或降低</strong>。</p><p>  数学上就是：<strong>所有偏导数为零</strong>。</p><p>$$\frac{\partial f}{\partial x}=0,\qquad \frac{\partial f}{\partial y}=0$$</p><p>  <strong>（这等价于梯度 $\nabla f=\vec 0$。）</strong></p><h2 id="center-p-但-站住-可能是马鞍-p-center"><center><p>但&quot;站住&quot;可能是马鞍</p></center></h2><p>  <strong>关键的新情况</strong>：在山里站住，不一定是在山顶或谷底。</p><p>  考虑<strong>马鞍形</strong>：</p><p>$$f(x,y)=x^2-y^2$$</p><p>  原点处两个偏导都是零（站住了）。但：</p><ul><li><strong>沿 $x$ 轴走</strong>：$f=x^2$，<strong>向上弯</strong>（像碗）</li><li><strong>沿 $y$ 轴走</strong>：$f=-y^2$，<strong>向下弯</strong>（像山脊）</li></ul><p>  <strong>所以原点既不是极大也不是极小</strong>——它是<strong>鞍点</strong>。</p><div class="note info flat"><p><strong>这就是多元与一维最本质的差别</strong></p><p>  一维时，站在驻点上只有两个方向可言（左右），所以只有&quot;都向上&quot;和&quot;都向下&quot;两种可能（或者一边平，如 $x^3$）。</p><p>  二维时，<strong>方向有无穷多个</strong>。它们可能：</p><ul><li>全部向上 → 极小</li><li>全部向下 → 极大</li><li><strong>有的向上有的向下 → 鞍点</strong></li></ul><p>  <strong>所以要判断极值，必须同时看所有方向</strong>——这就需要比&quot;二阶导数&quot;更多的东西。</p><p>  <strong>那个东西叫 Hessian 矩阵。</strong></p></div><h2 id="center-p-鞍点在现实中很多-p-center"><center><p>鞍点在现实中很多</p></center></h2><p>  <strong>为什么要在意鞍点？</strong> 因为它在实际问题是<strong>常态而不是例外</strong>：</p><ul><li><strong>博弈论</strong>：你选策略、对手选策略，收益函数的鞍点就是<strong>纳什均衡</strong>——你没法通过单方面改变提高收益</li><li><strong>机器学习</strong>：高维损失函数的驻点里，<strong>绝大多数是鞍点</strong>，不是极小值</li><li><strong>化学</strong>：反应路径上的<strong>过渡态</strong>就是能量面的鞍点</li></ul><p>  <strong>所以&quot;找到驻点&quot;只是第一步，&quot;分类驻点&quot;才是关键。</strong></p><hr><h1 id="center-p-二、标准：Hessian-判别法与-Lagrange-乘子-p-center"><center><p>二、标准：Hessian 判别法与 Lagrange 乘子</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-必要条件-p-center"><center><p>必要条件</p></center></h2><blockquote><p><strong>定理</strong>：若 $f$ 在 $P_0$ 处<strong>可微</strong>且取到极值，则</p><p>$$\nabla f(P_0)=\vec 0$$</p></blockquote><p>  <strong>注意这是必要条件，不是充分条件</strong>——$\nabla f=0$ 但可能既非极大也非极小（鞍点），也可能根本不是极值点。</p><p>  <strong>另外</strong>：极值也可能出现在<strong>不可微的点</strong>（如 $f=\sqrt{x^2+y^2}$ 在原点）或<strong>边界上</strong>。</p><h2 id="center-p-Hessian-矩阵-p-center"><center><p>Hessian 矩阵</p></center></h2><p>  定义</p><p>$$H=\begin{pmatrix}\dfrac{\partial^2 f}{\partial x^2}&amp;\dfrac{\partial^2 f}{\partial x\partial y}\[8pt]\dfrac{\partial^2 f}{\partial y\partial x}&amp;\dfrac{\partial^2 f}{\partial y^2}\end{pmatrix}$$</p><p>  <strong>当二阶偏导连续时，$H$ 是对称矩阵。</strong></p><h2 id="center-p-判别法（二元情形）-p-center"><center><p>判别法（二元情形）</p></center></h2><p>  设 $\nabla f(P_0)=0$，记</p><p>$$A=f_{xx}(P_0),\qquad B=f_{xy}(P_0),\qquad C=f_{yy}(P_0),\qquad \Delta=AC-B^2$$</p><p>  （$\Delta$ 就是 $H$ 的行列式。）</p><table><thead><tr><th>条件</th><th>结论</th></tr></thead><tbody><tr><td>$\Delta&gt;0$ 且 $A&gt;0$</td><td><strong>极小值</strong></td></tr><tr><td>$\Delta&gt;0$ 且 $A&lt;0$</td><td><strong>极大值</strong></td></tr><tr><td>$\Delta&lt;0$</td><td><strong>鞍点</strong>（非极值）</td></tr><tr><td>$\Delta=0$</td><td><strong>判别法失效</strong>，需另想办法</td></tr></tbody></table><div class="note warning flat"><p><strong>为什么 $A&gt;0$ 和 $\Delta&gt;0$ 都是必要的</strong></p><p>  $\Delta=AC-B^2&gt;0$ 意味着 $A$ 和 $C$ <strong>同号</strong>（因为 $AC&gt;B^2\ge0$）。</p><p>  <strong>为什么需要同号</strong>：如果 $A&gt;0$ 而 $C&lt;0$，那么沿 $x$ 方向向上弯、沿 $y$ 方向向下弯——<strong>是鞍点</strong>。</p><p>  <strong>为什么 $\Delta&lt;0$ 一定是鞍点</strong>：$AC&lt;B^2$ 意味着 $A$、$C$ 异号或至少有一个为负——总有某个方向是&quot;向下弯&quot;的。</p><p>  <strong>$\Delta=0$ 为什么失效</strong>：这时 $AC=B^2$，无法确定符号。例如 $f=x^4+y^4$（$\Delta=0$，原点确实是极小）和 $f=x^4-y^4$（$\Delta=0$，原点是鞍点）——<strong>同样的判别值，不同结论</strong>。</p></div><h2 id="center-p-例-1：-f-x-y-x-2-y-2-p-center"><center><p>例 1：$f(x,y)=x^2-y^2$</p></center></h2><p>  $\nabla f=(2x,-2y)=0$ ⟹ 驻点 $(0,0)$。</p><p>$$A=2,\qquad B=0,\qquad C=-2\qquad\Longrightarrow\qquad \Delta=2\cdot(-2)-0=-4&lt;0$$</p><p>  <strong>$\Delta&lt;0$ ⟹ 鞍点</strong> ✓（与第一部分直觉一致）</p><h2 id="center-p-例-2：-f-x-y-x-2-xy-y-2-p-center"><center><p>例 2：$f(x,y)=x^2+xy+y^2$</p></center></h2><p>  $\nabla f=(2x+y,\ x+2y)=0$，解得 $x=y=0$。</p><p>$$A=2,\qquad B=1,\qquad C=2\qquad\Longrightarrow\qquad \Delta=4-1=3&gt;0$$</p><p>  $\Delta&gt;0$ 且 $A=2&gt;0$ ⟹ <strong>极小值</strong> $f(0,0)=0$ ✓</p><h2 id="center-p-条件极值：Lagrange-乘子法-p-center"><center><p>条件极值：Lagrange 乘子法</p></center></h2><p>  <strong>问题</strong>：在约束 $g(x,y)=0$ 下求 $f(x,y)$ 的极值。</p><p>  <strong>几何想法</strong>：在最优点，$f$ 的等值线必须<strong>与约束曲线相切</strong>——否则可以沿约束曲线移动来增大/减小 $f$。</p><p>  相切 ⟺ <strong>两个梯度平行</strong>：</p><p>$$\nabla f=\lambda\nabla g$$</p><blockquote><p><strong>Lagrange 乘子法</strong>：解方程组</p><p>$$\nabla f=\lambda\nabla g,\qquad g(x,y)=0$$</p><p>得到的点就是<strong>条件驻点</strong>候选。</p></blockquote><p>  <strong>具体到二元二元约束</strong>：</p><p>$$\begin{cases}f_x=\lambda g_x\\ f_y=\lambda g_y\\ g(x,y)=0\end{cases}$$</p><p>  三个方程、三个未知数 $(x,y,\lambda)$。</p><div class="note info flat"><p><strong>为什么要引入 $\lambda$</strong></p><p>  我们想要&quot;$\nabla f$ 与 $\nabla g$ 平行&quot;，但&quot;平行&quot;不好写方程。</p><p>  引入一个比例系数 $\lambda$，就能写成<strong>等式</strong> $\nabla f=\lambda\nabla g$。</p><p>  <strong>另一种理解</strong>：构造 $L(x,y,\lambda)=f(x,y)-\lambda g(x,y)$，然后对 $x,y,\lambda$ 求偏导置零：</p><p>$$\frac{\partial L}{\partial x}=f_x-\lambda g_x=0,\qquad \frac{\partial L}{\partial y}=f_y-\lambda g_y=0,\qquad \frac{\partial L}{\partial\lambda}=-g=0$$</p><p>  <strong>正是同一个方程组</strong>。这叫<strong>Lagrange 函数</strong>，$\lambda$ 叫<strong>乘子</strong>。</p></div><h2 id="center-p-例-3：圆上的最值-p-center"><center><p>例 3：圆上的最值</p></center></h2><p>  在 $x^2+y^2=1$ 上求 $f(x,y)=xy$ 的最大最小值。</p><p>  <strong>步骤一</strong>：写出方程组</p><p>$$\begin{cases}y=2\lambda x\\ x=2\lambda y\\ x^2+y^2=1\end{cases}$$</p><p>  <strong>步骤二</strong>：解。把第一式代入第二式：$x=2\lambda(2\lambda x)=4\lambda^2x$。</p><p>  若 $x\ne0$：$4\lambda^2=1$ ⟹ $\lambda=\pm\frac12$。由第一式 $y=\pm x$。</p><p>  代回约束：$x^2+x^2=1$ ⟹ $x=\pm\frac{1}{\sqrt2}$。</p><p>  <strong>四个候选点</strong>：$\left(\pm\frac{1}{\sqrt2},\pm\frac{1}{\sqrt2}\right)$。</p><p>  <strong>若 $x=0$</strong>：则 $y=0$，但不在圆上——矛盾。</p><p>  <strong>步骤三</strong>：比较函数值</p><p>$$f=xy=\pm\frac12$$</p><p>  <strong>所以最大值 $\dfrac12$，最小值 $-\dfrac12$</strong> ✓</p><p>  <strong>验证</strong>：用三角代换 $x=\cos\theta,y=\sin\theta$，$f=\frac12\sin2\theta$，值域确为 $\left[-\frac12,\frac12\right]$ ✓</p><hr><h1 id="center-p-三、深入：判别法从哪来-p-center"><center><p>三、深入：判别法从哪来</p></center></h1><p>  <strong>（这一部分是完整的推导思路。）</strong></p><h2 id="center-p-二次型与正定性-p-center"><center><p>二次型与正定性</p></center></h2><p>  <strong>核心思想</strong>：在驻点附近，函数可以<strong>用二次型近似</strong>：</p><p>$$f(P_0+\Delta\vec r)-f(P_0)\approx\frac12\Delta\vec r^{\top}H,\Delta\vec r$$</p><p>  <strong>所以极值的类型完全由这个二次型的符号决定。</strong></p><details class="folding-tag" cyan><summary> 推导（用泰勒公式） </summary>              <div class='content'>              <p>  由二阶泰勒公式（见 1.6 节）：</p><p>$$f(P_0+\vec h)=f(P_0)+\nabla f(P_0)^{\top}\vec h+\frac12\vec h^{\top}H\vec h+o(\lVert\vec h\rVert^2)$$</p><p>  在驻点处 $\nabla f(P_0)=0$，所以</p><p>$$f(P_0+\vec h)-f(P_0)=\frac12\vec h^{\top}H\vec h+o(\lVert\vec h\rVert^2)$$</p><p>  <strong>判断</strong>：</p><ul><li>若二次型 $\vec h^{\top}H\vec h$ <strong>恒正</strong>（$H$ <strong>正定</strong>）⟹ 对足够小的 $\vec h$，$f-f(P_0)&gt;0$ ⟹ <strong>极小</strong></li><li>若<strong>恒负</strong>（$H$ <strong>负定</strong>）⟹ <strong>极大</strong></li><li>若<strong>可正可负</strong>（$H$ <strong>不定</strong>）⟹ <strong>鞍点</strong></li><li>若<strong>有零但不取负</strong>（半正定）⟹ <strong>判别法失效</strong>，$o$ 项决定</li></ul>              </div>            </details><h2 id="center-p-二元正定性判定：-AC-B-2-的来源-p-center"><center><p>二元正定性判定：$AC-B^2$ 的来源</p></center></h2><p>  二元二次型</p><p>$$Q(h,k)=Ah^2+2Bhk+Ck^2$$</p><p>  <strong>配方</strong>（$A\ne0$ 时）：</p><p>$$Q=A\left(h+\frac{B}{A}k\right)^2+\left(C-\frac{B^2}{A}\right)k^2=A\left(h+\frac BAk\right)^2+\frac{AC-B^2}{A}k^2$$</p><p>  <strong>关键看系数</strong>：</p><ul><li>若 $AC-B^2&gt;0$ <strong>且</strong> $A&gt;0$：两个系数都 $&gt;0$ ⟹ <strong>恒正</strong> ⟹ <strong>正定</strong></li><li>若 $AC-B^2&gt;0$ <strong>且</strong> $A&lt;0$：两个系数都 $&lt;0$ ⟹ <strong>恒负</strong> ⟹ <strong>负定</strong></li><li>若 $AC-B^2&lt;0$：第二个系数与 $A$ <strong>异号</strong> ⟹ 一个方向正、一个方向负 ⟹ <strong>不定</strong>（鞍点）</li><li>若 $AC-B^2=0$：第二个系数为 0 ⟹ $Q=A(h+Bk/A)^2$，<strong>在某条线上取零</strong> ⟹ 半定，<strong>判别失效</strong></li></ul><p>  <strong>这就是判别表里 $AC-B^2$ 的完整来历</strong>——它就是<strong>配方的结果</strong>。</p><div class="note info flat"><p><strong>$A=0$ 时怎么办</strong></p><p>  上面的配方假设 $A\ne0$。</p><p>  若 $A=0$，则 $Q=2Bhk+Ck^2$。此时：</p><ul><li>若 $B\ne0$：取 $h=k$ 得 $(2B+C)k^2$，取 $h=-k$ 得 $(-2B+C)k^2$——<strong>异号</strong> ⟹ <strong>不定</strong>（鞍点）</li><li>若 $B=0$：$Q=Ck^2$ ⟹ 半定 ⟹ 判别失效</li></ul><p>  <strong>对照判别表</strong>：$A=0,B\ne0$ 时 $\Delta=0-B^2&lt;0$ ⟹ 鞍点 ✓；$A=B=0$ 时 $\Delta=0$ ⟹ 失效 ✓</p><p>  <strong>所以配方法覆盖了所有情况。</strong></p></div><h2 id="center-p-n-元情形：特征值判据-p-center"><center><p>$n$ 元情形：特征值判据</p></center></h2><p>  一般地，$H$ 是 $n\times n$ 对称矩阵。设其特征值为 $\lambda_1,\dots,\lambda_n$。</p><p>  由<strong>谱定理</strong>，存在正交矩阵使 $H=Q\Lambda Q^{\top}$，于是</p><p>$$\vec h^{\top}H\vec h=\sum_{i=1}^{n}\lambda_i(\vec q_i^{\top}\vec h)^2$$</p><p>  <strong>所以符号完全由特征值决定</strong>：</p><table><thead><tr><th>特征值</th><th>$H$</th><th>结论</th></tr></thead><tbody><tr><td>全部 $&gt;0$</td><td>正定</td><td>极小</td></tr><tr><td>全部 $&lt;0$</td><td>负定</td><td>极大</td></tr><tr><td>有正有负</td><td>不定</td><td>鞍点</td></tr><tr><td>有零，其余同号</td><td>半定</td><td><strong>判别失效</strong></td></tr></tbody></table><p>  <strong>注意最后一行的严重性</strong>：半定时需要看更高阶项，而高维里这几乎不可能有通用判据。</p><h2 id="center-p-边界极值与内点极值-p-center"><center><p>边界极值与内点极值</p></center></h2><p>  <strong>闭区域上的最值</strong>要检查三处：</p><ol><li><strong>内部驻点</strong>（$\nabla f=0$）</li><li><strong>不可微点</strong></li><li><strong>边界上的点</strong>（用 Lagrange 乘子或直接参数化）</li></ol><div class="note danger flat"><p><strong>漏掉边界是最常见的错误</strong></p><p>  求 $f(x,y)=x^2+y^2$ 在<strong>单位圆盘</strong> $x^2+y^2\le1$ 上的最大值。</p><p>  <strong>只找驻点</strong>：$\nabla f=0$ ⟹ $(0,0)$，$f=0$——但这是<strong>最小值</strong>。</p><p>  <strong>最大值在边界</strong>：$x^2+y^2=1$ 上 $f\equiv1$，所以最大值是 1。</p><p>  <strong>如果只在内部找，会得到完全错误的答案。</strong></p><p>  <strong>检查清单</strong>：内部 → 不可微 → 边界，三处都要。</p></div><h2 id="center-p-常见误解-p-center"><center><p>常见误解</p></center></h2><div class="note danger flat"><p><strong>误解一：「$\nabla f=0$ 就是极值」</strong></p><p>  可能是鞍点。$f=x^2-y^2$ 在原点。</p><p><strong>误解二：「$\Delta&lt;0$ 是极大值」</strong></p><p>  $\Delta&lt;0$ 是<strong>鞍点</strong>，不是极值。$\Delta&gt;0$ 才讨论极大极小。</p><p><strong>误解三：「$\Delta=0$ 是鞍点」</strong></p><p>  $\Delta=0$ 时<strong>判别失效</strong>，可能是极小、极大或鞍点。</p><p><strong>误解四：「Lagrange 乘子求出的点一定是极值点」</strong></p><p>  只是<strong>候选点</strong>，还要逐个比较函数值。而且<strong>方法只给出必要条件</strong>。</p><p><strong>误解五：「Lagrange 乘子法总能找到最值」</strong></p><p>  若 $\nabla g=0$（约束退化，如 $g$ 的等值线自交或退化），方法失效。这正是 5.3 节隐函数定理的条件。</p><p><strong>误解六：「$n$ 元极值可以先对每个变量分别求」</strong></p><p>  完全错误。$f(x,y)=x^2-y^2$ 对每个变量单独看都有极值（各在 $x=0$、$y=0$），但联合起来是鞍点。<strong>必须看 Hessian。</strong></p></div><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-联系：梯度下降为什么怕鞍点-p-center"><center><p>联系：梯度下降为什么怕鞍点</p></center></h2><p>  机器学习里最常用的优化方法是<strong>梯度下降</strong>：</p><p>$$\vec x_{k+1}=\vec x_k-\eta\nabla f(\vec x_k)$$</p><p>  <strong>它在驻点附近会怎样？</strong> 由二次近似：</p><p>$$\vec x_{k+1}-\vec x^{\ast}\approx(I-\eta H)(\vec x_k-\vec x^{\ast})$$</p><p>  <strong>收敛条件是 $|1-\eta\lambda_i|&lt;1$ 对所有特征值成立</strong>，即</p><p>$$0&lt;\eta\lambda_i&lt;2$$</p><p>  <strong>关键的观察</strong>：</p><ul><li><strong>负特征值处</strong>（鞍点的下降方向）：$1-\eta\lambda_i&gt;1$，<strong>会发散</strong>（除非步长极小）</li><li><strong>正特征值处</strong>：收敛</li><li><strong>极小值处</strong>（全部正）：可以收敛</li></ul><p>  <strong>所以在鞍点附近，梯度下降会沿负特征值方向快速逃逸</strong>——这其实是好事：它不会停在鞍点。</p><p>  但<strong>在近乎平坦的方向上（$\lambda_i\approx0$），梯度会非常小</strong>，于是&quot;停住&quot;很久——这才是深度学习中&quot;鞍点问题&quot;的真正形态。</p><div class="note info flat"><p><strong>这就是为什么深度学习要用动量法</strong></p><p>  动量法 $\vec v_{k+1}=\beta\vec v_k-\eta\nabla f$ 相当于在低梯度方向<strong>积累速度</strong>，帮助穿过平台区。</p><p>  而 Adam 的自适应步长，则是对<strong>不同方向用不同的 $\eta$</strong>——本质上是<strong>按 Hessian 的特征值方向调整尺度</strong>。</p><p>  <strong>所以那些&quot;调参技巧&quot;都能从本节的正定性分析里找到解释。</strong></p></div><h2 id="center-p-应用：从-Lagrange-乘子到变分法-p-center"><center><p>应用：从 Lagrange 乘子到变分法</p></center></h2><p>  <strong>Lagrange 乘子法解决的是&quot;有限维约束优化&quot;</strong>：</p><p>$$\min f(\vec x)\quad\text{s.t.}\quad g(\vec x)=0,\quad \vec x\in\mathbb{R}^n$$</p><p>  <strong>把它推广到无穷维</strong>，就得到<strong>变分法</strong>——约束不再是有限个方程，而是一个函数：</p><p>$$\min J[u]\quad\text{s.t.}\quad u\in\mathcal{X}$$</p><p>  <strong>数值解系列第 5 章（变分方法与有限元）</strong> 讲的就是这个：把&quot;求函数极值&quot;转化为&quot;解 Euler-Lagrange 方程&quot;。</p><p>  <strong>有限元方法</strong>：在有限维子空间里做变分，得到线性方程组。<strong>这与 Lagrange 乘子法是同一个思路的不同维度。</strong></p><p>  <strong>本站联系</strong>：</p><ul><li>数学分析 5.4（本篇）：有限维，约束是方程</li><li>微分方程数值解 5.1：无穷维，约束是函数</li><li>微分方程数值解 5.4：Ritz 法与 Galerkin 法</li></ul><h2 id="center-p-应用：鞍点与博弈论-p-center"><center><p>应用：鞍点与博弈论</p></center></h2><p>  两人零和博弈中，设玩家一的收益函数为 $u(x,y)$（$x$ 是他的策略，$y$ 是对手的）。</p><p>  <strong>最优策略</strong>是</p><p>$$\min_x\max_y u(x,y)=\max_y\min_x u(x,y)$$</p><p>  这个等号<strong>不是总成立</strong>——成立的条件正是 <strong>$u$ 存在鞍点</strong>。</p><p>  <strong>冯·诺依曼的极小极大定理</strong>（1928）证明了：在混合策略（允许随机化）下，鞍点总是存在。</p><p>  <strong>这就是博弈论存在&quot;纳什均衡&quot;的基础之一。</strong></p><h2 id="center-p-历史-p-center"><center><p>历史</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1750s</td><td>欧拉与 Lagrange</td><td>变分法与条件极值</td></tr><tr><td>1760s</td><td>Lagrange</td><td>乘子法（&quot;未定乘数法&quot;）</td></tr><tr><td>1928</td><td>冯·诺依曼</td><td>极小极大定理</td></tr><tr><td>1950s</td><td>Kuhn 与 Tucker</td><td>KKT 条件（乘子法的不等式版本）</td></tr></tbody></table><p>  <strong>KKT 条件</strong>是现代最优化的基石：它把&quot;约束&quot;从等式推广到不等式，使问题能处理&quot;某个变量必须非负&quot;这类实际约束。</p><p>  <strong>形式</strong>：若 $\vec x^*$ 是 $\min f$ 在 $g_i(\vec x)\le0$ 下的最优解，则存在 $\mu_i\ge0$ 使</p><p>$$\nabla f+\sum\mu_i\nabla g_i=0,\qquad \mu_ig_i=0$$</p><p>  最后一条叫<strong>互补松弛条件</strong>——&quot;约束要么起作用（$g_i=0$），要么乘子为零&quot;。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">ROCKAFELLAR R T. Convex Analysis[M]. Princeton: Princeton University Press, 1970.</span><span class="reference-title">参考资料</span></span></span>——凸分析，条件极值的系统理论。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">BOYD S, VANDENBERGHE L. Convex Optimization[M]. Cambridge: Cambridge University Press, 2004.</span><span class="reference-title">参考资料</span></span></span>——KKT 条件与凸优化的现代标准教材。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>必要条件</strong></td><td>$\nabla f=0$（驻点），但不充分</td></tr><tr><td><strong>Hessian 判别</strong></td><td>$\Delta=AC-B^2$；$\Delta&gt;0$ 看 $A$ 的符号，$\Delta&lt;0$ 是鞍点，$\Delta=0$ 失效</td></tr><tr><td><strong>为什么</strong></td><td>二阶泰勒 + 二次型的<strong>正定性</strong>决定符号</td></tr><tr><td><strong>$n$ 元判据</strong></td><td>看 Hessian 的<strong>特征值</strong>；半定时失效</td></tr><tr><td><strong>条件极值</strong></td><td>$\nabla f=\lambda\nabla g$（Lagrange 乘子）</td></tr><tr><td><strong>几何意义</strong></td><td>等值线与约束曲线<strong>相切</strong></td></tr><tr><td><strong>边界</strong></td><td>闭区域最值必须检查内部 + 不可微点 + 边界</td></tr></tbody></table><div class="note info flat"><p><strong>下一章预告</strong></p><p>第 5 章讲完了多元微分学的基本内容。<strong>第 6 章会转向一个新的方向</strong>——</p><p>  这五章（实数完备性 → 极限 → 微分 → 积分 → 多元）构成了数学分析的标准骨架。</p><p>  <strong>但还缺一块重要的东西</strong>：<strong>反常积分与含参变量积分</strong>。</p><p>  那里会出现一个新现象：</p><blockquote><p><strong>同一个积分，先对 $x$ 积还是先对 $t$ 积，结果可能不同。</strong></p></blockquote><p>  这和 4.1 节&quot;绝对收敛才能重排&quot;是同一类问题——<strong>只是因为这里连续了，变量比级数更多</strong>。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">华东师范大学数学科学学院. 数学分析: 下册[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第十八章隐函数定理与条件极值。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">ROCKAFELLAR R T. Convex Analysis[M]. Princeton: Princeton University Press, 1970.</span><span class="reference-title">参考资料</span></span></span>——条件极值与凸分析。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">BOYD S, VANDENBERGHE L. Convex Optimization[M]. Cambridge: Cambridge University Press, 2004.</span><span class="reference-title">参考资料</span></span></span>——KKT 条件与凸优化。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://abook.hep.com.cn/1210369" target="_blank" rel="noopener">华东师范大学数学科学学院. 数学分析: 下册[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://archive.org/details/convexanalysis0000rock" target="_blank" rel="noopener">ROCKAFELLAR R T. Convex Analysis[M]. Princeton: Princeton University Press, 1970.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://web.stanford.edu/~boyd/cvxbook/" target="_blank" rel="noopener">BOYD S, VANDENBERGHE L. Convex Optimization[M]. Cambridge: Cambridge University Press, 2004.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用山坡与碗的直觉理解极值；②Hessian 矩阵判别法与条件极值的 Lagrange 乘子；③二次型判定的完整推导与边界极值的分类讨论；④最优化、机器学习与变分法的联系</summary>
    
    
    
    <category term="数学分析" scheme="https://hsmk.mikufans.date/categories/%E6%95%B0%E5%AD%A6%E5%88%86%E6%9E%90/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>数学分析 5.3：链式法则与隐函数定理——为什么&quot;链式&quot;会变成加法</title>
    <link href="https://hsmk.mikufans.date/posts/938b8e60.html"/>
    <id>https://hsmk.mikufans.date/posts/938b8e60.html</id>
    <published>2026-11-17T16:15:00.000Z</published>
    <updated>2026-11-17T16:15:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>数学分析 导航栏</strong></p><ul><li><a href="/posts/cfe53629.html">系列总览与导航</a><br>第 1 章 实数、极限与微分<ul><li><a href="/posts/a4efc3f8.html">1.1 实数完备性：一切从这条公理开始</a></li><li><a href="/posts/ac14083c.html">1.2 数列极限：ε-N 语言到底在说什么</a></li><li><a href="/posts/6fe04a7.html">1.3 函数极限与连续性：闭区间三大定理</a></li><li><a href="/posts/3a8afdfc.html">1.4 导数与微分：切线到底是什么</a></li><li><a href="/posts/2f0bf545.html">1.5 中值定理：微分学的枢纽</a></li><li><a href="/posts/2b2f3724.html">1.6 泰勒公式：三种余项分别在说什么</a><br>第 2 章 微分学的应用</li><li><a href="/posts/4cb59847.html">2.1 七种不定式与洛必达法则的完整版</a></li><li><a href="/posts/fcd48ee1.html">2.2 极值、凹凸与函数作图</a><br>第 3 章 积分学</li><li><a href="/posts/405f6561.html">3.1 黎曼积分：这个定义为什么这么绕</a></li><li><a href="/posts/862d8a0a.html">3.2 微积分基本定理：最漂亮的一个定理</a></li><li><a href="/posts/ef2174eb.html">3.3 定积分的应用：从面积到弧长的统一套路</a></li><li><a href="/posts/e314c779.html">3.4 广义积分：为什么 1/x 发散而 1/x² 收敛</a></li><li><a href="/posts/aa220344.html">3.5 二重积分与重积分换元：雅可比行列式从哪来</a></li><li><a href="/posts/271eeb68.html">3.6 曲线积分与曲面积分：两类积分的区别到底在哪</a></li><li><a href="/posts/23318654.html">3.7 格林·高斯·斯托克斯：三个公式其实是同一个</a><br>第 4 章 级数</li><li><a href="/posts/5828afd0.html">4.1 数项级数：什么时候可以&quot;无限加下去&quot;</a></li><li><a href="/posts/e8e706c1.html">4.2 一致收敛：为什么&quot;每点都收敛&quot;还不够</a></li><li><a href="/posts/e2bdc01d.html">4.3 幂级数：泰勒展开什么时候成立</a></li><li><a href="/posts/9f286131.html">4.4 傅里叶级数：为什么&quot;不光滑&quot;也能展开</a><br>第 5 章 多元微分学</li><li><a href="/posts/75523d8c.html">5.1 多元极限与连续：一维的直觉在这里全部失效</a></li><li><a href="/posts/c5d9aa8a.html">5.2 偏导、全微分与方向导数：为什么&quot;偏导存在&quot;什么都不保证</a></li><li>5.3 链式法则与隐函数定理：为什么&quot;链式&quot;会变成加法（本篇）</li><li><a href="/posts/78bfd5cf.html">5.4 多元函数的极值：为什么&quot;驻点&quot;不够</a><br>第 6 章 含参积分与反常积分</li><li><a href="/posts/b2a8135e.html">6.1 含参变量积分：什么时候可以把求导和取极限搬到外面</a></li><li><a href="/posts/69d93dfd.html">6.2 反常积分的收敛判别：为什么&quot;条件收敛&quot;如此脆弱</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——只需要知道&quot;变化会传导&quot;</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;为什么&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对应用与前沿感兴趣的读者</td></tr></tbody></table></div><h1 id="center-p-一、基础：变化是怎么传导的-p-center"><center><p>一、基础：变化是怎么传导的</p></center></h1><p>  <strong>（这一部分不需要任何微积分基础。先建立一个直觉。）</strong></p><h2 id="center-p-一个生活中的例子-p-center"><center><p>一个生活中的例子</p></center></h2><p>  假设你在爬一座山。山的高度取决于你的<strong>位置</strong>；而你的位置又取决于<strong>时间</strong>（你在走路）。</p><p>  <strong>问</strong>：你每小时能升高多少？</p><p>  <strong>直觉答案</strong>：看你走得多快 × 看你脚下有多陡。</p><p>  <strong>拆开说</strong>：</p><ol><li>你的位置随时间变化——<strong>位置变化率</strong>（速度）</li><li>高度随位置变化——<strong>坡度</strong></li><li>两者的乘积就是<strong>高度变化率</strong></li></ol><p>  这就是<strong>链式法则</strong>最简单的样子：<strong>变化率会沿着链条相乘</strong>。</p><h2 id="center-p-但多元时会变成加法-p-center"><center><p>但多元时会变成加法</p></center></h2><p>  现在换个情况：你在一张<strong>地形图</strong>上走。高度 $z$ 取决于东西向位置 $x$ 和南北向位置 $y$。</p><p>  而 $x$ 和 $y$ <strong>都</strong>随时间 $t$ 变化（比如你在斜着走）。</p><p>  <strong>问</strong>：$z$ 随时间的变化率是多少？</p><p>  <strong>关键想法</strong>：高度变化可以由<strong>两条路</strong>贡献：</p><ul><li>往东走导致的变化：$\dfrac{\partial z}{\partial x}\cdot\dfrac{\mathrm{d}x}{\mathrm{d}t}$</li><li>往北走导致的变化：$\dfrac{\partial z}{\partial y}\cdot\dfrac{\mathrm{d}y}{\mathrm{d}t}$</li></ul><p>  <strong>这两份贡献要加起来</strong>：</p><p>$$\frac{\mathrm{d}z}{\mathrm{d}t}=\frac{\partial z}{\partial x}\frac{\mathrm{d}x}{\mathrm{d}t}+\frac{\partial z}{\partial y}\frac{\mathrm{d}y}{\mathrm{d}t}$$</p><div class="note info flat"><p><strong>为什么是加法而不是乘法</strong></p><p>  一维时只有<strong>一条</strong>路能走，所以链条就是&quot;一路乘下去&quot;。</p><p>  多元时<strong>有多条路</strong>通向同一个终点，每一条路都贡献一份变化，所以要把它们<strong>汇总（相加）</strong>。</p><p>  <strong>记忆方法</strong>：</p><blockquote><p><strong>一条链就相乘，多条链就相加。</strong></p></blockquote><p>  打个比方：你要从 A 到 C，可以走 A→B→C，也可以走 A→D→C。两条路都能到，最终的位置改变是两条路的<strong>总和</strong>——不是乘积。</p></div><h2 id="center-p-隐函数：藏在方程里的函数-p-center"><center><p>隐函数：藏在方程里的函数</p></center></h2><p>  再看一个场景。</p><p>  圆的方程是 $x^2+y^2=1$。这个式子<strong>没有</strong>写成 $y=\cdots$ 的形式，但它<strong>隐含地</strong>定义了 $y$ 与 $x$ 的关系——给定 $x$，$y$ 就被确定了（忽略正负号的话）。</p><p>  <strong>问</strong>：能不能从 $F(x,y)=0$ 这个式子本身，直接算出 $\dfrac{\mathrm{d}y}{\mathrm{d}x}$，而<strong>不把 $y$ 显式解出来</strong>？</p><p>  <strong>答案是可以</strong>：</p><p>$$\frac{\mathrm{d}y}{\mathrm{d}x}=-\frac{F_x}{F_y}$$</p><p>  对圆来说：$F_x=2x$、$F_y=2y$，所以 $\dfrac{\mathrm{d}y}{\mathrm{d}x}=-\dfrac{x}{y}$ ✓</p><p>  <strong>（你可以用显式解 $y=\sqrt{1-x^2}$ 求导验证：结果是 $-\dfrac{x}{\sqrt{1-x^2}}=-\dfrac{x}{y}$，一致。）</strong></p><div class="note warning flat"><p><strong>这个公式有时会失效</strong></p><p>  $F_y=0$ 时公式没有意义。这时会发生什么？</p><p>  对圆 $x^2+y^2=1$，在点 $(1,0)$ 处 $F_y=0$——<strong>这里的切线是竖直的</strong>，$\dfrac{\mathrm{d}y}{\mathrm{d}x}$ 本来就该无定义。</p><p>  <strong>更本质地</strong>：在 $(1,0)$ 附近，$y$ 不能被 $x$ 唯一确定（左右两侧都只有 $x\le1$，形状&quot;折&quot;了）。</p><p>  这就是<strong>隐函数定理</strong>要解决的问题：<strong>什么条件下 $F(x,y)=0$ 真的定义了函数？</strong></p></div><hr><h1 id="center-p-二、标准：链式法则与隐函数定理-p-center"><center><p>二、标准：链式法则与隐函数定理</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-链式法则-p-center"><center><p>链式法则</p></center></h2><blockquote><p><strong>定理</strong>：设 $z=f(u,v)$ 在 $(u_0,v_0)$ 处可微，$u=u(x,y)$、$v=v(x,y)$ 在 $(x_0,y_0)$ 处偏导存在且连续，则复合函数 $z=f(u(x,y),v(x,y))$ 在 $(x_0,y_0)$ 处可微，且</p><p>$$\frac{\partial z}{\partial x}=\frac{\partial f}{\partial u}\frac{\partial u}{\partial x}+\frac{\partial f}{\partial v}\frac{\partial v}{\partial x}$$</p><p>$$\frac{\partial z}{\partial y}=\frac{\partial f}{\partial u}\frac{\partial u}{\partial y}+\frac{\partial f}{\partial v}\frac{\partial v}{\partial y}$$</p></blockquote><p>  <strong>矩阵形式</strong>（更本质的写法）：</p><p>$$J_f(x_0,y_0)=J_f(u_0,v_0)\cdot J_{(u,v)}(x_0,y_0)$$</p><p>  即</p><p>$$\begin{pmatrix}\dfrac{\partial z}{\partial x}&amp;\dfrac{\partial z}{\partial y}\end{pmatrix}=\begin{pmatrix}\dfrac{\partial f}{\partial u}&amp;\dfrac{\partial f}{\partial v}\end{pmatrix}\begin{pmatrix}\dfrac{\partial u}{\partial x}&amp;\dfrac{\partial u}{\partial y}\\\dfrac{\partial v}{\partial x}&amp;\dfrac{\partial v}{\partial y}\end{pmatrix}$$</p><div class="note info flat"><p><strong>矩阵形式才是&quot;真正的&quot;链式法则</strong></p><p>  一维的链式法则 $\dfrac{\mathrm{d}y}{\mathrm{d}x}=\dfrac{\mathrm{d}y}{\mathrm{d}u}\dfrac{\mathrm{d}u}{\mathrm{d}x}$ 可以看成 $1\times1$ 矩阵的乘法。</p><p>  多元时<strong>导数变成了矩阵（雅可比矩阵）</strong>，而&quot;乘起来&quot;这个动作<strong>没有变</strong>。</p><p>  <strong>为什么写成矩阵更好</strong>：它自动告诉你哪两个东西相乘——只要保证内维匹配。上面的例子：$(1\times2)\times(2\times2)=(1\times2)$ ✓</p><p>  <strong>所以&quot;多条链相加&quot;其实不是加法，而是矩阵乘法</strong>：矩阵乘法的每一行（列）恰好把多条路径的贡献累加起来了。</p></div><h2 id="center-p-隐函数定理（二元情形）-p-center"><center><p>隐函数定理（二元情形）</p></center></h2><blockquote><p><strong>定理</strong>：设 $F(x,y)$ 在点 $P_0=(x_0,y_0)$ 的某邻域内有连续偏导数，且</p><p>$$F(P_0)=0,\qquad \frac{\partial F}{\partial y}(P_0)\ne0$$</p><p>则存在 $x_0$ 的邻域 $I$ 和唯一的函数 $y=\varphi(x)$（定义在 $I$ 上），使得</p><p>$$\varphi(x_0)=y_0,\qquad F(x,\varphi(x))=0\quad\forall x\in I$$</p><p>且</p><p>$$\frac{\mathrm{d}y}{\mathrm{d}x}=-\frac{F_x(x,y)}{F_y(x,y)}\qquad \varphi'(x_0)=-\frac{F_x(P_0)}{F_y(P_0)}$$</p></blockquote><p>  <strong>三个条件各有分工</strong>：</p><table><thead><tr><th>条件</th><th>作用</th></tr></thead><tbody><tr><td>$F(P_0)=0$</td><td>保证 $P_0$ 在曲线上</td></tr><tr><td>$F_y(P_0)\ne0$</td><td><strong>关键</strong>——保证曲线在 $P_0$ 处不竖直，可以解出 $y$</td></tr><tr><td>偏导连续</td><td>保证解出来的 $\varphi$ 光滑</td></tr></tbody></table><div class="note danger flat"><p><strong>$F_y=0$ 时会发生什么</strong></p><p>  <strong>可能是真的解不出来</strong>：</p><p>$$F(x,y)=x^2+y^2-1,\qquad P_0=(1,0)$$</p><p>  $F_y(1,0)=2\cdot0=0$。在 $x=1$ 附近，满足 $x^2+y^2=1$ 的 $y$ <strong>只有 $y=0$</strong>（因为 $x\le1$ 才能解），所以「$x$ 稍大一点对应的 $y$」<strong>不存在</strong>——隐函数无法定义。</p><p>  <strong>但也可能只是不能解出 $y$，能解出 $x$</strong>：</p><p>$$F(x,y)=x-y^3,\qquad P_0=(0,0)$$</p><p>  $F_y(0,0)=0$。但这里 $x=y^3$，$x$ 是 $y$ 的光滑函数——<strong>只是不能反过来</strong>。</p><p>  <strong>所以</strong>：$F_y\ne0$ 是<strong>充分</strong>条件，不是必要条件。它保证&quot;能解出 $y$&quot;，但不代表&quot;别的什么都解不出来&quot;。</p></div><h2 id="center-p-例：圆上的切线-p-center"><center><p>例：圆上的切线</p></center></h2><p>  $F(x,y)=x^2+y^2-1$，求点 $\left(\frac35,\frac45\right)$ 处的切线斜率。</p><p>$$F_x=2x=\frac65,\qquad F_y=2y=\frac85$$</p><p>$$\frac{\mathrm{d}y}{\mathrm{d}x}=-\frac{6/5}{8/5}=-\frac34\quad\checkmark$$</p><p>  <strong>验证</strong>：圆心在原点的圆，点 $\left(\frac35,\frac45\right)$ 处的半径斜率是 $\dfrac{4/5}{3/5}=\dfrac43$，切线与之垂直，斜率 $=-\dfrac34$ ✓</p><hr><h1 id="center-p-三、深入：为什么隐函数定理成立-p-center"><center><p>三、深入：为什么隐函数定理成立</p></center></h1><p>  <strong>（这一部分是完整的推导思路。想看清&quot;凭什么&quot;的读者。）</strong></p><h2 id="center-p-链式法则的完整证明-p-center"><center><p>链式法则的完整证明</p></center></h2><details class="folding-tag" cyan><summary> 完整证明（用可微的定义直接推） </summary>              <div class='content'>              <p>记 $G(x,y)=f(u(x,y),v(x,y))$，要证</p><p>$$G(x_0+h,y_0+k)-G(x_0,y_0)=G_x h+G_y k+o(\rho)$$</p><p>其中 $\rho=\sqrt{h^2+k^2}$，且 $G_x$、$G_y$ 就是定理给出的那两个式子。</p><p><strong>第一步</strong>：记</p><p>$$\Delta u=u(x_0+h,y_0+k)-u(x_0,y_0),\qquad \Delta v=v(x_0+h,y_0+k)-v(x_0,y_0)$$</p><p>  由 $u,v$ <strong>可微</strong>（偏导连续 ⇒ 可微，见 5.2 节），</p><p>$$\Delta u=u_x h+u_y k+o(\rho),\qquad \Delta v=v_x h+v_y k+o(\rho)$$</p><p>  特别地 $|\Delta u|=O(\rho)$、$|\Delta v|=O(\rho)$。</p><p><strong>第二步</strong>：由 $f$ 在 $(u_0,v_0)$ 处可微，</p><p>$$f(u_0+\Delta u,v_0+\Delta v)-f(u_0,v_0)=f_u\Delta u+f_v\Delta v+o(\sqrt{\Delta u^2+\Delta v^2})$$</p><p>  因为 $\sqrt{\Delta u^2+\Delta v^2}=O(\rho)$，所以 $o(\sqrt{\Delta u^2+\Delta v^2})=o(\rho)$ ✓</p><p><strong>第三步</strong>：把 $\Delta u$、$\Delta v$ 的表达式代入：</p><p>$$G-G_0=f_u(u_xh+u_yk)+f_v(v_xh+v_yk)+o(\rho)$$</p><p>  整理 $h$、$k$ 的系数：</p><p>$$=(f_uu_x+f_vv_x)h+(f_uu_y+f_vv_y)k+o(\rho)$$</p><p>  这正是要证的 ✓ $\blacksquare$</p><p><strong>注意关键点</strong>：第二步里的 $o$ 项必须<strong>对 $\rho$ 是 $o$</strong>，而不只是对 $\sqrt{\Delta u^2+\Delta v^2}$——这一步靠的是 $\Delta u,\Delta v=O(\rho)$。<strong>如果 $u,v$ 只连续而不可微，这一步就断了。</strong></p>              </div>            </details><h2 id="center-p-隐函数定理的证明思路-p-center"><center><p>隐函数定理的证明思路</p></center></h2><p>  完整证明较长，但<strong>核心想法只有三步</strong>：</p><details class="folding-tag" cyan><summary> 三步骨架 </summary>              <div class='content'>              <p><strong>第一步：把 $F=0$ 当成&quot;$y$ 的函数等于 0&quot;，用中值定理逼近</strong></p><p>  固定 $x$，定义 $\Phi(y)=F(x,y)$。当 $y$ 从 $y_0$ 变动时，</p><p>$$\Phi(y_0+\eta)-\Phi(y_0)=\eta\cdot\Phi'(\xi)=\eta\cdot F_y(x,\xi)$$</p><p>  因为 $F_y(P_0)\ne0$ 且<strong>连续</strong>，所以 $P_0$ 附近 $F_y\ne0$，且符号固定。<strong>这一步说明 $\Phi$ 在 $y$ 方向严格单调。</strong></p><p><strong>第二步：用连续性 + 单调性保证解存在</strong></p><p>  对 $x$ 接近 $x_0$ 时，$F(x,y_0)$ 接近 $F(x_0,y_0)=0$。而 $\Phi$ 在 $y$ 方向严格单调且过零点附近，由<strong>介值定理</strong>，存在（唯一的）$y=\varphi(x)$ 使 $F(x,\varphi(x))=0$。</p><p>  <strong>这里的关键</strong>：$F_y\ne0$ 保证了&quot;恰好一个解&quot;（唯一性），连续性保证了&quot;解随 $x$ 连续变动&quot;。</p><p><strong>第三步：对恒等式求导得公式</strong></p><p>  由 $F(x,\varphi(x))\equiv0$，两边对 $x$ 求导（用链式法则！）：</p><p>$$F_x+F_y\varphi'(x)=0\qquad\Longrightarrow\qquad \varphi'(x)=-\frac{F_x}{F_y}$$</p><p>  <strong>这一步把两个定理串起来了</strong>：隐函数定理的公式，本质上是<strong>链式法则</strong>的应用。</p>              </div>            </details><div class="note info flat"><p><strong>为什么 $F_y\ne0$ 是&quot;不竖直&quot;的代数版本</strong></p><p>  曲线 $F(x,y)=0$ 的法向量是 $\nabla F=(F_x,F_y)$。</p><p>  切线方向与法向量垂直，所以切线斜率是 $-\dfrac{F_x}{F_y}$。</p><p>  <strong>$F_y=0$ 时</strong>：法向量是 $(F_x,0)$，水平——切线竖直，斜率无穷大。</p><p>  <strong>所以「$F_y\ne0$」= 「曲线不竖直」= 「$y$ 能表示成 $x$ 的函数」</strong>，三件事是同一件事。</p><p>  <strong>这个几何图像比代数条件更容易记。</strong></p></div><h2 id="center-p-推广：-n-元情形与雅可比行列式-p-center"><center><p>推广：$n$ 元情形与雅可比行列式</p></center></h2><p>  方程组</p><p>$$\begin{cases}F_1(x_1,\dots,x_n,y_1,\dots,y_m)=0\\ \vdots\\ F_m(x_1,\dots,x_n,y_1,\dots,y_m)=0\end{cases}$$</p><p>  能局部解出 $y_1,\dots,y_m$ 的条件是<strong>雅可比行列式非零</strong>：</p><p>$$\frac{\partial(F_1,\dots,F_m)}{\partial(y_1,\dots,y_m)}\ne0$$</p><p>  <strong>与 3.5 节的雅可比行列式是同一个东西</strong>——那里它是&quot;面积缩放比&quot;，这里是&quot;能否反解判定式&quot;。</p><p>  <strong>统一说</strong>：雅可比行列式 $\ne0$ ⟺ 局部是&quot;一一的、可逆的&quot;。</p><h2 id="center-p-常见误解-p-center"><center><p>常见误解</p></center></h2><div class="note danger flat"><p><strong>误解一：「链式法则就是一直乘下去」</strong></p><p>  只在<strong>单路</strong>时是。多路时要<strong>相加</strong>（更准确说是矩阵乘法把各路累加）。</p><p><strong>误解二：「隐函数定理说 $F_y\ne0$ 时一定解不出 $y$」</strong></p><p>  <strong>反了</strong>。$F_y\ne0$ 是<strong>能</strong>解出 $y$ 的充分条件。$F_y=0$ 时才可能解不出。</p><p><strong>误解三：「$F(x,y)=0$ 总能确定一个函数」</strong></p><p>  $x^2+y^2=1$ 在 $x=\pm1$ 处就不行。<strong>必须检查 $F_y$。</strong></p><p><strong>误解四：「求出 $\varphi'(x)=-F_x/F_y$ 就完事了」</strong></p><p>  这个公式只在 $F_y\ne0$ 处成立。$z$ 形曲线（如 $y^2=x$ 在原点）上要用 $\mathrm{d}x/\mathrm{d}y=-F_y/F_x$。</p><p><strong>误解五：「隐函数定理只保证局部存在」看起来是缺陷</strong></p><p>  <strong>其实是诚实</strong>。全局存在是<strong>假的</strong>：$x^2+y^2=1$ 只能局部写成 $y=\varphi(x)$，没法用<strong>一个</strong>公式覆盖整个圆。</p></div><hr><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-反函数定理：隐函数定理的对偶-p-center"><center><p>反函数定理：隐函数定理的对偶</p></center></h2><p>  设 $\vec F:\mathbb{R}^n\to\mathbb{R}^n$ 有连续偏导，若在 $P_0$ 处</p><p>$$\det J_F(P_0)\ne0$$</p><p>则 $\vec F$ 在 $P_0$ 附近是<strong>局部一一映射</strong>，且反函数的雅可比是</p><p>$$J_{F^{-1}}=J_F^{-1}$$</p><p>  <strong>这就是隐函数定理取 $F(\vec x,\vec y)=\vec x-\vec G(\vec y)$ 的特例</strong>——两者是同一件事的两种说法。</p><p>  <strong>实际用途</strong>：极坐标 ↔ 直角坐标的互换。极坐标换元的雅可比是 $r$，而 $r\ne0$（除原点）——所以在原点之外，极坐标确实是局部一一的。</p><h2 id="center-p-流形：隐函数定理的几何版本-p-center"><center><p>流形：隐函数定理的几何版本</p></center></h2><p>  若 $F:\mathbb{R}^n\to\mathbb{R}^k$ 的<strong>雅可比矩阵满秩</strong>（秩 $=k$），则水平集 $F^{-1}(0)$ 是一个 $(n-k)$ 维<strong>流形</strong>。</p><p>  <strong>具体例子</strong>：</p><table><thead><tr><th>方程</th><th>流形</th><th>维数</th></tr></thead><tbody><tr><td>$x^2+y^2+z^2=1$</td><td>球面</td><td>$3-1=2$</td></tr><tr><td>$x^2+y^2-z^2=1$</td><td>单叶双曲面</td><td>$3-1=2$</td></tr><tr><td>$x^2+y^2=1$ 且 $z=0$</td><td>圆</td><td>$3-2=1$</td></tr></tbody></table><p>  <strong>条件检查</strong>：球的 $F_x=2x,F_y=2y,F_z=2z$，在球面上 $x^2+y^2+z^2=1$ 保证至少一个分量非零——秩恒为 1 ✓</p><p>  <strong>这个思想是现代几何的起点</strong>：流形不必&quot;长在 $\mathbb{R}^n$ 里&quot;，可以只用&quot;局部坐标&quot;定义。</p><h2 id="center-p-应用：为什么数值方法关心隐函数定理-p-center"><center><p>应用：为什么数值方法关心隐函数定理</p></center></h2><p>  <strong>场景一：约束优化</strong></p><p>  在约束 $g(x,y)=0$ 下最小化 $f$。拉格朗日乘子法得到的条件其实就是<strong>用隐函数定理把约束消去后的驻点条件</strong>。</p><p>  若 $\nabla g\ne0$，约束曲线局部是光滑的，可以参数化——于是问题变成无约束问题。</p><p>  <strong>$\nabla g=0$ 的点是&quot;约束退化&quot;的点</strong>，拉格朗日法在那里失效。</p><p><strong>场景二：ODE 解对初值的可微性</strong></p><p>  考虑 $\dot x=f(x,t)$，$x(0)=a$。我们要问：<strong>解 $x(t;a)$ 对初值 $a$ 的依赖是光滑的吗？</strong></p><p>  构造 $F(x,t,a)=x-X(t;a)$，其中 $X$ 是解。由隐函数定理，只要 $\dfrac{\partial F}{\partial x}=1\ne0$，就能解出 $x$ 作为 $(t,a)$ 的函数。<strong>这就是数值分析里做灵敏度分析的理论依据。</strong></p><p><strong>场景三：分岔现象</strong></p><p>  当 $\dfrac{\partial F}{\partial y}=0$ 时，解的个数可能<strong>突变</strong>——这就是<strong>分岔</strong>。</p><p>  例如 $F(x,y)=y^2-x$：当 $x&lt;0$ 无解、$x&gt;0$ 两解。$x=0$ 是分岔点。<strong>隐函数定理的失效点，往往就是物理上有意思的地方</strong>。</p><h2 id="center-p-历史-p-center"><center><p>历史</p></center></h2><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1670s</td><td>莱布尼茨</td><td>隐式求导的雏形</td></tr><tr><td>1730s</td><td>欧拉</td><td>隐函数求导的一般公式</td></tr><tr><td>1880s</td><td>柯西、达布</td><td>严格化证明</td></tr><tr><td>1870s</td><td>意大利学派（Dini 等）</td><td>现代形式的隐函数定理</td></tr><tr><td>1930s</td><td>希尔伯特、惠特尼</td><td>流形的抽象定义</td></tr></tbody></table><p>  <strong>&quot;雅可比&quot;这个名字</strong>来自卡尔·雅可比（Carl Jacobi, 1804–1851），他在 1841 年的论文中研究了函数方程组的行列式。</p><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</span><span class="reference-title">参考资料</span></span></span>——第 9 章隐函数定理与反函数定理。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">EVANS L C. Partial Differential Equations[M]. 2nd ed. Providence: American Mathematical Society, 2010.</span><span class="reference-title">参考资料</span></span></span>——第 3 章用隐函数定理处理流形。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>要点</th></tr></thead><tbody><tr><td><strong>链式法则</strong></td><td>一条链相乘，多条链相加；矩阵形式 $J_f=J_{\text{外}}\cdot J_{\text{内}}$</td></tr><tr><td><strong>隐函数求导</strong></td><td>$\dfrac{\mathrm{d}y}{\mathrm{d}x}=-\dfrac{F_x}{F_y}$，前提 $F_y\ne0$</td></tr><tr><td><strong>隐函数定理</strong></td><td>$F(P_0)=0$ 且 $F_y(P_0)\ne0$ ⟹ 局部唯一光滑解</td></tr><tr><td><strong>几何含义</strong></td><td>$F_y\ne0$ ⟺ 曲线不竖直 ⟺ $y$ 可表示成 $x$ 的函数</td></tr><tr><td><strong>$n$ 元推广</strong></td><td>雅可比行列式 $\ne0$ 是&quot;能反解&quot;的条件</td></tr><tr><td><strong>反函数定理</strong></td><td>隐函数定理的对偶，$J_{F^{-1}}=J_F^{-1}$</td></tr><tr><td><strong>流形</strong></td><td>水平集 + 雅可比满秩</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>有了隐函数定理，就能讨论<strong>多元函数的极值</strong>了。</p><p>但多元极值有一个一维里没有的新情况：</p><blockquote><p><strong>边界上的极值点</strong></p></blockquote><p>  一维里 $[a,b]$ 上求最值，检查驻点 + 两个端点就够了。</p><p>  多元里区域可以是<strong>任何形状</strong>，边界是曲线——边界上有无穷多个点，怎么找？</p><p>  答案分两步：<strong>内部用驻点条件，边界用 Lagrange 乘子</strong>。而 Lagrange 乘子的理论基础，正是这一节的隐函数定理。</p></div><hr><h1 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h1><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</span><span class="reference-title">参考资料</span></span></span>——第 9 章隐函数定理与反函数定理。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">华东师范大学数学科学学院. 数学分析: 下册[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第十七章隐函数定理及其应用。</p><p>  <span class="hidden-anchor" id="referto_[3]"></span><sup class="reference"><a href="#referfrom_[3]">[3]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">EVANS L C. Partial Differential Equations[M]. 2nd ed. Providence: American Mathematical Society, 2010.</span><span class="reference-title">参考资料</span></span></span>——第 3 章用隐函数定理处理流形。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://openlibrary.org/books/OL5195991M" target="_blank" rel="noopener">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://abook.hep.com.cn/1210369" target="_blank" rel="noopener">华东师范大学数学科学学院. 数学分析: 下册[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[3]"></span><a class="reference-anchor" href="#referto_[3]">[3]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://openlibrary.org/books/OL24547551M" target="_blank" rel="noopener">EVANS L C. Partial Differential Equations[M]. 2nd ed. Providence: American Mathematical Society, 2010.</a></div>]]></content>
    
    
    <summary type="html">四层结构——①用&quot;换乘地铁&quot;理解多元链式法则；②链式法则的矩阵形式与隐函数定理的标准陈述；③雅可比可逆性与隐函数局部存在性的完整推导；④反函数定理、流形与数值方法中的实际应用</summary>
    
    
    
    <category term="数学分析" scheme="https://hsmk.mikufans.date/categories/%E6%95%B0%E5%AD%A6%E5%88%86%E6%9E%90/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>本站文章的四层结构规范</title>
    <link href="https://hsmk.mikufans.date/posts/caa18826.html"/>
    <id>https://hsmk.mikufans.date/posts/caa18826.html</id>
    <published>2026-11-17T07:20:00.000Z</published>
    <updated>2026-11-17T07:20:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>写作规范 导航栏</strong></p><ul><li>本站文章的四层结构规范（本篇）</li></ul></blockquote><hr><h2 id="center-p-为什么要分层-p-center"><center><p>为什么要分层</p></center></h2><p>  一本教材只有一种难度，所以它只能服务一类读者。</p><p>  而一篇博客文章可以<strong>同时服务四类读者</strong>——只要把难度拆开、标清楚。</p><p>  <strong>这篇文章定义本站的标准结构。</strong> 所有数学类文章都按此组织，读者可以根据自己的水平选择读到哪里。</p><h2 id="center-p-四层结构-p-center"><center><p>四层结构</p></center></h2><p>  <strong>每篇文章分四个独立的大标题</strong>，从易到难：</p><table><thead><tr><th>部分</th><th>名称</th><th>面向</th><th>内容</th></tr></thead><tbody><tr><td><strong>①</strong></td><td><strong>基础</strong></td><td><strong>完全初学者</strong></td><td>尽量不依赖任何前置知识，用最直观的语言讲清&quot;是什么&quot;</td></tr><tr><td><strong>②</strong></td><td><strong>标准</strong></td><td>有基础、要学扎实的</td><td>标准教材深度，定义、定理、计算都齐全</td></tr><tr><td><strong>③</strong></td><td><strong>深入</strong></td><td>想搞清楚的</td><td>与其他内容的联系；重要但稍难公式的<strong>详尽推导</strong></td></tr><tr><td><strong>④</strong></td><td><strong>拓展</strong></td><td>有研究兴趣的</td><td>实际用例、前沿研究、历史背景</td></tr></tbody></table><p>  <strong>每一部分的标题下都要注明&quot;这段适合谁&quot;</strong>，让读者一眼知道自己该不该读。</p><h2 id="center-p-①-基础部分-p-center"><center><p>① 基础部分</p></center></h2><h3 id="center-p-目标-p-center"><center><p>目标</p></center></h3><p>  <strong>让一个没学过这门课的人也能读懂大意。</strong></p><p>  不要求读者会证明，只要求读完能回答：&quot;这个东西大概在说什么？为什么需要它？&quot;</p><h3 id="center-p-写法要求-p-center"><center><p>写法要求</p></center></h3><ol><li><strong>不用未解释的术语</strong>——出现的每个新概念都要就地定义</li><li><strong>先例子后定义</strong>——用具体数字/图形开场，再抽象</li><li><strong>避免符号轰炸</strong>——能用文字说的不用公式，能用简单符号的不用复杂的</li><li><strong>允许&quot;不严谨&quot;</strong>——比如&quot;大概&quot;、&quot;直观上&quot;这类表述，在基础部分是可以的</li><li><strong>必须回答&quot;为什么需要它&quot;</strong>——最好从一个会出问题的情况说起</li></ol><h3 id="center-p-反例-p-center"><center><p>反例</p></center></h3><div class="note danger flat"><p><strong>不要这样写</strong>（一上来就是定义）：</p><blockquote><p>设 $X$ 为完备度量空间，${x_n}$ 为 $X$ 中的柯西列，则...</p></blockquote><p><strong>要这样写</strong>：</p><blockquote><p>先问一个问题：如果你只能越来越精确地测量一个数，但永远测不准，你能确定它到底是多少吗？</p><p>直觉说&quot;能&quot;——只要精度提到任意高就够了。但数学上这句话需要一个精确的含义...</p></blockquote></div><h2 id="center-p-②-标准部分-p-center"><center><p>② 标准部分</p></center></h2><h3 id="center-p-目标-p-center-2"><center><p>目标</p></center></h3><p>  <strong>达到标准教材的水准</strong>——定义准确、定理完整、条件清楚。</p><h3 id="center-p-写法要求-p-center-2"><center><p>写法要求</p></center></h3><ol><li><strong>定义、定理、证明齐全</strong>——不能跳步</li><li><strong>条件必须逐条交代</strong>——每个定理的每个条件都要说明用途</li><li><strong>附带反例</strong>——&quot;去掉这个条件会怎样&quot;</li><li><strong>计算过程完整</strong>——不写&quot;容易验证&quot;、&quot;留给读者&quot;</li></ol><h3 id="center-p-与前一层的关系-p-center"><center><p>与前一层的关系</p></center></h3><p>  ① 已经建立直觉，② 把它严格化。</p><p>  <strong>② 可以引用 ① 里的比喻</strong>（&quot;就像前面说的那个测不准的例子&quot;），但<strong>不能依赖 ① 的松散表述</strong>。</p><h2 id="center-p-③-深入部分-p-center"><center><p>③ 深入部分</p></center></h2><h3 id="center-p-目标-p-center-3"><center><p>目标</p></center></h3><p>  <strong>把 ② 里&quot;跳过去&quot;的东西补回来</strong>，或者<strong>指出它和其他内容的联系</strong>。</p><h3 id="center-p-两类内容-p-center"><center><p>两类内容</p></center></h3><p><strong>类型 A：详尽推导</strong></p><p>  ② 里因为篇幅或难度删掉的计算/证明，在这里完整写出来。</p><p>  例：某个重要公式的完整推导、某个定理的完整证明、某个技巧的来龙去脉。</p><p><strong>类型 B：与其他内容的联系</strong></p><p>  这个结论在别的地方还能用吗？和别的学科怎么对应？</p><p>  例：这里的梯度概念，在数值方法里怎么用；这个定理在物理里有对应现象吗。</p><h3 id="center-p-写法要求-p-center-3"><center><p>写法要求</p></center></h3><ol><li><strong>明确写出&quot;这里要补什么&quot;</strong>——让读者知道为什么值得花时间读</li><li><strong>推导可以长，但要有路标</strong>——每一步说明目的</li><li><strong>关联要具体</strong>——不要泛泛说&quot;很重要&quot;，要说&quot;在某处可以这样用&quot;</li></ol><h2 id="center-p-④-拓展部分-p-center"><center><p>④ 拓展部分</p></center></h2><h3 id="center-p-目标-p-center-4"><center><p>目标</p></center></h3><p>  <strong>从&quot;学懂&quot;延伸到&quot;能用&quot;或&quot;能研究&quot;。</strong></p><h3 id="center-p-内容类型-p-center"><center><p>内容类型</p></center></h3><table><thead><tr><th>类型</th><th>例子</th></tr></thead><tbody><tr><td><strong>实际用例</strong></td><td>这个理论在工程/物理/编程里的具体应用</td></tr><tr><td><strong>前沿研究</strong></td><td>最近的论文在做什么、有什么开放问题</td></tr><tr><td><strong>历史背景</strong></td><td>这个概念是怎么发展来的、谁解决的什么难题</td></tr><tr><td><strong>延伸阅读</strong></td><td>想深入该读什么书/文章</td></tr></tbody></table><h3 id="center-p-写法要求-p-center-4"><center><p>写法要求</p></center></h3><ol><li><strong>这一部分是真正可选的</strong>——不读也不影响对主题的理解</li><li><strong>例子要具体</strong>——&quot;在 XXX 领域用于 YYY&quot;，不要空泛</li><li><strong>文献要给链接</strong>（见下方的参考文献规范）</li></ol><h2 id="center-p-完整骨架-p-center"><center><p>完整骨架</p></center></h2><figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line"><span class="section">front-matter</span></span><br><span class="line"><span class="section">---</span></span><br><span class="line"></span><br><span class="line"><span class="quote">&gt; 导航栏</span></span><br><span class="line"></span><br><span class="line"><span class="section">## 前置说明</span></span><br><span class="line"><span class="code">    （一句话说清本文讲什么、按四层组织、读者可以读到哪里）</span></span><br><span class="line"><span class="code"></span></span><br><span class="line"><span class="section">## 一、基础：xxx（适合完全初学者）</span></span><br><span class="line"><span class="code">    ...</span></span><br><span class="line"><span class="code"></span></span><br><span class="line"><span class="section">## 二、标准：xxx（适合有基础、要学扎实的读者）</span></span><br><span class="line"><span class="code">    ...</span></span><br><span class="line"><span class="code"></span></span><br><span class="line"><span class="section">## 三、深入：xxx（适合想搞清楚细节的读者）</span></span><br><span class="line"><span class="code">    ...</span></span><br><span class="line"><span class="code"></span></span><br><span class="line"><span class="section">## 四、拓展：xxx（可选，对应用与前沿感兴趣的读者）</span></span><br><span class="line"><span class="code">    ...</span></span><br><span class="line"><span class="code"></span></span><br><span class="line"><span class="section">## 参考文献</span></span><br></pre></td></tr></table></figure><h2 id="center-p-关于数学分析这类基础学科-p-center"><center><p>关于数学分析这类基础学科</p></center></h2><p>  <strong>用户要求：数学分析与高等代数作为基础性学科，难度要尽量低，基础的内容争取初学者都能看懂。更深入的内容放在基础之后。</strong></p><p>  <strong>具体做法</strong>：</p><ol><li><strong>① 基础部分要写得足够长</strong>——不能一句话带过，要真的把概念讲透</li><li><strong>① 可以牺牲严谨性</strong>——只求读者能跟上思路</li><li><strong>② 标准部分的门槛也要相对低</strong>——比一般教材更耐心</li><li><strong>③④ 才是真正&quot;上难度&quot;的地方</strong></li></ol><p>  <strong>换句话说</strong>：基础学科的 ①② 要写得比其他学科的 ①② 更浅，把&quot;陡坡&quot;尽量推到 ③④。</p><h2 id="center-p-改造历史文章的计划-p-center"><center><p>改造历史文章的计划</p></center></h2><p>  本站已有 71 篇历史文章，全部写于这个规范确立之前。</p><p>  <strong>改造策略：分批进行，先改完一个完整系列。</strong></p><p>  <strong>当前批次</strong>：数学分析（22 篇）。</p><p>  <strong>改造顺序</strong>：从 1.1 开始，按章节顺序逐篇调整。</p><p>  <strong>每篇的改造内容</strong>：</p><ol><li>把现有的&quot;前置知识折叠块&quot;移到 ① 基础部分或保持折叠</li><li>现有的正文主体归入 ② 标准</li><li>现有 folding 里的完整证明，归入 ③ 深入</li><li>新增 ④ 拓展（实际应用、历史、延伸阅读）</li><li>每部分标题下加&quot;适合谁&quot;</li></ol><h2 id="center-p-参考文献规范-p-center"><center><p>参考文献规范</p></center></h2><p>  <strong>每条文献必须有可点击链接</strong>：</p><ul><li><strong>论文</strong>用 DOI 稳定链接：<code>https://doi.org/10.xxxx/xxxxx</code></li><li><strong>图书</strong>用出版社官方页面，或用 OpenLibrary / <a href="http://archive.org">archive.org</a></li><li>找不到链接时按 GB/T 7714 规范著录</li></ul><p>  <strong>格式</strong>：</p><ul><li>专著 <code>[M]</code>：<code>作者. 书名[M]. 版次. 出版地: 出版社, 年.</code></li><li>期刊 <code>[J]</code>：<code>作者. 题名[J]. 刊名, 年, 卷(期): 起止页.</code></li></ul><hr><div class="note info flat"><p><strong>本文本身不按四层结构写</strong></p><p>  这是元文档（规范本身），不是教学内容，所以用普通结构。</p><p>  <strong>从下一篇开始，所有数学类文章都按四层结构组织。</strong></p></div>]]></content>
    
    
    <summary type="html">从初学者到进阶读者的四层难度阶梯——基础 / 标准 / 深入 / 拓展。本站所有数学类文章按此结构组织，每一段都注明面向谁</summary>
    
    
    
    <category term="写作规范" scheme="https://hsmk.mikufans.date/categories/%E5%86%99%E4%BD%9C%E8%A7%84%E8%8C%83/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
  <entry>
    <title>数学分析 5.2：偏导数、全微分与方向导数——为什么&quot;偏导存在&quot;什么都不保证</title>
    <link href="https://hsmk.mikufans.date/posts/c5d9aa8a.html"/>
    <id>https://hsmk.mikufans.date/posts/c5d9aa8a.html</id>
    <published>2026-11-16T20:22:00.000Z</published>
    <updated>2026-11-16T20:22:00.000Z</updated>
    
    <content type="html"><![CDATA[<div class="note info flat"><p><strong>封面图片 PID：<a href="https://www.pixiv.net/artworks/1628397182442">1628397182442</a></strong></p></div><blockquote><p><strong>数学分析 导航栏</strong></p><ul><li><a href="/posts/cfe53629.html">系列总览与导航</a><br>第 1 章 实数、极限与微分<ul><li><a href="/posts/a4efc3f8.html">1.1 实数完备性：一切从这条公理开始</a></li><li><a href="/posts/ac14083c.html">1.2 数列极限：ε-N 语言到底在说什么</a></li><li><a href="/posts/6fe04a7.html">1.3 函数极限与连续性：闭区间三大定理</a></li><li><a href="/posts/3a8afdfc.html">1.4 导数与微分：切线到底是什么</a></li><li><a href="/posts/2f0bf545.html">1.5 中值定理：微分学的枢纽</a></li><li><a href="/posts/2b2f3724.html">1.6 泰勒公式：三种余项分别在说什么</a><br>第 2 章 微分学的应用</li><li><a href="/posts/4cb59847.html">2.1 七种不定式与洛必达法则的完整版</a></li><li><a href="/posts/fcd48ee1.html">2.2 极值、凹凸与函数作图</a><br>第 3 章 积分学</li><li><a href="/posts/405f6561.html">3.1 黎曼积分：这个定义为什么这么绕</a></li><li><a href="/posts/862d8a0a.html">3.2 微积分基本定理：最漂亮的一个定理</a></li><li><a href="/posts/ef2174eb.html">3.3 定积分的应用：从面积到弧长的统一套路</a></li><li><a href="/posts/e314c779.html">3.4 广义积分：为什么 1/x 发散而 1/x² 收敛</a></li><li><a href="/posts/aa220344.html">3.5 二重积分与重积分换元：雅可比行列式从哪来</a></li><li><a href="/posts/271eeb68.html">3.6 曲线积分与曲面积分：两类积分的区别到底在哪</a></li><li><a href="/posts/23318654.html">3.7 格林·高斯·斯托克斯：三个公式其实是同一个</a><br>第 4 章 级数</li><li><a href="/posts/5828afd0.html">4.1 数项级数：什么时候可以&quot;无限加下去&quot;</a></li><li><a href="/posts/e8e706c1.html">4.2 一致收敛：为什么&quot;每点都收敛&quot;还不够</a></li><li><a href="/posts/e2bdc01d.html">4.3 幂级数：泰勒展开什么时候成立</a></li><li><a href="/posts/9f286131.html">4.4 傅里叶级数：为什么&quot;不光滑&quot;也能展开</a><br>第 5 章 多元微分学</li><li><a href="/posts/75523d8c.html">5.1 多元极限与连续：一维的直觉在这里全部失效</a></li><li>5.2 偏导、全微分与方向导数：为什么&quot;偏导存在&quot;什么都不保证（本篇）</li><li><a href="/posts/938b8e60.html">5.3 链式法则与隐函数定理：为什么&quot;链式&quot;会变成加法</a></li><li><a href="/posts/78bfd5cf.html">5.4 多元函数的极值：为什么&quot;驻点&quot;不够</a><br>第 6 章 含参积分与反常积分</li><li><a href="/posts/b2a8135e.html">6.1 含参变量积分：什么时候可以把求导和取极限搬到外面</a></li><li><a href="/posts/69d93dfd.html">6.2 反常积分的收敛判别：为什么&quot;条件收敛&quot;如此脆弱</a></li></ul></li></ul></blockquote><hr><div class="note info flat"><p><strong>本文结构</strong>（四层，可以只读前两层）</p><table><thead><tr><th>部分</th><th>适合谁</th></tr></thead><tbody><tr><td><strong>一、基础</strong></td><td>完全初学者——用&quot;沿坐标轴切一刀&quot;的直觉理解偏导数</td></tr><tr><td><strong>二、标准</strong></td><td>有基础、要学扎实的读者——偏导、方向导数、全微分与三个反例</td></tr><tr><td><strong>三、深入</strong></td><td>想看清&quot;为什么偏导存在推不出连续&quot;的读者</td></tr><tr><td><strong>四、拓展</strong></td><td>对历史、矩阵微积分与自动微分的接口感兴趣的读者</td></tr></tbody></table></div><h2 id="center-p-本文要做什么-p-center"><center><p>本文要做什么</p></center></h2><p>  <a href="/posts/75523d8c.html">5.1 节</a>讲完了多元极限。现在定义<strong>导数</strong>——但立刻卡住：</p><p>$$f'(x_0)=\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}$$</p><p>  多元里 $M-M_0$ 是<strong>向量</strong>。</p><p>$$\frac{f(M)-f(M_0)}{\text{向量}}\qquad\textbf{无定义！}$$</p><p>  <strong>向量不能做除法</strong>——这是多元微分学的第一道难关。</p><p>  本文讲三条出路，以及它们之间<strong>令人意外的关系</strong>：</p><table><thead><tr><th>概念</th><th>怎么绕过除法</th><th>强度</th></tr></thead><tbody><tr><td><strong>偏导数</strong></td><td>只沿坐标轴，把其他变量冻结</td><td><strong>最弱</strong></td></tr><tr><td><strong>方向导数</strong></td><td>沿指定方向，退化成参数的一元导数</td><td>中等</td></tr><tr><td><strong>全微分（可微）</strong></td><td>用<strong>线性映射</strong>代替&quot;除法&quot;</td><td><strong>最强</strong></td></tr></tbody></table><p>  <strong>核心结论（本文的三个反例）</strong>：</p><p>$$\text{偏导存在}\ \not\Rightarrow\ \text{连续}\qquad\text{偏导存在}\ \not\Rightarrow\ \text{可微}\qquad\text{偏导连续}\ \Rightarrow\ \text{可微}$$</p><h2 id="center-p-前置知识-p-center"><center><p>前置知识</p></center></h2><details class="folding-tag" cyan><summary> 一元导数与线性映射（不熟可以展开） </summary>              <div class='content'>              <p><strong>一元导数</strong>（<a href="/posts/3a8afdfc.html">1.4 节</a>）：$f'(x_0)=\lim\limits_{h\to0}\dfrac{f(x_0+h)-f(x_0)}{h}$</p><p><strong>线性映射</strong>：$A:\mathbb{R}^2\to\mathbb{R}$ 可写成 $A(h_1,h_2)=ah_1+bh_2$，即一个 $1\times2$ 矩阵。</p><div class="note info flat"><p><strong>可微的本质是&quot;线性逼近&quot;</strong></p><p>  一元里：$\Delta y=f'(x_0)\Delta x+o(\Delta x)$——<strong>用一条直线（线性函数）逼近曲线</strong>。</p><p>  多元里：$\Delta f=A(\Delta\vec r)+o(|\Delta\vec r|)$——<strong>用一个平面（线性映射）逼近曲面</strong>。</p><p>  <strong>&quot;除法&quot;这个障碍可以完全绕过</strong>：不定义 $\frac{\Delta f}{\Delta\vec r}$，而直接说&quot;$\Delta f$ 减掉一个<strong>线性量</strong>之后，余项是 $o(|\Delta\vec r|)$&quot;。</p><p>  <strong>这个 $A$（如果存在）就叫全微分</strong>，它的矩阵表示就是梯度。</p></div>              </div>            </details><h1 id="center-p-一、基础：沿坐标轴切一刀-p-center"><center><p>一、基础：沿坐标轴切一刀</p></center></h1><p>  <strong>（这一部分不需要任何多元微积分基础。）</strong></p><h2 id="center-p-偏导数-p-center"><center><p>偏导数</p></center></h2><h3 id="center-p-定义-p-center"><center><p>定义</p></center></h3><p>  <strong>冻结其他变量</strong>，只让一个变：</p><p>$$\frac{\partial f}{\partial x}(x_0,y_0)=\lim_{\Delta x\to0}\frac{f(x_0+\Delta x,y_0)-f(x_0,y_0)}{\Delta x}$$</p><p>  这就是<strong>一元导数</strong>——把 $f(x,y_0)$ 看成 $x$ 的一元函数。</p><h3 id="center-p-几何意义-p-center"><center><p>几何意义</p></center></h3><p>  曲面上过点 $(x_0,y_0,f_0)$ 有两条特殊曲线：</p><ul><li><strong>平行于 $x$ 轴</strong>的那条：它的切线斜率是 $\dfrac{\partial f}{\partial x}$</li><li><strong>平行于 $y$ 轴</strong>的那条：它的切线斜率是 $\dfrac{\partial f}{\partial y}$</li></ul><div class="note danger flat"><p><strong>反例一：偏导数存在，但函数不连续</strong></p><p><strong>例</strong>：</p><p>$$f(x,y)=\begin{cases}\dfrac{xy}{x^2+y^2},&amp;(x,y)\ne(0,0)\\0,&amp;(x,y)=(0,0)\end{cases}$$</p><p>  <strong>算偏导</strong>（在原点）：</p><p>$$f_x(0,0)=\lim_{\Delta x\to0}\frac{f(\Delta x,0)-0}{\Delta x}=\lim\frac{0}{\Delta x}=0$$</p><p>  因为 $f(\Delta x,0)=\dfrac{\Delta x\cdot0}{\Delta x^2+0}=0$。同理 $f_y(0,0)=0$。</p><p>  <strong>但 5.1 节已经算过：这个函数在原点极限不存在</strong>（沿 $y=x$ 得 $\frac12$）。</p><p>  <strong>所以它在原点不连续！</strong></p><p><strong>这说明什么</strong></p><p>  偏导数只检查了<strong>两条坐标轴方向</strong>的行为，<strong>完全没管其他方向</strong>。</p><p>  $f(\Delta x,0)\equiv0$ 和 $f(0,\Delta y)\equiv0$ 都成立——所以沿坐标轴看，&quot;函数是常零&quot;。</p><p>  <strong>但沿对角线 $y=x$，$f\equiv\frac12$——完全不连续。</strong></p><p>  <strong>所以：偏导存在 ⟹ 不保证连续。</strong></p><p>  <strong>这与一元完全不同</strong>（一元里可导必连续，<a href="/posts/3a8afdfc.html">1.4 节</a>）。</p></div><h2 id="center-p-方向导数-p-center"><center><p>方向导数</p></center></h2><p>  偏导只沿坐标轴。<strong>能不能沿任意方向？</strong></p><p>  <strong>能——用参数化绕过除法</strong>。设 $\vec l=(\cos\alpha,\sin\alpha)$ 是方向：</p><p>$$\frac{\partial f}{\partial l}(M_0)=\lim_{t\to0^+}\frac{f(x_0+t\cos\alpha,\ y_0+t\sin\alpha)-f(x_0,y_0)}{t}$$</p><p>  <strong>注意分母是 $t$（一个数），不是向量</strong>——所以这个极限有意义 ✓</p><p>  <strong>这是&quot;绕过除法&quot;的第一种成功尝试</strong>：把方向固定，让<strong>长度</strong>趋于 0。</p><div class="note info flat"><p><strong>方向导数与偏导的关系</strong></p><p>  取 $\alpha=0$：$\dfrac{\partial f}{\partial l}=\dfrac{\partial f}{\partial x}$ ✓<br>  取 $\alpha=\frac\pi2$：$\dfrac{\partial f}{\partial l}=\dfrac{\partial f}{\partial y}$ ✓</p><p>  <strong>所以偏导是方向导数的特例。</strong></p><p>  <strong>反过来不成立</strong>：方向导数在<strong>所有</strong>方向都存在，<strong>仍然推不出可微</strong>（下面反例二）。</p><p>  <strong>为什么？</strong> 方向导数只检查了<strong>过 $M_0$ 的直线</strong>，而可微要求<strong>任何路径</strong>。</p><p>  <strong>这与 5.1 节&quot;直线扫描不够&quot;是同一个道理。</strong></p></div><h2 id="center-p-全微分（可微）-p-center"><center><p>全微分（可微）</p></center></h2><h3 id="center-p-定义-p-center-2"><center><p>定义</p></center></h3><blockquote><p><strong>定义</strong>：若存在<strong>线性映射</strong> $A$，使<br>$$\Delta f=f(M_0+\Delta\vec r)-f(M_0)=A(\Delta\vec r)+o(|\Delta\vec r|)$$<br>则称 $f$ 在 $M_0$ <strong>可微</strong>，$A$ 称为<strong>全微分</strong>（记作 $\mathrm{d}f$）。</p></blockquote><p>  <strong>$A$ 是个线性映射</strong>，在 $\mathbb{R}^2\to\mathbb{R}$ 的情形可写成</p><p>$$A(h_1,h_2)=A_1h_1+A_2h_2$$</p><p>  <strong>可以证明</strong>：若可微，则 $A_1=f_x$、$A_2=f_y$。所以</p><p>$$\mathrm{d}f=f_x,\mathrm{d}x+f_y,\mathrm{d}y$$</p><p>  <strong>注意这里的 $\mathrm{d}f$ 是一个&quot;线性函数&quot;</strong>，不是一个数——与一元的 $\mathrm{d}y=f'(x)\mathrm{d}x$（<a href="/posts/3a8afdfc.html">1.4 节</a>）完全一致。</p><h3 id="center-p-几何意义：切平面-p-center"><center><p>几何意义：切平面</p></center></h3><p>  可微意味着曲面在该点<strong>有一个确定的切平面</strong>：</p><p>$$z=f_0+f_x(x-x_0)+f_y(y-y_0)$$</p><p>  <strong>&quot;可微&quot;= &quot;曲面在该点光滑、有切平面&quot;</strong>。</p><p>  而<strong>偏导存在</strong>只说明&quot;沿两条特定曲线的切线存在&quot;——那两条切线<strong>不一定共面</strong>！</p><div class="note danger flat"><p><strong>反例二：偏导都存在（甚至方向导数处处存在），但不可微</strong></p><p><strong>例</strong>：</p><p>$$f(x,y)=\begin{cases}\dfrac{x^2y}{x^4+y^2},&amp;(x,y)\ne(0,0)\\0,&amp;(x,y)=(0,0)\end{cases}$$</p><p>  <strong>算偏导</strong>（在原点）：</p><p>$$f_x(0,0)=\lim_{\Delta x\to0}\frac{f(\Delta x,0)}{\Delta x}=0,\qquad f_y(0,0)=\lim\frac{f(0,\Delta y)}{\Delta y}=0$$</p><p>  <strong>所以两个偏导都存在，都是 0。</strong></p><p>  <strong>如果可微</strong>，那么</p><p>$$\Delta f=A_1h_1+A_2h_2+o(\rho)=0+o(\rho)$$</p><p>  即 $f(h_1,h_2)=o(\sqrt{h_1^2+h_2^2})$。</p><p>  <strong>但取 $h_2=h_1^2$</strong>（沿抛物线）：</p><p>$$f(h_1,h_1^2)=\frac{h_1^2\cdot h_1^2}{h_1^4+h_1^4}=\frac{h_1^4}{2h_1^4}=\frac12$$</p><p>  <strong>这个值是 $\frac12$，而 $\sqrt{h_1^2+h_1^4}\to0$</strong>——违反 $f=o(\rho)$！</p><p>  <strong>所以不可微</strong> ✓</p><p><strong>这个例子的厉害之处</strong></p><p>  它<strong>沿所有直线方向</strong>的方向导数都存在且为 0（5.1 节算过），但<strong>仍然不可微</strong>。</p><p>  <strong>所以：全方向的方向导数存在 ⟹ 不可微。</strong></p><p>  <strong>根本原因</strong>：方向导数只检查<strong>直线</strong>路径，而可微要求<strong>所有路径</strong>（包括抛物线）。</p><p>  <strong>这就是为什么可微的定义要用&quot;$o(|\Delta\vec r|)$&quot;而不是&quot;每个方向都收敛&quot;</strong>。</p></div><h1 id="center-p-二、标准：三个概念与三个反例-p-center"><center><p>二、标准：三个概念与三个反例</p></center></h1><p>  <strong>（这一部分达到标准教材深度。）</strong></p><h2 id="center-p-正确的充分条件：偏导连续-p-center"><center><p>正确的充分条件：偏导连续</p></center></h2><blockquote><p><strong>定理</strong>：若 $f$ 在 $M_0$ 的某邻域内<strong>偏导数存在且连续</strong>，则 $f$ 在 $M_0$ <strong>可微</strong>。</p></blockquote><details class="folding-tag" cyan><summary> 完整证明（用一元中值定理两次） </summary>              <div class='content'>              <p>  记 $M_0=(x_0,y_0)$，$\Delta f=f(x_0+h,y_0+k)-f(x_0,y_0)$。</p><p>  <strong>技巧：加一项减一项</strong>，分成两段。</p><p>$$\Delta f=\left[f(x_0+h,y_0+k)-f(x_0,y_0+k)\right]+\left[f(x_0,y_0+k)-f(x_0,y_0)\right]$$</p><p><strong>第一段</strong>：固定 $y=y_0+k$，这是 $x$ 的一元函数差。由<strong>一元中值定理</strong>：</p><p>$$f(x_0+h,y_0+k)-f(x_0,y_0+k)=f_x(\xi_1,y_0+k)\cdot h$$</p><p>其中 $\xi_1$ 介于 $x_0$ 与 $x_0+h$ 之间。</p><p><strong>第二段</strong>：固定 $x=x_0$：</p><p>$$f(x_0,y_0+k)-f(x_0,y_0)=f_y(x_0,\eta_1)\cdot k$$</p><p>其中 $\eta_1$ 介于 $y_0$ 与 $y_0+k$ 之间。</p><p><strong>所以</strong></p><p>$$\Delta f=f_x(\xi_1,y_0+k)h+f_y(x_0,\eta_1)k$$</p><p><strong>用偏导连续</strong>：当 $(h,k)\to(0,0)$ 时 $\xi_1\to x_0$、$\eta_1\to y_0$，所以</p><p>$$f_x(\xi_1,y_0+k)=f_x(x_0,y_0)+\alpha_1,\qquad f_y(x_0,\eta_1)=f_y(x_0,y_0)+\alpha_2$$</p><p>其中 $\alpha_1,\alpha_2\to0$。</p><p><strong>于是</strong></p><p>$$\Delta f=f_x(x_0,y_0)h+f_y(x_0,y_0)k+\left(\alpha_1h+\alpha_2k\right)$$</p><p>  <strong>最后一项是 $o(|h|+|k|)=o(\rho)$</strong>（因为 $|\alpha_1h|\le|\alpha_1|\rho\to0$）。</p><p>  所以 $\Delta f=A(\Delta\vec r)+o(\rho)$，<strong>可微</strong> ✓ $\blacksquare$</p><p><strong>注意这个证明的结构</strong>：<strong>用&quot;加一项减一项&quot;把二维问题拆成两个一维问题</strong>，然后各用一次中值定理。</p><p>  这与 1.4 节乘积法则的证明是同一手法。</p>              </div>            </details><div class="note warning flat"><p><strong>&quot;偏导连续&quot;是充分条件，不是必要条件</strong></p><p>  <strong>存在可微但偏导不连续的函数。</strong></p><p><strong>例</strong>：</p><p>$$f(x,y)=\begin{cases}(x^2+y^2)\sin\dfrac{1}{x^2+y^2},&amp;(x,y)\ne(0,0)\\0,&amp;(x,y)=(0,0)\end{cases}$$</p><p>  <strong>它在原点可微</strong>（可验证 $\Delta f=o(\rho)$），$f_x(0,0)=f_y(0,0)=0$。</p><p>  <strong>但偏导数在原点不连续</strong>——因为</p><p>$$f_x(x,y)=2x\sin\frac{1}{x^2+y^2}-2x\cos\frac{1}{x^2+y^2}\cdot\frac{1}{x^2+y^2}$$</p><p>  第二项当 $x\to0$ 时<strong>振荡不收敛</strong>。</p><p>  <strong>所以&quot;$C^1$&quot;（偏导连续）是一个比&quot;可微&quot;更适合证明定理的技术条件</strong>，但严格弱于可微的必要条件。</p><p>  <strong>实用上</strong>：初等函数在其定义域内都是 $C^1$，所以<strong>考试题里基本遇不到这种病态情况</strong>。但理论上必须分清。</p></div><h2 id="center-p-三个反例的层级-p-center"><center><p>三个反例的层级</p></center></h2><p>  把本文的结论排成一张图：</p><figure class="highlight llvm"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">偏导数存在</span><br><span class="line">    ↓ (最强 → 最弱，箭头是<span class="string">&quot;推不出&quot;</span>)</span><br><span class="line"></span><br><span class="line">偏导数存在  ──✗──→  连续        【反例一：xy/(<span class="keyword">x</span>²+y²)】</span><br><span class="line">偏导数存在  ──✗──→  可微        【反例二：<span class="keyword">x</span>²y/(<span class="keyword">x</span>⁴+y²)】</span><br><span class="line">连续       ──✗──→  可微        【反例三：见下】</span><br><span class="line">可微        ──✓──→  连续        【定理】</span><br><span class="line">可微        ──✓──→  偏导存在</span><br><span class="line">偏导连续    ──✓──→  可微</span><br></pre></td></tr></table></figure><div class="note danger flat"><p><strong>反例三：连续但不可微</strong></p><p>  $f(x,y)=\sqrt{x^2+y^2}$ 在原点。</p><p>  <strong>连续</strong> ✓（$f\to0=f(0,0)$）</p><p>  <strong>偏导</strong>：</p><p>$$f_x(0,0)=\lim_{\Delta x\to0}\frac{|\Delta x|-0}{\Delta x}$$</p><p>  当 $\Delta x\to0^+$ 时是 $+1$，$\Delta x\to0^-$ 时是 $-1$——<strong>极限不存在</strong>！</p><p>  所以<strong>偏导都不存在</strong>，当然不可微。</p><p>  <strong>这正好说明：连续 ⟹ 不保证可微。</strong></p><p>  <strong>几何</strong>：$z=\sqrt{x^2+y^2}$ 是个<strong>锥面</strong>，顶点处没有切平面。</p></div><h3 id="center-p-完整的层级表-p-center"><center><p>完整的层级表</p></center></h3><table><thead><tr><th>条件</th><th>⟹ 连续</th><th>⟹ 偏导存在</th><th>⟹ 可微</th></tr></thead><tbody><tr><td><strong>偏导存在</strong></td><td>✗</td><td>✓</td><td>✗</td></tr><tr><td><strong>连续</strong></td><td>✓</td><td>✗</td><td>✗</td></tr><tr><td><strong>可微</strong></td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td><strong>偏导连续（$C^1$）</strong></td><td>✓</td><td>✓</td><td>✓</td></tr></tbody></table><p>  <strong>注意第一行</strong>：偏导存在与连续<strong>互不蕴含</strong>！</p><p>  （$xy/(x^2+y^2)$：偏导在但不连续；$\sqrt{x^2+y^2}$：连续但偏导不在。）</p><h1 id="center-p-三、深入：反例的层级与常见错误-p-center"><center><p>三、深入：反例的层级与常见错误</p></center></h1><p>  <strong>（这一部分讲最容易误解的地方。）</strong></p><h2 id="center-p-常见错误-p-center"><center><p>常见错误</p></center></h2><div class="note danger flat"><p><strong>错误一：以为偏导存在就连续</strong></p><p>  $xy/(x^2+y^2)$ 是反例。<strong>这是多元与一元最大的差别。</strong></p><p><strong>错误二：以为方向导数都存在就可微</strong></p><p>  $x^2y/(x^4+y^2)$ 是反例（所有方向导数都是 0）。</p><p><strong>错误三：以为连续就可微</strong></p><p>  $\sqrt{x^2+y^2}$ 是反例。</p><p><strong>错误四：把 $\mathrm{d}f$ 当成&quot;数&quot;</strong></p><p>  $\mathrm{d}f=f_x\mathrm{d}x+f_y\mathrm{d}y$ 是一个<strong>线性映射</strong>（在 $(x,y)$ 处取值）。</p><p>  它作用在 $(\mathrm{d}x,\mathrm{d}y)$ 上才给出一个数。</p><p><strong>错误五：认为&quot;偏导连续&quot;是必要条件</strong></p><p>  它是<strong>充分</strong>条件。可微函数可以偏导不连续。</p><p><strong>错误六：求分段函数在分界点的偏导时直接用公式</strong></p><p>  <strong>必须用定义</strong>（极限）。与一元中&quot;$|x|$ 在 0 处求导&quot;是同一个规矩。</p><p><strong>错误七：忘记可微 ⟹ 连续这条能用的方向</strong></p><p>  虽然&quot;偏导存在 ⟹ 连续&quot;不成立，但&quot;<strong>可微 ⟹ 连续</strong>&quot;成立，而且<strong>很好用</strong>。</p></div><h1 id="center-p-四、拓展-p-center"><center><p>四、拓展</p></center></h1><p>  <strong>（这一部分真正可选。）</strong></p><h2 id="center-p-历史：偏导数与全微分的先后之争-p-center"><center><p>历史：偏导数与全微分的先后之争</p></center></h2><p>  <strong>现代教材先讲偏导数再讲全微分，但历史上顺序是反的。</strong></p><table><thead><tr><th>时间</th><th>人物</th><th>贡献</th></tr></thead><tbody><tr><td>1730s</td><td>欧拉</td><td>偏导数（&quot;$p$、$q$ 记号&quot;）</td></tr><tr><td>1770s</td><td>拉格朗日</td><td>偏导数的系统使用</td></tr><tr><td>1820s</td><td><strong>柯西</strong></td><td>第一次讨论&quot;全微分&quot;是否由偏导决定</td></tr><tr><td><strong>1878</strong></td><td><strong>达布</strong></td><td>指出偏导存在<strong>不</strong>蕴含连续（本文的反例）</td></tr><tr><td>1880s</td><td>施瓦茨</td><td>偏导连续 ⟹ 可微（本文的定理）</td></tr><tr><td>1930s</td><td>弗雷歇</td><td>用线性映射定义导数（现代的&quot;Frechet 导数&quot;）</td></tr></tbody></table><p>  <strong>关键发现</strong>：柯西和达布花了很长时间才意识到<strong>偏导数存在远不够</strong>。</p><p>  <strong>为什么会这样</strong>：偏导数是从一元的&quot;导数&quot;直接推广的——<strong>看起来应该是&quot;多元导数&quot;</strong>。</p><p>  但<strong>一元的导数 = 线性映射（$1\times1$ 矩阵）</strong>，多元的&quot;线性映射&quot;是矩阵——<strong>而偏导数只给出了矩阵的一列</strong>。</p><div class="note info flat"><p><strong>&quot;偏&quot;这个字的意思</strong></p><p>  <strong>偏导数只描述了&quot;沿坐标轴&quot;的变化率</strong>。</p><p>  <strong>打个比方</strong>：你站在山坡上，偏导 $\partial f/\partial x$ 只告诉你&quot;往正东走会怎样&quot;，<br>$\partial f/\partial y$ 只告诉你&quot;往正北走会怎样&quot;。</p><p>  但<strong>山坡可能在你脚下有个尖角</strong>，沿东北方向就直接掉下去——两个坐标方向的切线都在，但<strong>它们不共面</strong>，所以没有切平面。</p><p>  <strong>&quot;可微&quot;就是&quot;存在切平面&quot;</strong>——这比&quot;两个方向有切线&quot;强得多。</p><p>  <strong>所以全微分（可微）才是&quot;多元版的导数&quot;。</strong></p></div><h2 id="center-p-联系：矩阵微积分与向量化-p-center"><center><p>联系：矩阵微积分与向量化</p></center></h2><p>  <strong>现代机器学习里的&quot;梯度&quot;就是本文的梯度</strong>，但<strong>记法不同</strong>。</p><p>  <strong>本文</strong>：$\nabla f=(f_x,f_y)$（行向量）</p><p>  <strong>机器学习</strong>：</p><ul><li>标量对向量求导：$\partial L/\partial \vec w$ 是<strong>列向量</strong>（与 $\vec w$ 同形状）</li><li>向量对向量：$\partial\vec y/\partial\vec x$ 是矩阵（<strong>雅可比</strong>）</li><li>标量对矩阵：$\partial L/\partial W$ 是与 $W$ <strong>同形状的矩阵</strong></li></ul><p>  <strong>核心规则</strong>：<strong>梯度的形状与自变量的形状一致</strong>。</p><p>  <strong>为什么这样约定</strong>：为了让梯度下降 $w\leftarrow w-\eta\nabla L$ 能直接相加减，不用转置。</p><p>  <strong>这就是为什么 PyTorch 里</strong>：</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">x = torch.randn(<span class="number">3</span>, <span class="number">4</span>, requires_grad=<span class="literal">True</span>)</span><br><span class="line">y = (x ** <span class="number">2</span>).<span class="built_in">sum</span>()      <span class="comment"># 标量</span></span><br><span class="line">y.backward()</span><br><span class="line">x.grad.shape            <span class="comment"># torch.Size([3, 4]) —— 与 x 同形状</span></span><br></pre></td></tr></table></figure><p>  <strong>如果按本文的&quot;行向量&quot;约定，这个形状就对不上了。</strong></p><h2 id="center-p-应用：自动微分就是-精确的链式法则-p-center"><center><p>应用：自动微分就是&quot;精确的链式法则&quot;</p></center></h2><p>  <strong>1.4 节</strong>讲过数值求导的误差上界（$h\sim\sqrt\varepsilon$）。</p><p>  <strong>自动微分（AD）</strong> 不做差分，而是<strong>直接对计算过程应用链式法则</strong>（5.3 节）。</p><p>  <strong>前向模式</strong>：每个数携带 $(v, \dot v)$，乘法规则是</p><p>$$(u,\dot u)\cdot(v,\dot v)=(uv,\ \dot uv+u\dot v)$$</p><p>  <strong>这就是本文的链式法则</strong>——只是变成了&quot;逐元素&quot;的运算。</p><p>  <strong>反向模式</strong>（反向传播）：</p><p>$$\frac{\partial L}{\partial x_i}=\sum_j\frac{\partial L}{\partial y_j}\frac{\partial y_j}{\partial x_i}$$</p><p>  <strong>这正是雅可比矩阵的转置乘法</strong>（$J^\top$）。</p><p>  <strong>精度优势</strong>：AD 没有除以小量 $h$，<strong>误差与步长无关</strong>——所以<strong>能算到机器精度</strong>。</p><p>  <strong>这就是为什么深度学习框架用 AD 而不是数值差分。</strong></p><div class="note warning flat"><p><strong>AD 不是符号求导</strong></p><p>  <strong>符号求导</strong>（sympy）会生成一个大表达式，可能<strong>表达式爆炸</strong>（长度为指数级）。</p><p>  <strong>AD 只做数值计算</strong>，内存开销与计算图大小成正比，<strong>不会爆炸</strong>。</p><p>  <strong>所以</strong>：数学推导用符号求导，训练模型用 AD。</p></div><h2 id="center-p-延伸阅读-p-center"><center><p>延伸阅读</p></center></h2><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</span><span class="reference-title">参考资料</span></span></span>——第 9 章多元函数的微分，含链式法则与雅可比。</p><h2 id="center-p-小结-p-center"><center><p>小结</p></center></h2><table><thead><tr><th>概念</th><th>定义</th><th>关键</th></tr></thead><tbody><tr><td><strong>偏导数</strong></td><td>冻结其他变量求一元导</td><td>只检查<strong>两条坐标轴</strong></td></tr><tr><td><strong>方向导数</strong></td><td>沿方向 $\vec l$，分母用 $t$</td><td>绕过除法；只检查<strong>直线</strong></td></tr><tr><td><strong>可微</strong></td><td>$\Delta f=A(\Delta\vec r)+o(|\Delta\vec r|)$</td><td>$A$ 是<strong>线性映射</strong>，即切平面</td></tr><tr><td><strong>偏导连续 ⟹ 可微</strong></td><td>加一项减一项 + 中值定理</td><td>充分条件，<strong>不必要</strong></td></tr><tr><td><strong>可微 ⟹ 连续</strong></td><td>成立</td><td>与一元一致</td></tr><tr><td><strong>偏导存在 ⟹ 连续</strong></td><td><strong>不成立</strong></td><td>多元特有</td></tr><tr><td><strong>方向导全存在 ⟹ 可微</strong></td><td><strong>不成立</strong></td><td>多元特有</td></tr></tbody></table><div class="note info flat"><p><strong>下一节预告</strong></p><p>可微之后，就能定义<strong>链式法则</strong>和<strong>梯度</strong>了。</p><p>但多元里有一个新问题：</p><blockquote><p><strong>复合函数的&quot;链式法则&quot;到底长什么样？</strong></p></blockquote><p>  一维里 $y=f(u)$，$u=g(x)$，则 $\dfrac{\mathrm{d}y}{\mathrm{d}x}=f'\cdot g'$。</p><p>  多元里若有 $z=f(u,v)$，$u=u(x,y)$，$v=v(x,y)$，则</p><p>$$\frac{\partial z}{\partial x}=\frac{\partial z}{\partial u}\frac{\partial u}{\partial x}+\frac{\partial z}{\partial v}\frac{\partial v}{\partial x}$$</p><p>  <strong>注意是&quot;加法&quot;——因为两条路径都通</strong>。</p><p>  下一节会讲链式法则、梯度与方向导数的关系（$\frac{\partial f}{\partial l}=\nabla f\cdot\vec l$）、以及<strong>隐函数定理</strong>。</p></div><h2 id="center-p-参考文献-p-center"><center><p>参考文献</p></center></h2><p>  <span class="hidden-anchor" id="referto_[1]"></span><sup class="reference"><a href="#referfrom_[1]">[1]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">华东师范大学数学科学学院. 数学分析: 下册[M]. 5版. 北京: 高等教育出版社, 2019.</span><span class="reference-title">参考资料</span></span></span>——第十七章多元函数的微分学。</p><p>  <span class="hidden-anchor" id="referto_[2]"></span><sup class="reference"><a href="#referfrom_[2]">[2]</a></sup><span class="reference-bubble"><span class="reference-item"><span class="reference-literature">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</span><span class="reference-title">参考资料</span></span></span>——第 9 章多元函数的微分。</p><div class="reference-source"><span class="hidden-anchor" id="referfrom_[1]"></span><a class="reference-anchor" href="#referto_[1]">[1]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://abook.hep.com.cn/1210369" target="_blank" rel="noopener">华东师范大学数学科学学院. 数学分析: 下册[M]. 5版. 北京: 高等教育出版社, 2019.</a></div><div class="reference-source"><span class="hidden-anchor" id="referfrom_[2]"></span><a class="reference-anchor" href="#referto_[2]">[2]<div class="reference-anchor-up fa-solid fa-angles-up"></div></a><a class="reference-link" href="https://openlibrary.org/books/OL5195991M" target="_blank" rel="noopener">RUDIN W. Principles of Mathematical Analysis[M]. 3rd ed. New York: McGraw-Hill, 1976.</a></div>]]></content>
    
    
    <summary type="html">向量不能除法带来的困难、偏导数与方向导数的定义、可微的定义与几何意义、偏导连续才是可微的充分条件，以及三个层层递进的反例</summary>
    
    
    
    <category term="数学分析" scheme="https://hsmk.mikufans.date/categories/%E6%95%B0%E5%AD%A6%E5%88%86%E6%9E%90/"/>
    
    
    <category term="学习" scheme="https://hsmk.mikufans.date/tags/%E5%AD%A6%E4%B9%A0/"/>
    
  </entry>
  
</feed>
