I want to find the first and second derivative of $f(x)=\langle Ax,Bx\rangle$, where $\langle\,,\rangle$ is the inner product, A and B are $n\times n$ matrices and $x\in \mathbb{R}^n$.
Here's my thoughts:
Since A and B are linear transformations, their derivatives are themselves. So maybe we can treat f as a function from $\mathbb{R}^n\times \mathbb{R}^n$ to $\mathbb{R}$?


As the inner product is defined by $\langle u, v\rangle = u^Tv$ we can reformulate your function to $f(x) = (Ax)^TBx = x^TA^TBx$

As seen here: Differentiate $f(x)=x^TAx$ you get the derivative $$f'(x) = 2x^TA^TB$$ Calculating the next derivative should be much easier now.

  • $\begingroup$ $A^TB$ is not necessarily symmetric. $\endgroup$ – user10354138 May 10 at 11:51
  • $\begingroup$ Oh you're right, I oversaw that. I didn't find a formula for the derivative of $x^TAx$ to the fast, but I'm sure there is one $\endgroup$ – LegNaiB May 10 at 12:03

Your Answer

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.