# Partial derivative with respect to a vector x for $F(x) = x^TA(x)x$

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$.

-
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

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\ .$$
$\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$.