The Gradient and the Hessian of a Function of Two Vectors

In summary, the conversation discusses how to find the gradient and Hessian of a function of two n-dimensional vectors. The approach suggested is to treat the function as a function of 2n variables and take the vector of first derivatives and the matrix of second derivatives. This results in a 1-by-2n gradient vector and a 2n-by-2n Hessian matrix, with each block being an n-by-n matrix of vector second derivatives.
  • #1
EngWiPy
1,368
61
Hi,

Suppose we have a function of two n-dimensional vectors [tex]f(\mathbf{x},\mathbf{y})[/tex]. How can we find the gradient and Hessian of this function?

Regards
 
Mathematics news on Phys.org
  • #2
i would just treat it as a function of 2n variables and take the vector of 1st, then the matrix of 2nd derivatives.
 
  • #3
mathwonk said:
i would just treat it as a function of 2n variables and take the vector of 1st, then the matrix of 2nd derivatives.

So, the gradient will be 1-by-2n vector, and the Hessian will be 2n-by-2n matrix?
 
  • #4
yep. basically the gradient is a linear map approximating the original map. so you could also view it as a linear map from R^n x R^n -->R, and the Hessian I suppose as a bilinear such map.

I.e. if R^n = V, the 1st derivative is a linear map VxV-->R, and the second derivative is a symmetric bilinear map (VxV)x(VxV)-->R.

So if you really want to break up your source space into a pair of n vectors, then
you get two "partial" gradients, each a 1byn matrix, and you get a 2 by 2 Hessian matrix, where each block is an nbyn matrix, i.e. 4 nbyn matrices of vector second derivatives
 
  • #5
mathwonk said:
yep. basically the gradient is a linear map approximating the original map. so you could also view it as a linear map from R^n x R^n -->R, and the Hessian I suppose as a bilinear such map.

I.e. if R^n = V, the 1st derivative is a linear map VxV-->R, and the second derivative is a symmetric bilinear map (VxV)x(VxV)-->R.

So if you really want to break up your source space into a pair of n vectors, then
you get two "partial" gradients, each a 1byn matrix, and you get a 2 by 2 Hessian matrix, where each block is an nbyn matrix, i.e. 4 nbyn matrices of vector second derivatives

Ok, I see. Thank you.

Regards
 

Related to The Gradient and the Hessian of a Function of Two Vectors

1. What is the gradient of a function of two vectors?

The gradient of a function of two vectors is a vector that represents the rate of change or slope of the function at a particular point. It is a vector formed by taking the partial derivatives of the function with respect to each of the input vectors.

2. How is the gradient calculated?

The gradient is calculated by taking the partial derivative of the function with respect to each input vector and combining them into a vector. This can be represented mathematically as ∇f(x,y) = [∂f/∂x, ∂f/∂y].

3. What is the Hessian of a function of two vectors?

The Hessian of a function of two vectors is a matrix that contains second-order partial derivatives of the function. It provides information about the curvature of the function at a specific point and is used to determine if the point is a local minimum, maximum, or saddle point.

4. How is the Hessian calculated?

The Hessian is calculated by taking the second-order partial derivatives of the function with respect to each input vector and arranging them into a matrix. This can be represented mathematically as H = [∂²f/∂x², ∂²f/∂x∂y; ∂²f/∂y∂x, ∂²f/∂y²].

5. Why are the gradient and Hessian important in optimization?

The gradient and Hessian are important in optimization because they provide information about the direction and rate of change of a function. This information can be used to find the minimum or maximum of a function, which is often the goal in optimization problems.

Similar threads

  • General Math
Replies
5
Views
879
Replies
5
Views
469
  • Topology and Analysis
Replies
24
Views
2K
Replies
1
Views
2K
Replies
1
Views
497
Replies
17
Views
2K
  • Math POTW for University Students
Replies
1
Views
2K
  • General Math
Replies
1
Views
635
  • Calculus and Beyond Homework Help
Replies
4
Views
877
Replies
2
Views
1K
Back
Top