# 海森矩阵（Hessian matrix，hessian）

表达式的 Hessian 矩阵：其二阶偏导数。

## 怎么写

### hessian(f, variables)

**f**

要处理的表达式或函数。接受一个表达式。

**variables**

变量，放在方括号中。接受变量列表。

## 示例

- $\displaystyle H_{x, y} (x^{2}+y^{2}) = \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}$

  `hessian(x^2 + y^2, [x, y])`

  在求解器中，`hessian(x^2 + y^2, [x, y])` 的结果是 `[[2, 0], [0, 2]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=hessian%28x%5E2%20%2B%20y%5E2%2C%20%5Bx%2C%20y%5D%29)

## 相关函数

- [integrate](https://zh.hilberon.com/library/integrate)

  表达式的原函数，或它在某个区间上的定积分。
- [grad](https://zh.hilberon.com/library/grad)

  表达式的梯度：其偏导数组成的列表。
- [jacobian](https://zh.hilberon.com/library/jacobian)

  一列表达式的 Jacobi 矩阵：它们的偏导数。
- [div](https://zh.hilberon.com/library/div)

  向量场的散度。
- [laplacian](https://zh.hilberon.com/library/laplacian)

  表达式的 Laplace 算子：它各二阶偏导数之和。
- [diff](https://zh.hilberon.com/library/diff)

  表达式关于一个或多个变量的导数。

---
Source: https://zh.hilberon.com/library/hessian
