I'm quite out of my element trying to do some matrix calculus.

I would like to know what the derivative of $z^{T}y$ w.r.t $z$ is, where z, y are n length vectors.

Can anyone suggest good resources as well?

Thank you!

  • 1
    $\begingroup$ The derivative with respect to $z$ implies calculating the derivative in each component of $z$. for example, the derivative in component $z_1$ is $y_1$. Can you finish it from here? $\endgroup$ – Alex R. Feb 5 '17 at 0:11
  • $\begingroup$ So since $z^{T}y$ is a n by n matrix do I calculate the derivative of each element w.r.t each element in $z$? $\endgroup$ – Daniel Cole Feb 5 '17 at 1:23
  • $\begingroup$ $z^Ty$ is a scalar. $z$ is a vector (well, also a $n\times 1$ matrix). $\endgroup$ – Alex R. Feb 5 '17 at 1:24
  • $\begingroup$ I recently posted a thorough discussion of such derivatives at stats.stackexchange.com/a/257616/919. Because the the map $z\to z^\prime y$ is linear, it is its own derivative: it linearly approximates itself. Our site has several threads on resources about matrix calculations: see stats.stackexchange.com/search?q=matrix+cookbook. $\endgroup$ – whuber Feb 5 '17 at 17:18