Determine the gradient of $f:\mathbb{R}^4 \rightarrow \mathbb{R}$ given by $f(x)=x^tAx$
($x^t$ denotes transpose and $A$ is $4\times 4$ matrix)
So let $$A=\begin{bmatrix} a_{11} & a_{12} & a_{13} & a_{14}\\ a_{21} & a_{22} & a_{23} & a_{24} \\ a_{31} & a_{32} & a_{33} & a_{34}\\ a_{41} & a_{42} & a_{43} & a_{44}\ \end{bmatrix} $$ and $x^t=(x_1,x_2,x_3,x_4)$. I explicitly computed out the value of $f$ and then took the gradient I came up with the answer $ \nabla f(x)=Ax+A^tx $. Can anyone tell me if this is correct?