# Class Hessian

All Implemented Interfaces:
Matrix, MatrixAccess, MatrixRing, MatrixTable, Densifiable, AbelianGroup<Matrix>, Monoid<Matrix>, Ring<Matrix>, Table, DeepCopyable

public class Hessian extends SymmetricMatrix
The Hessian matrix is the square matrix of the second-order partial derivatives of a multivariate function. Mathematically, the Hessian of a scalar function is an $$n \times n$$ matrix, where n is the domain dimension of f. For a scalar function f, we have $H(f) = \begin{bmatrix} \frac{\partial^2 f}{\partial x_1^2} invalid input: '&' \frac{\partial^2 f}{\partial x_1\,\partial x_2} invalid input: '&' \cdots invalid input: '&' \frac{\partial^2 f}{\partial x_1\,\partial x_n} \\ \\ \frac{\partial^2 f}{\partial x_2\,\partial x_1} invalid input: '&' \frac{\partial^2 f}{\partial x_2^2} invalid input: '&' \cdots invalid input: '&' \frac{\partial^2 f}{\partial x_2\,\partial x_n} \\ \\ \vdots invalid input: '&' \vdots invalid input: '&' \ddots invalid input: '&' \vdots \\ \\ \frac{\partial^2 f}{\partial x_n\,\partial x_1} invalid input: '&' \frac{\partial^2 f}{\partial x_n\,\partial x_2} invalid input: '&' \cdots invalid input: '&' \frac{\partial^2 f}{\partial x_n^2} \end{bmatrix}$

This implementation computes the Hessian matrix numerically using the finite difference method. We assume that the function f is continuous so the Hessian matrix is square and symmetric.

• ## Constructor Summary

Constructors
Constructor
Description
Hessian(RealScalarFunction f, Vector x)
Construct the Hessian matrix for a multivariate function f at point x.
• ## Method Summary

### Methods inherited from class dev.nm.algebra.linear.matrix.doubles.matrixtype.dense.triangle.SymmetricMatrix

add, deepCopy, equals, get, getColumn, getRow, hashCode, minus, multiply, multiply, nCols, nRows, ONE, opposite, scaled, set, t, toDense, toString, ZERO

### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

### Methods inherited from interface dev.nm.algebra.linear.matrix.doubles.Matrix

toCSV
• ## Constructor Details

• ### Hessian

public Hessian
Construct the Hessian matrix for a multivariate function f at point x.
Parameters:
f - a multivariate function
x - the point to evaluate the Hessian of f at