Chain rule for matrix-valued functions.

264 Views Asked by At

Suppose we have a function $x\mapsto A(x)$ where $A(x)$ is an $n\times n$ matrix with differentiable matrix elements $[A(x)]_{ij}=a_{ij}(x)$. Then it is natural to take \begin{align*} \frac{dA}{dx} := \begin{bmatrix} \frac{d a_{11}}{dx} & \cdots & \frac{d a_{1n}}{dx} \\ \vdots & \ddots & \vdots \\ \frac{da_{n1}}{dx} & \cdots & \frac{da_{nn}}{dx} \end{bmatrix} \end{align*}

My question is as follows; suppose we have some function $f$ that is sufficiently "nice" (differentiable, etc.). Then, is there a "chain-rule like" expression for \begin{align*} \frac{d}{dx} f(A(x)). \end{align*} For example, is there a general criterion for when we can write \begin{align*} \frac{d}{dx} f(A(x)) = \frac{d f(A)}{dA}\frac{dA}{dx} ? \end{align*}

This question came to me in a more concrete example. Suppose $A(x)$ is differential, positive definite matrix for all $x\in\mathbb{R}$. Is there a known formula for $dS/dx$ where $S(x) := A^{1/2}(x)$ is the unique positive definite square root of $A(x)$? One result that follows by differentiating the expression $S^2(x) =A(x)$ is \begin{align*} S(x)\frac{dS}{dx} + \frac{dS}{dx}S(x) = \frac{dA}{dx} \end{align*} which can be viewed as a Sylvester equation for the matrix $dS/dx$. If $S$ and $dS/dx$ commute, then this can be solved as $$\frac{dS}{dx} = \frac{1}{2}A^{-1/2}\frac{dA}{dx}$$ which is exactly what we would get if we naively applied the chain rule. Does this Sylvester equation have a closed form solution for the general case?

Thanks!