Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the next function $F(x) = x^TA(x)x$, where $x$ is a real vector with dimension $n$, and $A$ is a square real matrix $n \times n$ depending on the components of $x$.

How can I compute the partial derivative of $F(x)$ with respect to $x$?

I know when $A$ is constant that $\frac{\partial F}{\partial x} = x^T(A+A^T)$. What I do not know how to deal when $A$ depends on elements of $x$.

Thanks in advance.

share|cite|improve this question
Can you give a formal definition of "partial derivative with respect to a vector", please? – Kaster Mar 7 '13 at 10:30
$\frac{\partial F}{\partial x}$ – noether Mar 7 '13 at 10:45
that's not definition, that's notation. I meant just like for regular derivative, through the limits. – Kaster Mar 7 '13 at 10:58
Describe the properties of a derivative that you want to hold by analogy. – Loki Clock Mar 7 '13 at 11:05
I guess it's something likes a gradient. – Felix Marin Sep 11 '13 at 23:47
up vote 2 down vote accepted

What you want is the gradient $\nabla F(x)$. In order to find it write $F$ as $$F(x)=\sum_{i,k} x_i a_{ik}(x_1,\ldots, x_n)x_k$$ and obtain $${\partial F\over\partial x_j}=\sum_k a_{jk} x_k+\sum_{i,k} x_i{\partial a_{ik}\over\partial x_j}x_k+\sum_i x_i a_{ij}\ .$$ It follows that for a tangent vector $Y$ at $x$ we have $$\nabla F(x)\cdot Y=Y^\top A\> x + x^\top(\nabla A\cdot Y)\>x + x^\top A\> Y\ .$$

share|cite|improve this answer
thank you very much, this is what I was looking for – noether Mar 7 '13 at 11:28

$\nabla A.Y$ denotes a square matrix and , consequently, is a very bad notation. Indeed $.$ is not here a scalar product. Moreover $\nabla(f)$ is defined only for functions $f$ with values in $\mathbb{R}$; then $\nabla A$ is not defined. The notation $\nabla A.Y$ can be changed with the matrix $\tilde{A}(Y)$ whose $(i,k)$ entry is the scalar product $\nabla a_{i,k} .Y$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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