0
$\begingroup$

$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.

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

I just learned a new trick when your independent variable is in more than two places within your formula: introduce a new (fake) parameter which will then disappear:

$$\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) \ . $$

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ How would you go about it for partial derivatives though? $\endgroup$ – Kevin Sai Sep 18 '17 at 21:39
  • $\begingroup$ 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. $\endgroup$ – Behnam Esmayli Sep 18 '17 at 22:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.