1

Suppossing $M$ is a $n \times n$ matrix and z is a $n \times 1$ row, and knowing the following identity:

$$ \frac{\partial z^tM}{\partial z} = M $$

I want to solve the following:

$$ \frac{\partial z^tMz}{\partial z} = (M + M^t) z $$

Using the drivative of the product, I know that:

$$ \frac{\partial z^tMz}{\partial z} = \frac{\partial z^tM}{\partial z} \cdot z + z^tM\cdot \frac{\partial z}{\partial z} $$

Using the previous identity I get the following:

$$ M z + z^tM \cdot 1 $$

But I think that's wrong somewhere, because the dimensions of that aren't the same than the expected result.

How can I go on?

1 Answers1

0

I find it easier to expand quadratic terms directly, and calculate the derivative applied to some perturbation first, then figure out if there is a nice matrix representation.

Let $f(z) = z^T M z$.

Then $f(z+\delta) = (z+\delta)^T M (z+ \delta) = z^T M z + z^T (M+M^T) \delta + \delta^T M \delta$.

It follows that $\frac{\partial f(z)} {\partial z}(\delta) = z^T (M+M^T) \delta$, hence $\frac{\partial f(z)} {\partial z} = z^T (M+M^T)$.

copper.hat
  • 172,524
  • Honestly, my low math level does not let me follow this answer :/ – José Tomás Tocino Jun 29 '13 at 19:55
  • Let me know what you are having trouble with and I will try to help. If a function can be written as $f(z+\delta) = f(z) + A \delta + o (|\delta|^2)$, then the function is differentiable at $z$ and has derivative $\frac{\partial f(z)}{\partial z} (\delta) = A \delta$ (can also be written as $\frac{\partial f(z)}{\partial z} = A $, but I prefer to keep the perturbation $\delta$ in there as it helps when dealing with other derivatives. In the above $A = z^T(M+M^T)$). – copper.hat Jun 29 '13 at 20:02