1
$\begingroup$

Considering a distance d(x,y) = $d_A(x,y)$ defined in form: $\|x-y\|_A = \sqrt{(x-y)^TA(x-y)}$ where A is matrix (positive semi-definite).

Let $f=\|x-y\|_A$, so i want to calculate $\dfrac{\partial f}{\partial A}$

Idea is to minimize function by gradient method so partial derivation is needed. What would be the answer? Thanks.

  • 0
    I presume a symmetric positive definite matrix.2012-04-20

1 Answers 1

1

We have employing the chain rule ($z=x-y$) $ \frac{\partial f}{\partial A_{kl}}= \frac{1}{2f} \frac{\partial}{\partial A_{kl}} z^T A z. $

We find the remaining derivative, by expanding $z^T A z$ in components and using $\partial_{A_{kl}} A_{mn} = \delta_{km} \delta_{ln}$: $\frac{\partial}{\partial A_{kl}} z^T A z = \frac{\partial}{\partial A_{kl}} \sum_{mn} z_m A_{mn} z_n = z_k z_l. $

Putting everything together, we have obtained $\frac{\partial f}{\partial A_{kl}}= \frac{(x_k-y_k) (x_l-y_l)}{2 f}.$

  • 0
    @mko: yes, the $f$ is in the denominator because of the $\sqrt {}$. If you take the derivate of $f^2$ then you obtain the final result without the denominator (that is $(x_k-y_k)(x_l -y_l)$).2012-04-20