Which function on $\mathbf{X}$ has gradient $\mathbf{A} \mathbf{A}^\top \mathbf{X}(\mathbf{X}^\top \mathbf{X})^{-1} $?

301 Views Asked by At

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}$.

1

There are 1 best solutions below

2
On BEST ANSWER

In general, there is no solution. That follows is a counter-example for the existence of $g$ s.t. $\nabla(g)=2BX(X^TX)^{-1}$ for every $X$ s.t. $rank(X)=r$ (where $B\in M_n$).

Let $n=2,r=1, B=\begin{pmatrix}a&b\\c&d\end{pmatrix},X=[x,y]^T\not= [0,0]^T$.

$\dfrac{\partial g}{\partial x}=\dfrac{2}{x^2+y^2}(ax+by),\dfrac{\partial g}{\partial y}=\dfrac{2}{x^2+y^2}(cx+dy)$. Thus

$\dfrac{\partial^2 g}{\partial x \partial y}=\dfrac{2}{(x^2+y^2)^2}(b(x^2-y^2)-2axy),\dfrac{\partial^2 g}{\partial y \partial x}=\dfrac{2}{(x^2+y^2)^2}(c(y^2-x^2)-2dxy)$.

Thus $g$ exists iff $a=d,b=-c$, that is $B=\begin{pmatrix}a&b\\-b&a\end{pmatrix}$; in particular, $B$ has never the form $AA^T$ except when $B=0$.

EDIT. The general solution of the above equation -with the $(r,\theta)$ polar coordinates- is: $g=2a\log(r)-2b\theta+$ constant.