0
$\begingroup$

Consider $z\in \mathbb{R}$, $x(z):\mathbb{R} \to \mathbb{R}^{n\times 1}$ and $Q(z):\mathbb{R} \to \mathbb{R}^{n\times n}$ such that $Q(z)=Q^T(z)>0$. If we define the function $f(z):\mathbb{R} \to \mathbb{R}$ as $f(z)=\frac{1}{2}x^T(z)Q(z)x(z)$, thus, How obtain $\dfrac{\partial f(z)}{\partial z}$?

I know that $\dfrac{\partial f(z)}{\partial z}$ is one-dimensional, and if I derive in the traditional way, I obtain:

\begin{align} \dfrac{\partial f(z)}{\partial z} &= \left(\dfrac{\partial f(z)}{\partial x}\right)^T\dfrac{\partial x(z)}{\partial z}+ \left(\dfrac{\partial f(z)}{\partial Q}\right)^T\dfrac{\partial Q(z)}{\partial z}\\ &= \left(Q(z)x(z)\right)^T\dfrac{\partial x(z)}{\partial z}+ \left(\frac{1}{2}x(z)x^T(z)\right)^T\dfrac{\partial Q(z)}{\partial z} \end{align}

Of course I know that this solution is wrong, because the second term of right half site of previous equation is of dimension $\mathbb{R}^{n\times n}$

How could I get the $\dfrac{\partial f(z)}{\partial z}$ properly?

New contributor
Luis Mora is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
1
$\begingroup$

I'm going to use Einstein's notation. We have that $$f=\frac{1}{2} x_iQ_{ij}x_j$$ So we have that $$f'=\frac{1}{2}\left({x'}_{i}Q_{ij}x_j+x_i{Q'}_{ij}x_j+x_iQ_{ij}{x'}_j\right)$$ Using the symmetry of $Q$, i.e. $Q_{ij}=Q_{ji}$, we get that $$f'=x_i Q_{ij} {x'}_j+\frac{1}{2} x_i {Q'}_{ij}x_j$$ i.e. $$f'=x^{t}Qx'+\frac{1}{2}x^{t}Q'x$$ Where $x'$ and $Q'$ are component-wise derivatives.

$\endgroup$
  • $\begingroup$ +1 Thank you. Good. $\endgroup$ – Luis Mora Aug 15 at 7:58

Your Answer

Luis Mora is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.