Calculating the Jacobian of a transformation I have the functions $y_i = \frac{S_i}{S_n}, \ i=1,...,n-1$ and $y_n=S_n$, where $S_m = \sum_{k=1}^m x_k$.
Now I found the inverse functions to be 
\begin{align} 
x_1&=y_1y_n, \\
 x_2&=y_2y_n-y_1y_n, \\
 &\ \, \vdots 
\\ x_{n-1}&=y_{n-1}y_n-y_{n-2}y_n, \\ x_n&=y_n(1-y_{n-1}).\end{align}
I need to get the Jacobian of these inverse functions but I cannot get the right answer, which my textbook says is supposed to be $y_n^{n-1}$?
 A: You can split it into two transformations with easy to calculate determinants; this sidesteps the need for the formula for the inverse, but you do need the multivariate chain rule. first transform from $x$ to $S$ and then from $S $ to $ y$. The map, $\Phi_1$ from $x=(x_1,\dots,x_n)$ to $S=(S_1,\dots,S_n)$ is given by a lower triangular matrix of ones. This is a linear map, so its Jacobian is equal to itself, and its determinant is the product of the diagonal entries, which is $1$. This means the determinant of the inverse transform is also 1. In symbols, for every $S$,
$$ \det \nabla \Phi_1^{-1}(S)= \det(\Phi_1^{-1})=\frac1{\det\Phi_1} = 1.$$
Then there's the map $\Phi_2$  from $S$ to $y=(y_1,\dots,y_n)$,
$$\Phi_2(S)_j =\begin{cases} \!\!\!\smash{\phantom{\Big(}} \frac{S_j}{S_n} & j<n \\ S_n & j=n \end{cases}$$
The inverse is of course
$$ \Phi^{-1}_2(y)_j =\begin{cases}  y_n y_j & j<n \\ y_n & j=n \end{cases}$$
Now you're interested in $\det\nabla (\Phi_2\Phi_1)^{-1}(y)$ which by Chain rule is
$$ \det \nabla (\Phi_1^{-1}(\Phi_2^{-1}(y))) = \det\left[ \nabla \Phi_1^{-1}(\Phi_2^{-1}(y)) \nabla\Phi_2^{-1}(y)\right] = \det  \nabla \Phi_1^{-1}(\Phi_2^{-1}(y)) \det \nabla\Phi_2^{-1}(y)  $$
in the last step we used $\det (AB) = \det A \det B$. As mentioned earlier $\det  \nabla \Phi_1^{-1}(\Phi_2^{-1}(y))=1$. 
All that remains is to compute $ \det \nabla\Phi_2^{-1}(y) $. But
$$ \partial_i\Phi_2^{-1}(y)_j = \begin{cases}  y_n \delta_{ij} + y_j \delta_{in}& j<n \\ \delta_{in} & j=n \end{cases} $$
In matrix form, this is an upper triangular matrix with diagonal entries $\overbrace{y_n,y_n,\dots,y_n}^{n-1\text{ times}},1$. So the determinant is $y^{n-1}_n$,and therefore
$$\det \nabla (\Phi_1^{-1}(\Phi_2^{-1}(y))) = \det \nabla\Phi_2^{-1}(y) = y^{n-1}_n.$$
A: Your calculation is correct, hence the Jacobian matrix will look like
$$J=\begin{bmatrix} 
    y_n & 0 & 0 & \dots & 0 & y_1\\
    -y_n & y_n & 0 & \dots & 0 & y_2-y_1\\
    0 & -y_n & y_n & \dots & 0 & y_3-y_2\\
    \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\
    0 & 0 & 0 & \dots        & -y_n & 1-y_n
    \end{bmatrix}$$
Now in order to evaluate the determinant let us perform a chain of elementary row operations,
$$ {R_2}' \to R_2+R_1 $$
$${R_3}' \to R_3+{R_2}'$$
$$ \vdots $$
$$ {R_n}' \to R_n+{R'_{n-1}}$$
Thus, after these operations,
$$ |J|=det\begin{bmatrix} 
    y_n & 0 & 0 & 0 & \dots & 0 & y_1\\
    0 & y_n & 0 & 0 &\dots & 0 & y_2\\
    0 & 0 & y_n & 0 & \dots & 0 & y_3\\
0 & 0 & 0 & y_n & \dots & 0 & y_4\\
    \vdots & \vdots & \vdots & \vdots& \ddots & \vdots & \vdots \\
    0 & 0 & 0 & 0 &\dots        & 0 & 1
    \end{bmatrix}$$
And by evaluating the determinant with respect to the last row, we get $ |J|= {y_n}^{n-1}.$ 
