Differentiation of $u^{T}Su$ I want to differentiate $u^{T}Su$ wrt $u$ where $u$ is $n$ x $1$ and $S$ is $n$ x $n$matrix . So I did the following . 
Since $u^{T}Su$ is a number , I wrote its expression ie 
$$ f = \sum_{i=1}^{n}\sum_{k=1}^{n}u_iS_{ik}u_k$$ 
Now if I find $\frac{df}{du_j} $ for any $j$ then the job is done . 
So $$\frac{df}{du_j} = \sum_{k=1}^{n}S_{jk}u_k+\sum_{i=1}^{n}u_iS_{ij}$$
$$\frac{df}{du_j} = \sum_{i=1}^{n}S_{ji}u_i+\sum_{i=1}^{n}u_iS_{ij}$$
Therefore the differentiation is $$(S+S^{T})u$$ 
Am I right ? If I am not please help me with the differentiation . Thanks a lot 

The general idea is correct. I prefer to write the derivative of this kind of map down with an application to a vector. So if $F(u) = u^TSu$ you will get 
$$dF(u)< v > = v^T Su + u^TSv$$ 
