I learned from The Matrix Cookbook that the gradient of the $\log \det$ function is given by
\begin{equation} \nabla \log \text{det}(\mathbf{X}^\top \mathbf{X})=2\mathbf{X}(\mathbf{X}^\top \mathbf{X})^{-1}, \end{equation}
where $\mathbf{X}\in\mathbb{R}^{n\times r}$. I wonder which function will give the gradient
\begin{equation} 2\mathbf{A} \mathbf{A}^\top \mathbf{X}(\mathbf{X}^\top \mathbf{X})^{-1}, \end{equation}
for some matrix $\mathbf{A}\in \mathbb{R}^{n\times r}$.