# Derivative for Matrix function

I have a matrix kernel function which I am trying to find the derivative to. Function is K = c * exp[-1/2 * (P(X1 - X2))' * P(X1 -X2)] where uppercase are matrices and lower case are scalars (and ' denotes transpose). I'm trying to find dK/dP. I'm pretty rusty on matrix calculus, can anyone give me a hand here?

Thanks

-

1
Your notation is not very clear. Is $P$ a matrix? then did you mean something like $K(P) = c \exp[-\frac12 \| P(X_1 - X_2) \|^2]$? In that case you should probably write (P(X1-X2))', the transpose should be around everything and maybe a trace before it? Is P symmetric or not? – passerby51 Jun 13 '12 at 17:43
I was assuming this is a matrix valued function. If that's true I'd undelete my (by now corrected) answer. If @passerby51 assumption is correct, the derivative is just $$D_V K = -1/2K \langle V(X_1-X_2), P(X_1-X_2)\rangle$$ with $\langle.,.\rangle$ the scalar product on the vector space of matrices. – user20266 Jun 13 '12 at 17:50
Sorry yeah the transpose is around the whole thing. P is not symmetric. – tomas Jun 13 '12 at 17:50
Yeah it is a matrix valued function. I didn't quite get a chance to see your deleted answer Thomas. What was it? Thanks for the response guys. – tomas Jun 13 '12 at 17:53
undeleted my reply. – user20266 Jun 13 '12 at 17:53
show 3 more comments

## 1 Answer

Let $$Z(P)=(P(X_1-X_2))^TP(X_1-X_2)$$ If $K$ is viewed as depending only on $P$ and if you differentiate in direction $V$ you get $$D_V K = K*\frac{-1}{2} \left\{\frac{I-e^{-ad_{Z(P)}}}{ad_{Z(p)}} \left[ (V(X_1-X_2))^TP(X_1-X_2) + P(X_1-X_2)^TV(X_1-X_2) \right] \right\}$$

The term on the right hand side in curly parenthesis needs explanation. It is the matrix valued function $\frac{I-e^{-ad_{Z(P)}}}{ad_{Z(P))}}$ applied to the term in square brackets. This in turn means

$$\frac{I-e^{-ad_{Z}}}{ad_{Z}}[Y] = Y-\frac{[Z,Y]}{2!} + \frac{[Z,[Z,Y]]}{3!} - \ldots$$

See, e.g., Chapter 3.3 in Brian C. Halls Book 'Lie Groups, Lie Algebras and Representations for a derivation of the derivative of the exponential.

(Sorry for posting a too simple and wrong answer first, which is true only if $Z$ and $D_VZ$ commute). (I don't like the $\frac{d}{dP}$ notation).

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 10, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9402824640274048, "perplexity_flag": "middle"}