# need help with differentiation

This topic is 4268 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

is it possible to compute the derivative of y^{T}(K+C)^{-1}y with respect to either K or C? Can the answer even be computed simply? y is a vector and K and C are square matrices. thanks Shaobo

##### Share on other sites
If it can be computed simply something like a TI-92 will spit out something or choke.
At least that's what I used to use when I had a question like yours or even better use mathematica or some other symbolic differentation software.

##### Share on other sites
Quote:
 Original post by daviangelIf it can be computed simply something like a TI-92 will spit out something or choke.At least that's what I used to use when I had a question like yours or even better use mathematica or some other symbolic differentation software.

What is a TI-92?

I don't have access to Mathematica, is it more advanced than matlab's symbolic toolbox? That does not appear to have direct support for linear algebra, making the differentiation somewhat difficult.

Any suggestions for good symbolic differentiation softwares that can handle linear algebra?

##### Share on other sites
A TI-92 is a calculator made by Texas Instruments (TI). I have a TI-83 Plus, but I doubt it could compute that, I don't know how to differentiate a vector or take a vector to a power of a matrix or whatever that equation says. Anyways, a TI-92 is a very good graphing calclulator that is really great for derivitives and intergals and what not.

##### Share on other sites
This appears quite off topic to me. It looks like an academic problem.

Forum FAQ

##### Share on other sites
Partial differentiation with respect to a component I can understand, but with respect to a whole matrix, how is that defined? Is it defined?

##### Share on other sites
Quote:
 Original post by DaBookshahPartial differentiation with respect to a component I can understand, but with respect to a whole matrix, how is that defined? Is it defined?

Maybe if we had more info on how this original problem relates to game programming we would have a better idea?

##### Share on other sites
Quote:
Original post by daviangel
Quote:
 Original post by DaBookshahPartial differentiation with respect to a component I can understand, but with respect to a whole matrix, how is that defined? Is it defined?

Maybe if we had more info on how this original problem relates to game programming we would have a better idea?

well, it may be slightly off topic but I am trying to compute is fairly general. I am basically trying compute the derivative of the Mahalanobis distance http://en.wikipedia.org/wiki/Mahalanobis_distance. Since the result is a scalar, derivative with respect to the matrix K should be another matrix.

I use it as part of an algorithm to cluster some animation data.

##### Share on other sites
Computing the derivative of yTC-1y:

(C+E)-1=(C(I+C-1E))-1=(I+C-1E)-1C-1=(I-C-1E+C-1EC-1E-...)C-1=C-1-C-1EC-1+O(||E||2),

so

yT(C+E)-1y=yTC-1y-yTC-1EC-1y+O(||E||2)

and there you have your linear functional (-(yTC-1)•(C-1y)). If you want it in a standard form tr •X, take X=-(C-1y)(yTC-1)=-||y||2C-2, but for raw calculations the form above is just as good.

disclaimer: I assume no responsibility for mangled signs and inappropriate transposes.

##### Share on other sites
thanks very much, it looks promising, from what little I know of matrix inversion identities. I was trying to work it out from the matrix inversion lemma but I wasn't quite clever enough.

Anyway, I'll let you know how I get on with it.

Quote:
 Original post by DarkstrikeComputing the derivative of yTC-1y:(C+E)-1=(C(I+C-1E))-1=(I+C-1E)-1C-1=(I-C-1E+C-1EC-1E-...)C-1=C-1-C-1EC-1+O(||E||2),

Actually, if you can give some sort of short explanation for what is happening here, that would be great. It looks like some sort of taylor expansion is going on. And what does this O(||E||2) mean?

thanks

[Edited by - shaobohou on November 11, 2006 9:28:43 AM]

##### Share on other sites

This topic is 4268 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

This topic is now closed to further replies.

1. 1
2. 2
3. 3
Rutin
21
4. 4
5. 5
gaxio
10

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631778
• Total Posts
3002310
×