How to solve for the Jacobian matrix of a complementary log function

exponential functionjacobianlogarithmspartial derivative

Suppose that $h(\mathbf{s})=1-[\exp(e^{\beta_0+\beta_1(||\mathbf{s}-\mathbf{x}||)^2})]^{-1}$, where both s and x are $1\times2$ vectors. How can I find the Jacobian matrix's determinant $|J(h(\mathbf{s}))|$?

My work:

For some reason, I'm not able to determine the form of the Jacobian matrix here. I'm seeing that:

$$J(h(\mathbf{s}))=\left( \begin{matrix} \dfrac{\partial h(\mathbf{s})}{\partial s_1} & \dfrac{\partial h(\mathbf{s})}{\partial s_2} \end{matrix} \right),$$ which does not follow the typical square form of a Jacobian matrix. Is this because $h(\mathbf s)$ returns a scalar value (which I am assuming this function returns a scalar value), going from a two-dimensional space to one-dimensional space?

Update:

Here, we have a 2-1 dimension reduction. I have heard that we could augment the output space with an extra variable, then use an identity transformation. However, I am not aware of how to implement this suggestion.

Best Answer

First, let's use a colon as a convenient product notation for the trace, i.e. $$A:B = {\rm Tr}(A^TB)$$ Next, define the following cascade of variables $$\eqalign{ y &= (s-x)\quad&\implies\quad dy = ds,\;\;dx=0\;\;\{x=constant\} \\ \alpha &=\beta_0+\beta_1(y:y)\quad&\implies\quad d\alpha=2\beta_1(y:dy) \\ \gamma &= e^\alpha\quad&\implies\quad d\gamma=\gamma\,d\alpha \\ h &= 1-e^{-\gamma}\quad&\implies\quad dh=e^{-\gamma}d\gamma \\ }$$ Now successively substitute into that last differential $$\eqalign{ dh &= (1-h)\,d\gamma \\ &= \gamma(1-h)\,d\alpha \\ &= 2\gamma\beta_1(1-h)\;y:dy \\ &= 2\gamma\beta_1(1-h)\;(s-x):ds \\ \frac{\partial h}{\partial s} &= 2\gamma\beta_1(1-h)\;(s-x) \\ }$$ NB:   This is the gradient of $h$ with respect to $s$, not the Jacobian.

Since the function is symmetric in the variables $\{s,x\}$, we get the following gradient (for free) $$\eqalign{ \frac{\partial h}{\partial x} &= 2\gamma\beta_1(1-h)\;(x-s) \\ }$$