How to show the following gradient equation is true?

54 Views Asked by At

Assuming that $\textbf{x}$ is a column vector($1\times n$) and $\textbf{B}$ is square matrix ($n\times n$) how can we show that the following property is true $$\frac{\partial \textbf{x}^T\textbf{Bx}}{\partial \textbf{x}}=(\textbf{B}+\textbf{B}^T)\textbf{x}$$

I tried to apply the product rule for differentiation (I am not sure whether it is applicable here or not, Please confirm) to get the following form $$\frac{\partial \textbf{x}^T\textbf{Bx}}{\partial \textbf{x}}=\textbf{Bx}+\textbf{x}^T\textbf{B}$$ which is not equal to the right side of my first equation. Any help in this regard will be much appreciated. Thanks in advance.

1

There are 1 best solutions below

4
On BEST ANSWER

By components

\begin{eqnarray} \frac{\partial}{\partial x_i}(x_jB_{jk}x_k) &=& \frac{\partial x_j}{ \partial x_i}B_{jk}x_k + x_j B_{jk}\frac{\partial x_k}{ \partial x_i}\\ &=& \delta_{ij}B_{jk}x_k + x_j B_{jk}\delta_{ki} \\ &=& B_{ik} x_k + x_j B_{ji} = ({\bf B} {\bf x})_i + ({\bf x^T}{\bf B})_i \end{eqnarray}