Let $U = \frac{1}{2}u^TKu$,
then $\frac{\partial U}{\partial u} = Ku$.
How could I get this answer? Is there any book explains how to calculate derivative of matrices?
Let $U = \frac{1}{2}u^TKu$,
then $\frac{\partial U}{\partial u} = Ku$.
How could I get this answer? Is there any book explains how to calculate derivative of matrices?
By definition $$ U=u^TKu=\frac{1}{2}\sum_{j=1}^n\sum_{i=1}^n K_{ij}u_iu_j. $$ Differentiating with respect to the $l$-th element of $u$ we have $$ 2\frac{\partial U}{\partial u_l}=\sum_{j=1}^n K_{lj}u_j+\sum_{i=1}^n K_{il}u_i $$ for all $l=1,\,\ldots,n$ and consequently $$ \frac{\partial U}{\partial u}=\frac{1}{2}(Ku+K^Tu)=\frac{1}{2}(K+K^T)u $$ If $K$ is symmetric, $K^T=K$ and $$ \frac{\partial U}{\partial u}=Ku $$
There are many books, for example
Golub, Gene H., and Charles F. Van Loan, Matrix Computations