How can I get the hessian matrix of a set of several functions?

37 views (last 30 days)
I have matrix containing several functions, let say:
g = [F1^2 - FD1 - FG2;
F2^2 - F3^2 - F1^2;
F3^2 - FD2 - FG1];
and the objective variable are F = [ F1, F2, F3];
then if i compute the partial derivative of g w.r.t F1, it is going to be a 3x1 column vector:
dg/dF1 = [2F1;
-2F1;
0];
If I derive it again w.r.t F1, it is going to be:
d^2g/dF1^2 = [2;
-2;
0];
Then, my question is how to put it back to the full matrice of Hessian if it only provides a single place for d^2g/dF1^2 ? Do I need to find the determinant of d^2g/dF1^2 or I just simply sum each of the element of d^2g/dF1^2 ? Thank you.
  2 Comments
Ahmad
Ahmad on 8 Dec 2021
Thanks for your response.
I still got stuck there, whether if g is a vector-valued function, the element of hessian (1,1) will be a column vector or I can replace it with the sum of each element in column vector or calculate the determinant.

Sign in to comment.

Answers (1)

Abolfazl Chaman Motlagh
Abolfazl Chaman Motlagh on 8 Dec 2021
The Hessian is officially defined for scalar value functions. depend on what application you want to use hessian, you may define it differently in Multivariable calculus.
for standard usage of Hessian in vector value function, you can create an array of hessian.
{The General Second Derivative of Multivariable vector-valued function is a function which takes an input and return a linear Transform which yield to another linear transformation at any points.}
for example see [Calculus on Manifold , Michael Spivak]
  2 Comments
Abolfazl Chaman Motlagh
Abolfazl Chaman Motlagh on 9 Dec 2021
the determinant is defined on squared matrix. if you mean you use hessian for every element and create a vector, it is not exactly as defined as usual diffinition of hessian.
so you can write a third-order Tensor H :
or
so it's not exactly a determinant of .
but all difinition and ... depends on applications you need. you should think why you need Hessian, or more generally second derivative of F. so you can understand a little deeper what exactly you should use.

Sign in to comment.

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!