Gradient of $x^{T}Ax$ [duplicate]
Try it first with a simple case, such as $\nabla x^Tx$. Well, if we have
$$ x=(x_1,\ldots,x_n), $$then
$$ x^Tx=\sum_{i=1}^n x_i^2. $$ It follows
$$\nabla x^Tx = 2(x_1,\ldots,x_n)=2x $$
Now, how would you write $x^TAx$?
Edit: If $A$ is not symmetric, you can do something similar and derive
$$\nabla x^TAx=(A+A^T)x$$
It's only true if $A$ is symmetric. And as for intuition, consider the one-dimensional case: the derivative of $ax^2$ is $2ax$. I always recommend to write out the quadratic form and calculate the derivative by hand. Once you've done that, you'll understand and you'll never forget it anymore.