# Is there a smooth map $h:\text{GL}_n(\mathbb{R}) \to \mathbb{R}$ such that $dh_X(V)=\langle (X^{-1})^{T},V\rangle$?

Question: Doest there exist a smooth map $h:\text{GL}_n(\mathbb{R}) \to \mathbb{R}$, such that $dh_X(V)=\langle (X^{-1})^{T},V\rangle$?

Suppose such an $h$ exist. Then it must hold that $d^2h=0$:

($d$ is the exterior derivative; in more elementary terms, second derivatives must commute.)

Since $$dh=\sum_{ij}(X^{-T})_{ij}dx^{ij},$$ we have $$d^2h=\sum_{ijks} \frac{\partial\big((X^{-T})_{ij}\big) }{\partial x_{sk}} dx^{sk} \wedge dx^{ij}=\sum_{ijks} \frac{\partial\big((X^{-1})_{ji}\big) }{\partial x_{sk}} dx^{sk} \wedge dx^{ij}$$

which is zero if and only if

$$\frac{\partial\big((X^{-1})_{ji}\big) }{\partial x_{sk }}=\frac{\partial\big((X^{-1})_{ks}\big) }{\partial x_{ij}}. \tag{1}$$

I checked most of the cases when $n=2$ (then we have a nice formula for the matrix inverse) and the requirement $(1)$ was satisfied.

So, is there such a function $h$ for $n=2$? For general $n$?

From Jacobi's formula for the derivative of the determinant, whenever $\det X > 0$ we have
$$d (\log \det X)(V) = \frac{1}{\det X}\mathrm{tr}(\mathrm{adj}(X) V)=\mathrm{tr}(X^{-1}V)=\langle X^{-T},V\rangle;$$ so $h(X) = \log \det X$ satisfies your equation on $GL^+(n, \mathbb R).$ To extend this to the orientation-reversing component, note that when $\det X < 0,$ $$d(\log (-\det X))(V)=\langle X^{-T},V\rangle.$$ Thus we can write the global solution as $h(X) = \log\,\left|\det X\right|.$