Gradient of vector dot tensor dot vector Im new to tensor notation. How would one take the gradient of the expression below?
$$\nabla (\vec{r}\dot{}A\dot{}\vec{r})$$
$A$ is a 3 by 3 symmetric tensor independent of $\vec{r}$.
 A: I'll use the Einstein convention where repeated indices are summed, and $\partial_i = \partial / \partial r_i$. Also, note that $\partial_i r_j = {\hat{\bf e}}_i \dot{} {\hat{\bf e}}_j = \delta_{ij}$.
$$
\begin{eqnarray}
\nabla ({\bf{r}} \dot{} {\bf{A}} \dot{} {\bf{r}}) &=& {\hat{\bf e}}_i \partial_i \left(r_j {\hat{\bf e}}_j \dot{} A_{kl} {\hat{\bf e}}_k {\hat{\bf e}}_l \dot{} r_m {\hat{\bf e}}_m\right) \\
&=& {\hat{\bf e}}_i \partial_i \left(r_j A_{kl} r_m \delta_{jk} \delta_{lm} \right) \\
&=& {\hat{\bf e}}_i \partial_i \left(r_j A_{jm} r_m \right) \\
&=& {\hat{\bf e}}_i  \left( A_{jm} r_m \partial_i r_j + r_j A_{jm} \partial_i r_m\right) \\
&=& {\hat{\bf e}}_i  \left( A_{jm} r_m \delta_{ij} + r_j A_{jm} \delta_{im}\right) \\
&=& {\hat{\bf e}}_i  \left( A_{im} r_m + r_j A_{ji} \right) \\
&=& {\bf A} \dot{} {\bf r}  +  {\bf r} \dot{} {\bf A} \\
\end{eqnarray}
$$
If $\bf A$ depends on $\bf r$, there will be another term:
$$
\begin{eqnarray}
\left({\hat{\bf e}}_i \partial_i A_{jm}\right) r_j r_m &=& \left(\nabla {\bf A}\right) \dot{} {\bf r} \dot{} {\bf r} \\
\end{eqnarray}
$$
A: Below summation over repeated indices is tacitly assumed.
\begin{eqnarray*}
\frac{d}{dr_{k}}(r_{m}A_{mn}r_{n}) &=&\delta
_{km}A_{mn}r_{n}+r_{m}A_{mn}\delta _{kn} \\
&=&A_{kn}r_{n}+r_{m}A_{mk}
\end{eqnarray*}
or
\begin{equation*}
\nabla (\mathbf{r\cdot A\cdot r})=\mathbf{A\cdot r}+\mathbf{r\cdot A}
\end{equation*}
