0
$\begingroup$

I need some help to compute the Jacobian and Hessian of a function $f : \mathbb{R}^n \rightarrow \mathbb{R}^n$ which takes as input a vector $x$ of length $n > 0$. The other symbols can be assumed to be constant.

\begin{equation} f(x) = \sum_{i,j=1}^{n}\rho_{ij}\sigma_i\sigma_j x_i x_j \end{equation}

For the Jacobian do I just make $x_i=0$ for $\frac{\partial}{\partial x_i}f$? How does the Hessian differ once the first derivative of $x_i$ is already $0$?

$\endgroup$
1
  • $\begingroup$ 1. What are your $\sigma_k$ and $\rho_{ij}$? 2. Isn‘t your $f$ a real valued function instead of one with range in $\mathbb{R}^n$? $\endgroup$ Apr 8, 2018 at 23:11

2 Answers 2

1
$\begingroup$

Recall the definitions of the Hadamard $(\circ)$ and Frobenius $(:)$ products $$\eqalign{ B &= C\circ A &\implies B_{ik} = C_{ik}A_{ik} \cr \beta &= C:A &\implies \beta = \sum_{i}\sum_{k} C_{ik}A_{ik} }$$ Using these, you can express the function in pure matrix notation (after replacing the Greek symbols with easier to type Latin ones) $$\eqalign{ f &= P\circ ss^T:xx^T\cr }$$ Find the differential and gradient $$\eqalign{ df &= P\circ ss^T:(dx\,x^T+x\,dx^T) \cr &= (P\circ ss^T+P^T\circ ss^T):dx\,x^T \cr &= (P\circ ss^T+P^T\circ ss^T)x:dx \cr g=\frac{\partial f}{\partial x} &= (P\circ ss^T+P^T\circ ss^T)x \cr }$$ To calculate the Hessian, start with the differential of the gradient $$\eqalign{ dg &= (P\circ ss^T+P^T\circ ss^T)\,dx \cr H=\frac{\partial g}{\partial x} &= (P\circ ss^T+P^T\circ ss^T) \cr &= (P+P^T)\circ ss^T \cr }$$ And you're done.

$\endgroup$
1
  • $\begingroup$ This is exceptionally helpful. Do you have a good reference for this material? I'm struggling to find accessible tutorial sources with examples for dealing with differentials. $\endgroup$ Jul 24, 2018 at 8:26
0
$\begingroup$

Let $A=(a_{ij})$ be the matrix with entries $a_{ij}=\rho_{ij}\sigma_i\sigma_j.$ Then \begin{equation}f(x)=\langle Ax,x\rangle, \end{equation}so \begin{equation}f(x+h)=\langle A(x+h),x+h\rangle=\langle Ax,x\rangle +\langle A ,h\rangle+ \langle Ah,x\rangle+\langle Ah,h\rangle=f(x)+\langle (A+A^t)x,h\rangle+\langle Ah,h\rangle \end{equation} and therefore the Hessian matrix is just $A$ itself.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .