Search⌘ K

Higher-Order Gradients: Hessian

Explore how to calculate higher-order gradients, including the Hessian matrix, for multivariate functions. Understand second-order partial derivatives and their role in algorithms like Newton’s method, with practical implementation in Python using NumPy and SciPy.

Higher-order derivatives

Gradients and derivatives are also known as first-order derivatives. Algorithms like Newton’s method require computing higher-order derivatives, such as second-order derivatives. Given a multivariate function f(x1,x2,...,xm):RmRf(x_1, x_2, ..., x_m): \R^m \rightarrow \R, higher-order gradients/derivatives are represented as follows:

  • 2fxi2\frac{\partial^2 f}{\partial x_i^2} is known as the second partial derivative of ff with respect to xix_i. In other words, the second-order derivative is the derivative of the first-order derivative xifxi\frac{\partial}{\partial x_i} \frac{\partial f}{\partial x_i} .

  • nfxin\frac{\partial^n f}{\partial x_i^n} ...