Compute the Jacobian matrix of a function defined on $\mathbb{R}^6$ Let $f$ be the function defined on $\mathbb{R}^6$ such that for any $p=(p_1, p_2, p_3)\in\mathbb{R}^3$, $q=(q_1, q_2, q_3)\in\mathbb{R}^3\setminus\{0\}$ it is
$$f(p,q) = \left(\frac{p}{\sqrt{1+|p|^2}}, \frac{q}{|q|^3}\right).$$
My question is: how to compute the determinant of the Jacobian of that function? Clearly, I know the definition of Jacobian matrix, but I don't how to compute it in that case. During the class, the Professor said that we need to compute
$$\frac{\partial f^i}{\partial p_j}(p, q) =\delta_{ij}(1+|p|^2)^{-1/2}-p_i p_j(1+|p|^2)^{-3/2},$$
and
$$\frac{\partial f^{1+i}}{\partial q_j}(p, q) =\delta_{ij}|q|^{-3} -3q_i q_j |q|^{-5},$$
where $\delta_{ij}$ is the Kronecker delta and $i, j =1, 2, 3$.
Possibly I am a bit confused about the fact that I have a function defined on $\mathbb{R}^6$, but I don't understand why we need to compute all that things. Could someone please explain it to me?
Thank you in advance!
 A: Denote the new variable
$$
\mathbf{u} = 
\frac{\mathbf{p}}{\sqrt{1+\| \mathbf{p} \|^2}}
$$
it follows
$$
u_1
=
\frac{p_1}{\sqrt{1+p_1^2+p_2^2+p_3^2}}
$$
you are asked to compute
$\frac{\partial u_1}{\partial p_1}$,
$\frac{\partial u_1}{\partial p_2}$,
$\frac{\partial u_1}{\partial p_3}$,
$\frac{\partial u_1}{\partial q_1}=0$,
etc
and identically for all the variables.
You can also work directly with vectors using differentials
$$
d\mathbf{u} \sqrt{1+\| \mathbf{p} \|^2}+
\frac12 \frac{\mathbf{u}}{\sqrt{1+\| \mathbf{p} \|^2}} (d\| \mathbf{p} \|^2)
=
d\mathbf{p}
$$
Now using $d\| \mathbf{p} \|^2 = 2 \mathbf{p}^T d\mathbf{p}$, you find that
$$
d\mathbf{u} 
=
\frac{1}{\sqrt{1+\| \mathbf{p} \|^2}}d\mathbf{p}
-
\frac{\mathbf{u}}{1+\| \mathbf{p} \|^2} \mathbf{p}^T d\mathbf{p}
$$
The Jacobian (at least one subblock) is
$$
\mathbf{J}_{up}
=
\frac{1}{\sqrt{1+\| \mathbf{p} \|^2}} 
\left[
\mathbf{I}
-
\frac{\mathbf{u}\mathbf{p}^T}{\sqrt{1+\| \mathbf{p} \|^2}}
\right]=
\frac{1}{\sqrt{1+\| \mathbf{p} \|^2}} 
\color{#0048BA}{
\left[
\mathbf{I}
-
\frac{\mathbf{p}\mathbf{p}^T}{1+\| \mathbf{p} \|^2}
\right]
}
$$
UPDATE
The matrix determinant lemma can be used to compute the determinant of this block
$$
\det(\mathbf{A}+\mathbf{u}\mathbf{v}^T)=
(1+\mathbf{v}^T\mathbf{A}^{-1}\mathbf{u}) \det(\mathbf{A})
$$
which simplifies here in
$$
\det(\mathbf{I}+\mathbf{u}\mathbf{v}^T)=
1+\mathbf{v}^T\mathbf{u}
\tag{1}
$$
