I am new to the concept of Frechet Derivatives. I have encountered a problem where I am supposed to find the Frechet derivative of $\operatorname{trace}(XAX+AXA^T)$ where my $X,A \in \Bbb R^{n\times n}$ and $X=X^T$.
Asked
Active
Viewed 271 times
1 Answers
1
Let $f(X) = {\rm tr}(XAX+AXA^T)$. Since ${\rm tr}$ is a linear functional, the total derivative of ${\rm tr}$ is ${\rm tr}$ itself, so the product rule gives $$Df(X)(H) = {\rm tr}(HAX+XAH+AHA^T).$$
Ivo Terek
- 77,665
-
1It should be noted that, using the cyclic property of the trace, this can be rewritten as $$ Df(X)(H) = \operatorname{tr}[(AX + XA + A^TA)H], $$ which is useful if we want to write this derivative in another form – Ben Grossmann Nov 12 '20 at 17:15
-
Thanks for pointing that out! Although to be honest, I have always found the notation $\partial/\partial X$ very weird if $X$ is a matrix. – Ivo Terek Nov 12 '20 at 17:17
-
1It's weird, but it's useful for many applications (e.g. finding a "gradient" of your function for some optimization). – Ben Grossmann Nov 12 '20 at 17:19
-
Oh. When I need a gradient I always try to rearrange my result in the form $({\rm foo})^TH$, so gradient equals "foo", but it makes sense that there should be a smarter way to do this. – Ivo Terek Nov 12 '20 at 17:21
-
1Well that's certainly the way to do it that way if you're working from scratch (at least I think so). However, the "Matrix Cookbook" type table of $\partial / \partial X$ derivatives essentially gives you the gradient for common (scalar valued) functions on matrices. – Ben Grossmann Nov 12 '20 at 17:23