# 黑塞矩阵

多变量标量值函数的黑塞矩阵（Hessian matrix），是一个方阵，其元素均为该函数的二阶偏导数。它是普通二阶导数在多变量情形下的推广：正如梯度 \( \nabla f \) 推广了一阶导数，黑塞矩阵推广了二阶导数。<sup>[1](https://www.khanacademy.org/math/multivariable-calculus/applications-of-multivariable-derivatives/modal/a/the-hessian)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 对于 \( f : \mathbb{R}^n \to \mathbb{R} \)，黑塞矩阵是 \( n \times n \) 矩阵，其 \( (i,j) \) 元素为 \( \partial^2 f / \partial x_i \partial x_j \)；它是梯度函数的导数矩阵。<sup>[2](https://ximera.osu.edu/mklynn2/multivariable/content/04_3_hessian/hessian)</sup> |
| 对称性 | 若 \( f \) 具有连续的一阶和二阶偏导数，则由克莱罗定理，黑塞矩阵是对称的，即 \( \partial_i \partial_j f = \partial_j \partial_i f \)。<sup>[2](https://ximera.osu.edu/mklynn2/multivariable/content/04_3_hessian/hessian)</sup><sup> • </sup><sup>[3](https://www.math.utoronto.ca/courses/mat237y1/20199/notes/Chapter2/S2.5.html)</sup> |
| 起源 | 路德维希·奥托·黑塞（Ludwig Otto Hesse，1811–1874）于1842年在一篇研究三次曲线和二次曲线的论文中引入了黑塞行列式。<sup>[4](https://mathshistory.st-andrews.ac.uk//Biographies/Hesse/)</sup> |
| 二阶导数判别法 | 在临界点处，正定的黑塞矩阵对应局部极小值，负定的黑塞矩阵对应局部极大值，不定的黑塞矩阵对应鞍点。<sup>[5](https://stanford.edu/~jgrimmer/Math16/mc7_16.pdf)</sup> |
| 优化代价 | 在 \( d \) 个变量的情形下，存储和求逆黑塞矩阵需要 \( O(d^2) \) 的内存和 \( O(d^3) \) 的计算量，这促使了拟牛顿法和无黑塞矩阵方法的发展。<sup>[6](https://www.intechopen.com/online-first/1258793)</sup> |
| 统计学用途 | 在拉普拉斯近似中，拟合高斯分布的协方差由 \( \log f \) 在极大值点处的黑塞矩阵确定。<sup>[7](https://www.cs.helsinki.fi/u/ahonkela/teaching/compstats1/book/bayesian-model-comparison-and-laplace-approximation.html)</sup> |

## 定义与结构

对于二次可微函数 \( f : \mathbb{R}^n \to \mathbb{R} \)，梯度 \( \nabla f \) 是一个向量值函数，其分量为各一阶偏导数。对梯度取导数矩阵，得到一个 \( n \times n \) 方阵，即 \( f \) 的黑塞矩阵，通常记作 \( \mathbf{H}_f \)、\( \nabla^2 f \) 或 \( D^2 f \)。<sup>[2](https://ximera.osu.edu/mklynn2/multivariable/content/04_3_hessian/hessian)</sup><sup> • </sup><sup>[8](https://arts.uwaterloo.ca/~tmparker/econ_600_notes/calculus.html)</sup> 其元素为

\[ (H_f)_{ij} = \frac{\partial^2 f}{\partial x_i \, \partial x_j}. \]

有两个特征使它区别于普通矩阵。它只对标量值函数有定义，且其元素本身也是函数，因此黑塞矩阵是一个矩阵值函数，需在某一点处取值。<sup>[1](https://www.khanacademy.org/math/multivariable-calculus/applications-of-multivariable-derivatives/modal/a/the-hessian)</sup> 在麻省理工学院矩阵微积分课程的讲义中，黑塞矩阵被描述为始终是方阵且对称的，这与一般的雅可比矩阵形成对比——后者可以是非方阵，且很少是对称的；事实上，黑塞矩阵就是梯度函数 \( \nabla f \) 的雅可比矩阵。<sup>[9](https://live.ocw.mit.edu/courses/18-s096-matrix-calculus-for-machine-learning-and-beyond-january-iap-2023/mit18_s096iap23_lec_full.pdf)</sup>

**对称性。** 当 \( f \) 具有连续的一阶和二阶偏导数时，对称条件 \( H_{ij} = H_{ji} \) 化为 \( \partial_i \partial_j f = \partial_j \partial_i f \)，由克莱罗定理成立；黑塞矩阵对 \( C^2 \) 函数有定义。<sup>[3](https://www.math.utoronto.ca/courses/mat237y1/20199/notes/Chapter2/S2.5.html)</sup> Ximera 讲义中给出了一个计算实例：对于 \( f(x,y) = x + 2xy + 3y^3 \)，梯度为 \( (1+2y,\ 2x+9y^2) \)，黑塞矩阵为第一行元素是0和2、第二行元素是2和 \( 18y \) 的矩阵。<sup>[2](https://ximera.osu.edu/mklynn2/multivariable/content/04_3_hessian/hessian)</sup>

## 作为曲率的解释

黑塞矩阵描述函数的局部曲率，即函数图像在某点附近的弯曲程度。<sup>[10](https://stanford.edu/~jgrimmer/Math16/mc6_16.pdf)</sup> 对于单位向量 \( v \)，方向二阶导数 \( v^{\top} H v \) 度量了沿该方向的曲率，而黑塞矩阵的特征值给出了沿其主方向的曲率。<sup>[11](https://mail.maths.usyd.edu.au/u/daners/publ/vector-calculus/part-functions-of-several-variables-5-8.html)</sup> 在围绕点 \( a \) 的多变量泰勒展开中，二阶项为 \( \tfrac{1}{2}(x-a)^{\top} H(f)(a) (x-a) \)，因此黑塞矩阵决定了函数的二次近似。<sup>[5](https://stanford.edu/~jgrimmer/Math16/mc7_16.pdf)</sup>

## 二阶导数判别法

黑塞矩阵是优化中临界点分类的基础，是单变量二阶导数判别法的多变量推广。<sup>[2](https://ximera.osu.edu/mklynn2/multivariable/content/04_3_hessian/hessian)</sup> 一般判别法根据矩阵的正定、负定或不定性质来表述：<sup>[5](https://stanford.edu/~jgrimmer/Math16/mc7_16.pdf)</sup>

- 若 \( H(f)(a) \) 正定，则 \( a \) 为局部极小值点。
- 若 \( H(f)(a) \) 负定，则 \( a \) 为局部极大值点。
- 若 \( H(f)(a) \) 不定，则 \( a \) 为鞍点。

在二维情形下，将临界点处的黑塞矩阵写作 \( \begin{pmatrix} A & B \\ B & C \end{pmatrix} \)，判别法使用行列式：\( AC - B^2 > 0 \) 且 \( A > 0 \) 给出局部极小值，\( AC - B^2 > 0 \) 且 \( A < 0 \) 给出局部极大值，\( AC - B^2 < 0 \) 给出鞍点，\( AC - B^2 = 0 \) 则无法判定。<sup>[5](https://stanford.edu/~jgrimmer/Math16/mc7_16.pdf)</sup> 黑塞矩阵的行列式就是标准微积分教材中二变量二阶导数判别法里称为 \( D \) 的量。<sup>[12](https://www.math.emory.edu/~mpcarr/math211/print/ch14.pdf)</sup>

## 在优化算法中的作用

**牛顿法。** 二阶优化方法利用黑塞矩阵产生反映目标函数几何结构的方向缩放更新，由此得到经典的牛顿更新公式。实际代价很高：在 \( d \) 个变量的情形下，存储和求逆黑塞矩阵需要 \( O(d^2) \) 的内存和 \( O(d^3) \) 的计算量。<sup>[6](https://www.intechopen.com/online-first/1258793)</sup>

**拟牛顿法和无黑塞矩阵方法。** BFGS 和 L-BFGS 等拟牛顿法从梯度信息中递推地近似黑塞矩阵，在避免显式计算黑塞矩阵的同时实现超线性收敛；L-BFGS 仅存储有限数量的校正对以保证可扩展性。<sup>[6](https://www.intechopen.com/online-first/1258793)</sup> 在深度学习中，无黑塞矩阵优化通过黑塞矩阵-向量乘积来近似二阶信息，避免显式构造矩阵。<sup>[6](https://www.intechopen.com/online-first/1258793)</sup> 同样的思想出现在数值软件中：SciPy 的 Newton-CG 算法只需要黑塞矩阵与任意向量的乘积，而对于大规模最小化问题，存储整个黑塞矩阵可能消耗大量时间和内存。<sup>[13](https://docs.scipy.org/doc/scipy/tutorial/optimize.html)</sup>

## 统计学与拉普拉斯近似

在贝叶斯统计中，拉普拉斯近似在众数处用一个高斯分布拟合某分布，拟合高斯分布的协方差由 \( \log f \) 在极大值点 \( \widehat{\theta} \) 处的黑塞矩阵确定。<sup>[7](https://www.cs.helsinki.fi/u/ahonkela/teaching/compstats1/book/bayesian-model-comparison-and-laplace-approximation.html)</sup> 在似然理论中，对数似然的黑塞矩阵度量了最大似然估计处对数似然曲面的观测曲率，而估计量的渐近协方差是期望信息矩阵的逆。<sup>[14](https://www.lancaster.ac.uk/~prendivs/accessible/math330/notes.tex/Ch4.Sx1.html)</sup>

## 分子振动

在计算化学中，分子势能关于核坐标的黑塞矩阵决定了其振动行为。对于含 \( N \) 个原子的体系，笛卡尔坐标下的黑塞矩阵维度为 \( 3N \times 3N \)，经质量加权后，振动的简正模式是黑塞矩阵的特征向量，而其特征值定义了振动频率。<sup>[15](https://purehost.bath.ac.uk/ws/portalfiles/portal/187933631/UnivBath_Phd_2009_E_Soliman.pdf)</sup>

## 历史

该名称来自路德维希·奥托·黑塞（Ludwig Otto Hesse，1811–1874），一位出生于柯尼斯堡的德国数学家，研究代数函数和不变量理论。他于1842年在一篇研究三次曲线和二次曲线的论文中引入了黑塞行列式，这一概念随后在代数几何中得到广泛应用。<sup>[4](https://mathshistory.st-andrews.ac.uk//Biographies/Hesse/)</sup> 在这一几何背景下，黑塞证明了其行列式为每条曲线指定另一条曲线，使得前者的二重点位于后者之上，这条曲线被称为“黑塞曲线”；1844年他将这一构造推广到曲面。<sup>[16](https://en.wikisource.org/wiki/A_History_of_Mathematics_%281893%29/Recent_Times/Analytic_Geometry)</sup>

## References

1. [The Hessian matrix, Khan Academy, Multivariable Calculus](https://www.khanacademy.org/math/multivariable-calculus/applications-of-multivariable-derivatives/modal/a/the-hessian)
2. [The Hessian Matrix, Ximera (Ohio State University)](https://ximera.osu.edu/mklynn2/multivariable/content/04_3_hessian/hessian)
3. [MAT237Y1 Notes, Section 2.5, University of Toronto](https://www.math.utoronto.ca/courses/mat237y1/20199/notes/Chapter2/S2.5.html)
4. [Ludwig Otto Hesse (1811–1874), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk//Biographies/Hesse/)
5. [Math Camp lecture notes, Justin Grimmer, Stanford University (2016)](https://stanford.edu/~jgrimmer/Math16/mc7_16.pdf)
6. [Curvature-Aware Optimisation in Machine Learning and Control Systems, IntechOpen](https://www.intechopen.com/online-first/1258793)
7. [Bayesian model comparison and Laplace approximation, Computational Statistics I, University of Helsinki](https://www.cs.helsinki.fi/u/ahonkela/teaching/compstats1/book/bayesian-model-comparison-and-laplace-approximation.html)
8. [Chapter 3 Calculus, Notes for ECON 600, University of Waterloo](https://arts.uwaterloo.ca/~tmparker/econ_600_notes/calculus.html)
9. [Matrix Calculus for Machine Learning and Beyond (18.S096), MIT OpenCourseWare](https://live.ocw.mit.edu/courses/18-s096-matrix-calculus-for-machine-learning-and-beyond-january-iap-2023/mit18_s096iap23_lec_full.pdf)
10. [Math Camp notes, Justin Grimmer, Stanford University (2016)](https://stanford.edu/~jgrimmer/Math16/mc6_16.pdf)
11. [Higher Order Derivatives, Vector Calculus notes, University of Sydney](https://mail.maths.usyd.edu.au/u/daners/publ/vector-calculus/part-functions-of-several-variables-5-8.html)
12. [Multivariable Calculus, Chapter 14, Emory University](https://www.math.emory.edu/~mpcarr/math211/print/ch14.pdf)
13. [Optimization (scipy.optimize), SciPy v1.18.0 Manual](https://docs.scipy.org/doc/scipy/tutorial/optimize.html)
14. [Information Matrices, MATH330 Likelihood Inference, Lancaster University](https://www.lancaster.ac.uk/~prendivs/accessible/math330/notes.tex/Ch4.Sx1.html)
15. [Introduction to computational chemistry, University of Bath PhD thesis (2009)](https://purehost.bath.ac.uk/ws/portalfiles/portal/187933631/UnivBath_Phd_2009_E_Soliman.pdf)
16. [A History of Mathematics (1893), Recent Times: Analytic Geometry, Wikisource](https://en.wikisource.org/wiki/A_History_of_Mathematics_%281893%29/Recent_Times/Analytic_Geometry)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Linear and multilinear algebra › Matrix theory › Matrix functions and matrix calculus

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/hessian-matrix

English original: https://www.edgepedia.org/hessian-matrix
