### How to create Hessian matrix without Hessian function

The Hessian matrix is the square matrix of second-order partial derivatives of a function.

#### How to construct hessian matrix in maxima?

Given the function:

f(ax2 + bxy)

in maxima:

`f(x,y):=(a*x^2 + b*x*y);`

In Calculator

if all second partial derivatives of `f` exist, then the Hessian matrix of `f` is the matrix:

Hf(x)i,j =

H(f) =

H(f) =

Second partial derivatives

xx =

xy =

yx=

yy =

In maxima

``` xx:diff(diff(f(x,y),x),x); xy:diff(diff(f(x,y),x),y); yx:diff(diff(f(x,y),y),x); yy:diff(diff(f(x,y),y),y); ``` In Calculator

Hessian matrix of a function `f(a*x^2 + b*x*y)` is:

In Maxima:

`hesM:matrix([xx,xy],[yx,yy]);`

In Calculator

#### Verification in maxima:

Maxima function hessian

`hessian((a*x^2 + b*x*y),[x,y]);`

In Calculator

Diference of maxima function Hessian and our example.

`hesM-hessian((a*x^2 + b*x*y),[x,y]);`

This Example in Calculator

### Articles

How to create Hessian matrix

How to create Nullspace (Kernel) matrix

Hessian

Matrix

Diff