TITLE: Derivative of $\sqrt{AA^T}$ with respect to $A$
QUESTION [8 upvotes]: How to find the derivative of the function $f: M_n(\mathbb{R})\to M_n(\mathbb{R}), A\mapsto \sqrt{AA^T},$ where $A^T$ is the transpose of the matrix $A$?

\begin{align}
    Df_V(A) & = \lim_{h\to 0}\dfrac{f(A+hV)-f(A)}{h}\\
            & = \lim_{h\to 0}\dfrac{\sqrt{(A+hV)(A+hV)^T}-\sqrt{AA^T}}{h}\\
            & = \lim_{h\to 0} \dfrac{\sqrt{AA^T+hAV^T+hVA^T+h^2VV^T}-\sqrt{AA^T}}{h}
  \end{align}

Now, what should I do?

REPLY [2 votes]: For starters,$$\frac{\partial}{\partial A_{ij}}(AA^T)_{kl}=\frac{\partial}{\partial A_{ij}}(A_{km}A_{lm})=\delta_{ik}\delta_{jm}A_{lm}+A_{km}\delta_{il}\delta_{jm}=\delta_{ik}A_{lj}+\delta_{il}A_{kj}.$$Next, let $X:=\sqrt{AA^T}$ so $(AA^T)_{kl}=X_{kp}X_{pl}$, so$$\frac{\partial X_{kp}}{\partial A_{ij}}X_{pl}+\frac{\partial X_{pl}}{\partial A_{ij}}X_{kp}=\delta_{ik}A_{lj}+\delta_{il}A_{kj}.$$To evaluate the derivative $D_{ijrs}:=\frac{\partial X_{rs}}{\partial A_{ij}}$, note that$$D_{ijrs}(\delta_{kr}X_{sl}+\delta_{sl}X_{kr})=\delta_{ik}A_{lj}+\delta_{il}A_{kj}.$$So the result is of the form $B^{-1}C$, but with $B,\,C$ as rank-$4$ tensors rather than matrices, and their multiplication and inversion suitably defined.