Multi-variate cross-partial derivative of a inverse function

1.2k Views Asked by At

I have an invertible mapping $y=f(x,\theta)$ where $x,y\in\mathbb{R}^K$ with a scalar parameter $\theta\in\mathbb R$. Consider its inverse $x=g(y,\theta)$. I'm interested in the matrix $\partial^2g/\partial y'\partial\theta$. Is it possible to express it in terms of the derivatives of $f$?

For $K=1$, the answer (in the more general case of an implicit $f$) is given here but is there a generalization for $K>1$?

2

There are 2 best solutions below

2
On

By definition, we have $$f(g(y,\theta),\theta) = y,$$ for all $\theta$. Then totally differentiating both sides w.r.t. $\theta$ yields $$0 = D_\theta f(g(y,\theta),\theta) + D_x f(g(y,\theta),\theta) D_\theta g(y,\theta) $$ Or rearranging, we have $$D_\theta g(y,\theta) = - D_x f(g(y,\theta),\theta)^{-1} D_\theta f(g(y,\theta),\theta) $$ You could then differentiate this whole mess w.r.t. $y$ and use various matrix derivative formulae (see for example) to get your answer, replacing any instances of $D_y g(y,\theta)$ with the usual formulae from implicit function theorem as needed.

4
On

Take $x,y \in \mathbb{R}^K$, $\theta \in \mathbb{R}$ with $y = f(x, \theta)$ with $f: \mathbb{R}^K \times \mathbb{R} \to \mathbb{R}^K$. Assume $f$ is invertible and $x = g(y, \theta)$ be the inverse with $g: \mathbb{R}^K \times \mathbb{R} \to \mathbb{R}^K$.

Let $v = (x', \theta)'$ be a column vector in $\mathbb{R}^{K+1}$. For notation, ake $v_x$ to be the first $K$ elements and $v_\theta$ to be the last element of $v$.

Define $\tilde{f}(v) = \begin{pmatrix}f(v_x, v_{\theta}) \\ v_{\theta} \end{pmatrix}$, so that $\tilde{f}: \mathbb{R}^{K+1} \to \mathbb{R}^{K+1}$. Note that since $f$ is invertible, so is $\tilde{f}$. The inverse is given by $$ \tilde{f}^{-1}(w) = \begin{pmatrix} g(w_{x}, w_{\theta}) \\ w_{\theta} \end{pmatrix}. $$

With some abuse of notation, you can see this by $f(f^{-1}(w)) = f(g(w), w_{\theta}) = (f(g(w))', w_\theta)' = w$

The jacobian of $\tilde{f}$ at a point $v$ can be written as: $$ \mathrm{J} \tilde{f} = \begin{bmatrix} \left[ \frac{\partial f_i}{\partial x_j} \right] & \left[ \frac{\partial f_i}{\partial \theta} \right] \\ 0 & 1 \end{bmatrix}, $$

Assuming the jacobian of $f$ is invertible, then so is the jacobian of $\tilde{f}$ and so by the inverse function theorem, we have: \begin{align*} \mathrm{J} \tilde{f}^{-1} &= \begin{bmatrix} \left[ \frac{\partial f_i}{\partial x_j} \right] & \left[ \frac{\partial f_i}{\partial \theta} \right] \\ 0 & 1 \end{bmatrix}^{-1} \\ &= \begin{bmatrix} \left[ \frac{\partial f_i}{\partial x_j} \right]^{-1} & - \left[ \frac{\partial f_i}{\partial x_j} \right]^{-1} \left[ \frac{\partial f_i}{\partial \theta} \right] \\ 0 & 1 \end{bmatrix}, \end{align*} where the last equality comes from the inverse of a block upper-diagonal matrix.

The relevant matrix is $\left[ \frac{\partial f_i}{\partial x_j} \right]^{-1}$ which is a function of $(x, \theta)$. From (59) in the Matrix Cookbook, the derivative with respect to $\theta$ is given by: $$ - \left[ \frac{\partial f_i}{\partial x_j} \right]^{-1} \frac{\partial \left[ \frac{\partial f_i}{\partial x_j} \right]}{\partial \theta} \left[ \frac{\partial f_i}{\partial x_j} \right]^{-1} $$