Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

What is the derivative of $\sum_{ij}e^{-d_{ij}^2(X)}=\sum_{ij}e^{-\operatorname{tr}(X^TC_{ij}X)}$, w.r.t $X$ where $C_{ij}$ is a constant matrix and $d_{ij}^2(X)$ denotes the squared Euclidean distance between the rows $i,j$ of $X$. All the entries here are real

share|improve this question
    
You need to clarify your notation a bit. Is $C_{ij}$ a constant matrix for each pair $ij$, i.e. a family of matrices labeled by two indices, $i$ and $j$, or is $C$ a matrix with components $C_{ij}$? If the latter, then there is no additional summation over $i$ and $j$ after evaluating $e^{-{\rm tr}(X^T C X)}$. –  josh Jun 5 '13 at 3:45
    
@josh it is a family of matrices labeled by $i,j$. In fact it is the matrix $C_{ij}$ formed by $(e_i-e_j)(e_i-e_j)^T$ where the $e's$ are the basis vectors. –  user75402 Jun 5 '13 at 3:47

2 Answers 2

Okay. It doesn't change much anyhow. Use linearity of the trace. Writing $f(X) = {\rm tr}(X^T C_{ij} X)$ and varying $X$ by $\delta X$, we get $f(X+\delta X) - f(X) = {\rm tr}(\delta X^T C_{ij} X) + {\rm tr}(X^T C_{ij} \delta X)$. Now use what you know about how matrix traces transform under transposition of the argument and also what you know about the form of $C_{ij}$ to simplify that expression and then give the matrix derivative of $g(X)$.

What about the derivative of $g(X) = \exp f(X)$? Since $f$ maps vectors to real numbers, you can use the familiar composition rule on the exponentiation.

You may find that your expression of $C_{ij}$ pulls out components of $X$. What does the final summation over $i$ and $j$ do?

share|improve this answer
    
So is it, $-2\sum_{ij}(e^{-tr X^TC_{ij}X})C_{ij}X$ ? If not, please correct it. –  user75402 Jun 5 '13 at 4:50
    
Waiting for a definitive answer.. –  user75402 Jun 8 '13 at 0:04

User, the image of the derivative is a scalar ! Assume that the matrices are real. Moreover, the $(C_{i,j})$ are symmetric matrices. Then the required derivative is $H\rightarrow -2\sum_{i,j}Trace(X^TC_{i,j}H)exp(-Trace(X^TC_{i,j}X))$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.