# Find the partial derivatives of $x^TAx$ [duplicate]

$x$ is a vector and $A$ is a matrix and I'm confused as to how to find the partial derivatives of $x^TAx$ with respect to $x_1$, $x_2$, etc.

• Expand $x^T A x$ and compute the derivatives – Math Lover Sep 18 '17 at 21:18
• That question does not explain the process as to how a derivative is determined – Kevin Sai Sep 18 '17 at 21:32

$$\frac{\partial}{\partial x} y^TAx = \frac{\partial y}{\partial x}[Ax]^T+y^TA$$ The transpose was to make the vector a row vector. Nothing deep there!
Now, if $y=x$ then $$\frac{d}{dx} x^TAx = x^TA^T+x^TA = x^T(A+A^T) \ .$$
• So, if $b=(b_1,...,b_n)$ is a constant row vector, (here $y^TA$ plays that role for instance) then $bx$ is just a linear combination $\Sigma b_i x_i$, thus this real-valued function's gradient is simply $b$ itself. – Behnam Esmayli Sep 18 '17 at 22:06