2
$\begingroup$

I want to take the derivate of a rather complicated matrix expression. Is it possible to do this in MATLAB or Wolfram Alpha? Here is what I am trying to calculate:

\begin{equation} \frac{\partial}{ \partial {\bf X}} {\bf a}^T({\bf I}+\alpha {\bf X}^T{\bf A}^T{\bf A}{\bf X})^{-1}{\bf a} \end{equation}

Or if you know a cookbook where I can find this derivative, it would be highly appreciated! Thank you.

$\endgroup$
2
  • 4
    $\begingroup$ Can you elaborate on what kind of an object you want the derivative to be? If you differentiate a scalar valued function $f(X)$ with respect to a matrix $X$, the derivative $Df(X)$ is the matrix satisfying $f(X+Y)=f(X)+\text{tr}(Y^TDf(X))+o(1)$ as $Y\to0$. Is this the kind of derivative you have in mind? If yes, then $Df(X)_{ij}=\partial f(X)/\partial x_{ij}$, and this matrix can be formed with Mathematica at least. $\endgroup$ Commented Sep 1, 2014 at 9:52
  • 3
    $\begingroup$ en.wikipedia.org/wiki/Matrix_calculus#Other_matrix_derivatives $\endgroup$ Commented Sep 1, 2014 at 10:21

2 Answers 2

5
$\begingroup$

The derivative with respect to $X$ at $X$ in the direction $Y$ is $$-{\bf a}^T({\bf I}+\alpha {\bf X}^T{\bf A}^T{\bf A}{\bf X})^{-1} \alpha({\bf Y}^T{\bf A}^T{\bf A}{\bf X} + {\bf X}^T{\bf A}^T{\bf A}{\bf Y}) ({\bf I}+\alpha {\bf X}^T{\bf A}^T{\bf A}{\bf X})^{-1}{\bf a}. $$ Namely, $D_{X,Y}(X^{-1}) = -X^{-1}YX^{-1}$, and the inner expession is bilinear.

$\endgroup$
5
$\begingroup$

I presume by "taking the derivative" you mean that you want to know how this expression $\Omega(X)=a^TM(X)a$, with $M(X)=(I+\alpha X^TA^TAX)^{-1}$, changes when you change $X$ by a small amount $\delta X$. So just make a series expansion,

$$\Omega(X+\delta X)=a^TM(X)\sum_{n=0}^\infty(-1)^n\{(\alpha \delta X^TA^TAX+\alpha X^TA^TA\delta X)M(X)\}^na$$

To first order you find

$$\Omega(X+\delta X)=a^TM(X)a-\alpha a^TM(X)(\delta X^TA^TAX+X^TA^TA\delta X)M(X)a$$

If you wish, you can restrict yourselves to scalar perturbations, $\delta X=\epsilon I$, then

$$\frac{d\Omega}{d\epsilon}=-\alpha a^TM(X)(A^TAX+X^TA^TA)M(X)a$$

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .