Given: $E(\mathbf{x})=\mathbf {x^tWx}$
Where x is vector and W is matrix, can anybody explain me how can I easily derive the following equation (If it is correct. If not, what should it be?)?
$\nabla E(\mathbf{x}) = \mathbf{Wx} + \mathbf{W^tx}$
The del operator
1
$\begingroup$
derivatives
1 Answers
2
Explicitly, using indices, the expression is (where $i$ ranges as appropriate)
$\nabla(x^TAx)=\frac{\partial}{\partial x_i}\sum_{\ell, m}x_\ell A_{\ell m}x_m.$
Compute $\displaystyle\frac{\partial x_\ell x_m}{\partial x_i}=\delta_{i\ell}x_m+x_\ell\delta_{im}$ with the product rule (see Kronecker delta). Plugging in,
$\sum_{\ell,m}A_{\ell m}(\delta_{i\ell}x_m+x_\ell\delta_{im})=\left(\sum_{m}A_{im}x_m\right)+\left(\sum_{\ell}x_\ell A_{\ell i}\right)=Ax+A^Tx. $
-
1@Sunny88 Whatever you do, it will be a condensed version of this. Of course, in order to establish various short-and-sweet rules for this stuff, one would need to chug through with indices *anyway*. The question of if you can do it without indices sounds to me analogous to asking to send an email without doing anything with circuitry. You can of course do it without personally touching any circuitry, but you're *using* the circuitry anywho, and someone somewhere had to devise the circuitry in the first place... – 2012-12-05