[Home]
Last updated on: Wed Jul 29 13:25:01 IST 2026

Transformation of random vectors


$\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}$ $\newcommand{\x}[1]{X_{(#1)}}$ $\newcommand{\v}[1]{{\mathbf #1}}$ Transformation of random vectors

1. Warm up

We often work with functions of random variables. Old random variables are transformed into new random variables using functions. So a natural requirement is to be able to work out the distributions of the new random variables in terms of those of the old ones. In Probability I, you have already learned about univariate transforms (i.e., from ${\mathbb R}$ to ${\mathbb R}$). Here we shall generalise them to multivariate transforms (i.e., from ${\mathbb R}^n$ to ${\mathbb R}^n$ and later from ${\mathbb R}^n$ to ${\mathbb R}^m$ where $m < n$). Let us start by reviewing some basic concepts.

1.1. Random vectors

An $n$-dimensional random vector is just $n$ random variables packed together as a vector. All the random variables must be defined on the same probability space.

EXAMPLE 1: Roll a fair die. Let the outcome be denoted by $\omega.$ Define the random variables $X$ and $Y$ as

Then $(X,Y)$ is a random vector. ■

EXAMPLE 2: Roll a fair die and a fair coin independently together. Let the outcome be denoted by $\omega\equiv(\omega_1,\omega_2),$ where $\omega_1$ is the outcome of the die, and $\omega_2$ is that of the coin.

Define the random variables $X$, $Y$ and $Z$ as Then $(X,Y,Z,XY)$ is a random vector. This example shows how "a coin toss and a die roll" is considered a single random experiment. A random variable defined on this experiment may depend on just the coin toss, or just the die roll, or both. ■

1.2. Multivariate function

When we say $\phi$ is a function from ${\mathbb R}^n$ to ${\mathbb R}^m,$ we think of $\phi$ as a machine with $n $ inputs and $m$ outputs. It takes $n $ numbers in, and produces $m$ numbers out.

EXAMPLE 3: $\phi(x_1,x_2) = (x_1,x_1+x_2,x_2^2)$ is one such example. Here $\phi:{\mathbb R}^2\rightarrow{\mathbb R}^3.$ It has two inputs and 3 outputs:

In general, each of the output numbers is a function of all the input numbers. These are called the component functions.

EXAMPLE 4: The $\phi$ from the last example has component functions $$\phi_1(x_1,x_2) = x_1,~~ \phi_2(x_1,x_2) = x_1+x_2\mbox{ and } \phi_3(x_1,x_2) = x_2^2.$$ Note that, as in the case of the first and third components, not all the input variables need to appear in all the components. ■

1.3. Jacobian

Let $\phi:{\mathbb R}^n\rightarrow{\mathbb R}^m$ be a function with $i$-th component function denoted by $\phi_i(x_1,...,x_n).$ Assume that the partial derivative $\pd {\phi_i}{x_j}$ is defined for all $i,j.$ Then the Jacobian matrix of $\phi$ is defined as the $m\times n$ matrix with $(i,j)$-th entry $$\pd{\phi_i}{x_j}.$$ Notice the order of the Jacobian matrix: it is $m\times n$ and not $n\times m.$

EXAMPLE 5:  Let $\phi:{\mathbb R}^2\rightarrow{\mathbb R}^2$ be $\phi(x_1,x_2) = (\sin (x_1x_2),\, x_1-x_2^2).$ Find its Jacobian. Also find the determinant of the Jacobian.

SOLUTION: The component functions are $\phi_1(x_1,x_2) = \sin(x_1x_2)$ and $\phi_2(x_1,x_2) = x_1-x_2^2.$

In our case $$\begin{eqnarray*} \frac{\partial \phi_1}{\partial x_1} & = & x_2\cos (x_1x_2),\\ \frac{\partial \phi_1}{\partial x_2} & = & x_1\cos (x_1x_2),\\ \frac{\partial \phi_2}{\partial x_1} & = & 1\\ \frac{\partial \phi_2}{\partial x_2} & = & -2x_2. \end{eqnarray*}$$ So the Jacobian is $$\left[\begin{array}{ccccccccccc}x_2\cos (x_1x_2) & x_1\cos (x_1x_2)\\ 1 & -2x_2 \end{array}\right].$$ Its determinant is $$x_2\cos (x_1x_2)\times(-2x_2)- x_1\cos (x_1x_2)\times 1 = -(2x_2^2+x_1)\cos (x_1x_2).$$ ■

1.4. Problem set

EXERCISE 1: Consider the random vector $(X,Y)$, where $X,Y$ are iid $N(0,1)$ random variables. If we generate a random sample of size 100 of this random variable, how will the scatterplot look like?

EXERCISE 2: Consider the random vector $(X,X)$, where $X$ is a $N(0,1)$ random variable. If we generate a random sample of size 100 of this random vector, how will the scatterplot look like?

EXERCISE 3: How many component functions does $\phi:{\mathbb R}^6\rightarrow{\mathbb R}^2$ have? $6?$ or $2?$

EXERCISE 4: Find the Jacobian of $\phi(x_1,x_2) = (x_1,x_1+x_2,x_1^2)$

EXERCISE 5: Compute the Jacobian matrix for $\phi(x,y,z) = (\sin(2x+3y),x^2z).$

EXERCISE 6: What is the Jacobian matrix for the transform $\phi:{\mathbb R}^n\rightarrow{\mathbb R}^n$ where $\phi(\v x) = A\v x+\v b$ for some fixed matrix $A_{n\times n}$ and fixed vector $\v b_{n\times 1}$?

EXERCISE 7: If $\phi:{\mathbb R}^n\rightarrow{\mathbb R}^n$ is given by $\phi(\v x) = A\v x+\v b$ for some matrix $A_{n\times n}$ and vector $\v b_{n\times 1}$, then show that $\phi$ is one-one if and only if $A$ is nonsingular.

EXERCISE 8: If $\phi:{\mathbb R}^2\rightarrow{\mathbb R}^2$ is a one-one function, then must both its component functions also be one-one?

EXERCISE 9: If $\phi:{\mathbb R}^2\rightarrow{\mathbb R}^2$ has one-one component functions, then must $\phi$ itself also be one-one?

2. Univariate Jacobian formula (review)

You already know this (at least you should !):
Excerpt from Probability I notes
Here $\phi$ is assumed to be strictly monotone and differentiable. Actually, we need Give one Give oneGaebgsebdd $\phi ^{-1}$ to be differentiable. The strict monotonicity guaranteed that $\phi$ was one-one, so that $\phi ^{-1}$ made sense.

EXAMPLE 6: Let $X$ have exponential distribution with rate $\lambda>0.$ Find the density of $X^2.$

SOLUTION: Here $X$ has density $f(x) = \left\{\begin{array}{ll} \lambda e^{-\lambda x}&\text{if }x > 0\\ 0&\text{otherwise.}\end{array}\right..$

Also $\phi:(0,\infty)\rightarrow(0,\infty)$ is a bijection, with differentiable $\phi ^{-1}(y) = \sqrt y.$ So $X^2$ has density $$\begin{eqnarray*} g(y) & = & f(\phi ^{-1}(y)) \left| \frac{d\phi ^{-1}(y)}{dy} \right|\\ & = & \left\{\begin{array}{ll}\lambda e^{-\lambda\sqrt y} \left| \frac{1}{2\sqrt y} \right|&\text{if }y>0\\ 0&\text{otherwise.}\end{array}\right.\\ & = & \left\{\begin{array}{ll}\frac{ \lambda e^{-\lambda\sqrt y}}{2\sqrt y} &\text{if }y>0\\ 0&\text{otherwise.}\end{array}\right.. \end{eqnarray*}$$ You may check the statistical regularity behind this exercise by direct simulation. In the following snippet I have used $\lambda=2.$
g = function(y) {exp(-2*sqrt(y))/sqrt(y)}
x = rexp(1000,rate=2)
hist(x^2,prob=T)
curve(g,add=T)

2.1. Problem set

EXERCISE 10: If $X$ has exponential distribution with rate $\lambda>0,$ find the density of $\log X.$

EXERCISE 11: If $X\sim Unif(0,1)$ then what is the density of $\cos X$?

EXERCISE 12: If $X$ has density $f(x),$ and $a(\neq0),b\in{\mathbb R}$ are fixed, then find the density of $aX+b.$

EXERCISE 13: If $X\sim Unif\left(-\frac \pi2,\frac \pi2\right),$ find the density of $\tan X.$

3. Multivariate Jacobian formula

3.1. Theory

In higher dimensions, we shall first consider transforms of the form $\phi:{\mathbb R}^n\rightarrow{\mathbb R}^n.$ If $n\geq 2,$ we do not have the concept of monotonicity (since there is no natural ordering in ${\mathbb R}^n$ for $n\geq 2$).

So, to generalise to higher dimensions, we shall drop the strict monotonicity condition and explicitly require $\phi$ to be one-one with differentiable $\phi ^{-1}.$

Next we need to know two things: You should know both of these from your Mathematics II course. Here I have put together a quick refresher. The refresher is also provided in the first 8 minutes of this video.

We shall imitate our familiar univariate Jacobian formula $$g(y) = f(\phi ^{-1}(y)) \left| \frac{d}{dy}\phi ^{-1}(y) \right|$$ to get the following theorem.
Theorem Let $\v X$ be an $n$-dimensional random vector. Let $\phi:{\mathbb R}^n\rightarrow{\mathbb R}^n$ be a one-one with differentiable inverse. Let $\v Y = \phi(\v X).$ Then $\v Y$ has density $$g(\v y) = f(\phi ^{-1}(\v y)) J,$$ where $J$ is the absolute determinant of Jacobian of $\phi ^{-1}(\v y).$
We shall not prove this theorem here (though the geometric intuition behind it is discussed later in this page). This is actually just a restatement of the change of variable formula for multivariate integration that you have learned in Mathematics II.

Most of the time our $\v X$ will take values only in some subset $S\subseteq {\mathbb R}^n.$ Then we need $\phi$ to be one-one only over $S.$ Also $\phi ^{-1}$ then is defined over only $\phi(S).$ Here $\phi(S)$ means the set of all points of the form $\phi(\v x)$ where $\v x\in S,$ i.e., $$\phi(S) = \{\phi(\v x)~:~\v x\in S\}.$$

3.2. Example

EXAMPLE 7:  Let $\v X = (X_1,X_2)$ be uniformly distributed over $[1,2]\times[3,4].$ Let $Y_1 = X_1X_2$ and $Y_2 = X_1.$ Find the joint density of $\v Y = (Y_1,Y_2).$

SOLUTION: Let $S = [1,2]\times[3,4].$

This has area 1. So $\v X $ has density $$f(x_1,x_2) = \left\{\begin{array}{ll}1&\text{if }(x_1,x_2)\in S\\ 0&\text{otherwise.}\end{array}\right..$$ Here the transform is $\phi(x_1,x_2) = (x_1x_2,x_1).$

Clearly, $\phi:S\rightarrow \phi(S)$ is one-one, because given $y_1=x_1x_2$ and $y_2=x_1$ you can recover $(x_1,x_2)\in[1,2]\times[3,4]$ uniquely as $x_1 = y_2$ and $x_2 = \frac{y_1}{y_2}.$

Thus, the inverse transform is $\phi ^{-1}(y_1,y_2) = \left(y_2,\frac{y_1}{y_2}\right).$ The Jacobian of this is $$\left[\begin{array}{ccccccccccc}0 & 1\\\frac{1}{y_2} & -\frac{y_1}{y_2^2} \end{array}\right],$$ which has absolute determinant $\frac{1}{y_2},$ since $y_2 > 0.$

So the required density will be $$g(y_1,y_2) = \left\{\begin{array}{ll}\frac{1}{y_2}&\text{if }\left(y_2,\frac{y_1}{y_2}\right)\in S\\ 0&\text{otherwise.}\end{array}\right.$$ Often we want to write it as $$g(y_1,y_2) = \left\{\begin{array}{ll}\frac{1}{y_2}&\text{if }(y_1,y_2)\in \phi(S)\\ 0&\text{otherwise.}\end{array}\right.$$ To find out $\phi(S)$ remember that $\v x\in S\Leftrightarrow \v y\in \phi(S).$ We shall start with $\v x\in S,$ i.e., $\phi ^{-1}(\v y)\in S,$ which, in our example, is $\left(y_2,\frac{y_1}{y_2}\right)\in S.$

This means $$1\leq y_2 \leq 2 \mbox{ and } 3\leq \frac{y_1}{y_2}\leq 4.$$ Sketching these restrictions we get this region:
$\phi(S)$ shown in red

3.3. Problem set

EXERCISE 14: If $(X_1,X_2)$ has joint density $f(x)=\left\{\begin{array}{ll}x_1+x_2&\text{if }x_1,x_2\in[0,1]\\ 0&\text{otherwise.}\end{array}\right.$, then find the joint density of $(X_1+X_2, X_1-X_2).$

EXERCISE 15: If $(X_1,X_2)$ is uniformly distributed over $[0,1]\times[0,2]$, then find the joint density of $(X_1^2,X_1+X_2).$

EXERCISE 16: If $X_1,X_2$ are iid $N(0,1)$ random variables, and $(R,\Theta)$ is the polar representation of $(X_1,X_2),$ then find the density of $(R,\Theta).$

EXERCISE 17: If $X_1,X_2$ are iid exponential random variables with rate 1, and $(R,\Theta)$ is the polar representation of $(X_1,X_2),$ then find the density of $(R,\Theta).$

EXERCISE 18: If $(X_1,X_2)$ is uniformly distributed over the red rectangle below, then find non-zero constants $a,b,c,d$ such that $Y_1=aX_1+bX_2$ and $Y_2=cX_1+dX_2$ are independent.

Hint:

The answer is not unique.

Project: Box-Muller method and related simulation techniquesThe polar to Cartesian transform $(r,\theta)\mapsto (r\cos \theta, r\sin \theta)$ is useful for generating $N(0,1)$ random variables. Indeed, this is the way it is generally done in most softwares (R, Python etc). The basic technique is just a simple application of the Jacobian formula. The project requires you to understand and implement the method (in a language of your choice). Also you should understand why it is better than the regular "invert the distribution function" method (you need to learn about that as well, if you do not already know it).

It is a relatively easy project. So each group doing this should have size $\leq 3.$

4. Special case: (Affine) linear tranforms

If our transformation $\phi:{\mathbb R}^n\rightarrow{\mathbb R}^n$ is of the form $\phi(\v x) = A\v x + \v b,$ where $A_{n\times n}$ is a fixed matrix, and $\v b$ is a fixed vector, then $\phi$ is a bijection if and only if $A$ is nonsingular. In this case, $\phi ^{-1}(\v y) = A ^{-1}(\v y-\v b ),$ with Jacobian $A ^{-1}.$ So, if the density of $\v X$ is $f(\v x),$ then density of $\v Y$ is $g(\v y) = f( A ^{-1} (\v y - \v b)) |det(A ^{-1})| = \frac{1}{|det(A)|} f( A ^{-1} (\v y - \v b)).$

4.1. Problem set

EXERCISE 19: Let $(X_1,X_2)\sim Unif([0,1]\times[0,2]).$ Find the joint density of $(Y_1,Y_2),$ where $Y_1 = X_1+2X_2+1$, $Y_2 = 3X_1+X_2.$

EXERCISE 20: If $(X_1,X_2)$ has joint density $f(x_1,x_2) = \left\{\begin{array}{ll}x_1+x_2&\text{if }x_1,x_2\in[0,1]\\ 0&\text{otherwise.}\end{array}\right.,$ then find the joint density of $(X_1+X_2,X_2).$

EXERCISE 21: If $X_1,X_2$ are iid Cauchy, then find the joint density of $((X_1+X_2)/2, X_1+1).$

EXERCISE 22: If $X_1,X_2,X_3$ are iid $N(0,1)$ random variables, Find the joint density of $A\left[\begin{array}{ccccccccccc}X_1\\X_2\\X_3 \end{array}\right]$ where $A$ is some fixed nonsingular matrix and $\v b$ is some fixed vector.

Hint:

The joint density of $\v X = \left[\begin{array}{ccccccccccc}X_1\\X_2\\X_3 \end{array}\right]$ is $$f(\v x) = (2\pi)^{-\frac 32} \exp\left(-\frac 12\v x' \v x\right)\mbox{ for } \v x\in{\mathbb R}^3.$$

5. Finding marginal density from joint density

So far we have been talking only about transforms from ${\mathbb R}^n$ to ${\mathbb R}^n.$ What if we have a transform $\phi:{\mathbb R}^n\rightarrow{\mathbb R}^m,$ where $m\neq n?$

If $m > n,$ then it can be shown (with help from measure theory beyond the present scope) that $\phi(\v X)$ cannot have a density even if $\v X$ has. So we shall not discuss this case here.

But, it is quite common to have the $m < n$ case. In this case, the Jacobian formula is not applicable directly, because the Jacobian matrix in this case is not square, and hence we cannot take its determinant. However, the following fact comes to our help here:
Let $(X_1,X_2)$ have joint density $f(x_1,x_2).$ Then the (marginal) density of $X_1$ is $f_{X_1}(x_1) = \int_{-\infty}^\infty f(x_1,x_2)\, dx_2.$
In other words, you can "integrate out" the unwanted variables. This works in higher dimensions also, as shown in the example below.

EXAMPLE 8: Let $(X_1,X_2,X_3,X_4)$ have joint density $f(x_1,x_2,x_3,x_4).$ How would you find the density of $(X_1,X_3)?$

SOLUTION: It is $f_{X_1,X_3}(x_1,x_3) = \int_{-\infty}^\infty\int_{-\infty}^\infty f(x_1,x_2,x_3,x_4)\, dx_2dx_4.$

This integral may look complicated. But in order to evaluate it, just perform two integrations, once wrt $x_2$ and once wrt $x_4$ (each time considering all other $x_i$'s as constants). You may perform the two integrations in any order you like. ■

Here is a more numerical example.

EXAMPLE 9: If $(X_1,X_2)$ has joint density $$f(x_1,x_2) = \left\{\begin{array}{ll}2(x_1 + x_2)&\text{if }x_1\in[0,1], x_2\in[0,x_1]\\ 0&\text{otherwise.}\end{array}\right.,$$ then find the (marginal) density of $X_1.$

SOLUTION: Let's start by sketching the support of the joint density:
The red triangle is where the density is positive.
Here we need to "integrate out" $x_2$ $$\begin{eqnarray*} f_{X_1}(x_1) & = & \int_{-\infty}^\infty f(x_1,x_2)\, dx_2\\ & = & \left\{\begin{array}{ll}2\int_0^{x_1} (x_1+x_2)\, dx_2&\text{if }x_1\in[0,1]\\ 0&\text{otherwise.}\end{array}\right.. \end{eqnarray*}$$ Now for $x_1\in[0,1]$ we have $$2\int_0^{x_1} (x_1+x_2)\, dx_2 = 2\left(x_1^2 + \frac 12x_1^2\right)=3x_1^2.$$ Hence the required density of $X_1$ is $$f_{X_1}(x_1) = \left\{\begin{array}{ll}3x_1^2&\text{if }x_1\in[0,1]\\ 0&\text{otherwise.}\end{array}\right..$$ ■

5.1. Problem set

EXERCISE 23: Work out the (marginal) density of $X_2$ in the example above.

EXERCISE 24: Let $(X_1,X_2)$ have joint density $$f(x_1,x_2) = \left\{\begin{array}{ll}24x_1x_2&\text{if }x_1,x_2\geq 0\mbox{ and }x_1+x_2\leq 1\\ 0&\text{otherwise.}\end{array}\right..$$ Find the (marginal) density of $X_1.$ Don't forget to sketch the support first!

EXERCISE 25: Find the density of $X_2$ for the joint density in the exercise above.

EXERCISE 26: Let $(X_1,X_2)$ be distributed uniformly over the set $S$ shown below.

Find the densities of $X_1$ and $X_2.$

6. Transformations from ${\mathbb R}^n$ to ${\mathbb R}^m$

Suppose that we are given the joint density of some $n$-dimensional random vector $\v X$, and what to find the density of $\phi_1(\v X)$ for some $\phi_1:{\mathbb R}^n\rightarrow{\mathbb R}^m$ where $m < n.$

Then the strategy is to "pad up" $\phi_1$ with $n-m$ extra dummy components, so that the padded function $\phi:{\mathbb R}^n\rightarrow{\mathbb R}^n$ is one-one, and has differentiable inverse.

Then we can apply the Jacobian technique to find the density of $\phi(\v X).$ This $\phi(\v X)$ consists of $\phi_1(\v X)$ plus some extra dummy variables. We obtain the density of $\phi_1(\v X)$ by integrating out the dummy variables.

EXAMPLE 10: Let the joint density of $(X,Y)$ be $$f(x,y)=\left\{\begin{array}{ll}x+y&\text{if }0\leq x,y\leq 1\\ 0&\text{otherwise.}\end{array}\right..$$ Find the joint density of $2X+3Y.$

SOLUTION: Here the function is $\phi_1(x,y) = 2x+3y.$ Since the codomain is ${\mathbb R},$ we make it ${\mathbb R}^2$ by padding it with another function of our choice, say $\phi_2(x,y) = x.$ Then the padded function is $\phi(x,y)\mapsto (2x+3y,x).$ This is a one-one function from ${\mathbb R}^2$ to ${\mathbb R}^2.$ Taking $(u,v) = (2x+3y,x)$ the inverse transform is $(x,y) = \left(v,\frac{u-2v}{3}\right),$ with Jacobian $\left[\begin{array}{ccccccccccc}0 & 1\\\frac 13 & -\frac 23 \end{array}\right].$ Its absolute determinant is $\frac 13.$ So the joint density of $(U,V)$ is $$g(u,v) = \frac 13f\left(v,\frac{u-2v}{3}\right) =\left\{\begin{array}{ll}\frac{u+v}{9}&\text{if }0\leq v,\frac{u-2v}{3}\leq 1\\ 0&\text{otherwise.}\end{array}\right..$$ In other words, $$g(u,v) =\left\{\begin{array}{ll}\frac{u+v}{9}&\text{if }(u,v)\in \phi(S)\\ 0&\text{otherwise.}\end{array}\right.,$$ where $\phi(S)$ is the red region below.
Next, we shall integrate out $V$ to find the marginal density of $U.$ This will be done in three parts:
The three parts

When $u\in[0,2],$ we have $$\int_{-\infty}^\infty g(u,v)\, dv = \frac 19 \int_0^{u/2} u+v\, dv = \frac{5u^2}{72}.$$ When $u\in[2,3],$ we have $$\int_{-\infty}^\infty g(u,v)\, dv = \frac 19 \int_0^1 u+v\, dv = \frac u9+\frac{1}{18}.$$ When $u\in[3,5],$ we have $$\int_{-\infty}^\infty g(u,v)\, dv = \frac 19 \int_{(u-3)/2}^1 u+v\, dv = \frac{-5u^2+26u-5}{72}.$$ Otherwise, the integral is 0.

Thus, the density of $U$ is $$g(u) = \left\{\begin{array}{ll}\frac{5u^2}{72}&\text{if }u\in[0,2]\\\frac u9+\frac{1}{18}&\text{if }u\in[2,3]\\\frac{-5u^2+26u-5}{72}&\text{if }u\in[3,5]\\ 0&\text{otherwise.}\end{array}\right..$$
A graph of the density

6.1. Problem set

EXERCISE 27: Let $(X,Y)$ have joint density $f(x,y).$ Find the density of $X+Y$ by "padding" it up with $X.$

EXERCISE 28: Let $(X,Y)$ have joint density $f(x,y).$ Find the density of $X+Y$ by "padding" it up with $Y.$ Did you get the same answer as in the exercise above?

EXERCISE 29: Let $X,Y$ be iid Cauchy random variables. Find density of $\frac{X+Y}{2}.$

EXERCISE 30: Let $(X,Y)$ have joint density $f(x,y).$ Find the density of $X-Y.$

EXERCISE 31: Let $(X,Y)$ have uniform density over $[1,2]\times[3,4].$ Find the density of $XY.$

EXERCISE 32: Let $X,Y$ be iid exponential random variables with rate $1.$ Find density of $\frac XY.$

7. Geometry in the univariate case

You had seen the univariate Jacobian formula in Probability I, and we have now seen its multivariate generalisation. Both these formulae were presented as magic formulae without any intuition. In this and the next section we shall try to provide a geometric intuition behind them.

Here is the univariate formula from Probability I once again:
Excerpt from Probability I notes

Let's first massage the above formula into a form more useful for the present purpose: $$g(y) = f(x) \left| \frac{dx}{dy} \right|,$$ or $$g(y) = \frac{f(x)}{ | \phi'(x)| }.$$ So we may say that $g$ is just same as $f,$ except that it is scaled by $\phi'.$

We shall provide a geometric interpretation of this. Suppose that $X$ has uniform distribution over $[0,1].$ Then the density of $X$ is constant at 1 over $[0,1].$ Split $[0,1]$ into 10 subintervals of equal lengths.
All the rectangles are identical
Since the total area under the density is 1, the rectangle on each subinterval has area $\frac{1}{10}.$ You may say that each subinterval accounts for $\frac{1}{10}$ probability. When you compute $Y=X^2,$ the intervals close to 0 get squeezed further down to 0, while those closer to 1 are stretched.
The subintervals are scaled non-uniformly
But still each rectangle has to account for $\frac{1}{10}$ probability. So the squeezed rectangles have to compensate by growing taller, while the stretched ones compensate by getting shorter.
All rectangles now again have area $\frac{1}{10}.$
This leads to $Y$ having higher density near 0 than near 1. Thus, the non-uniformity of the density is controlled by the squeezing of the transforming function, i.e., the derivative. Smaller the derivative, higher the density. And, that is precisely what we achieve when we divide by $|\phi'(x)|.$ We use the absolute value, because we care about only the amount of stretching or squishing, not the direction.

7.1. Problem set

EXERCISE 33:  If $X$ has uniform distribution over (2,4) then roughly sketch the density of $Y = \frac 1X.$ Don't apply the Jacobian formula algeraically. Think in terms of which part gets squeezed/expanded.

EXERCISE 34: Suppose that $X$ is uniform over $(-1,1)$ and $Y=X^2.$ (not a bijection!). Guess the form of the density of $Y.$ Do you see why we needed the transform to be bijective in our intuition?

[Hint]

We were assuming that density of $Y$ at any given point was controlled by the density of $X$ at only one point. But in this example, the density of $Y$ at, say, $y=\frac 14$ is governed by the density of $X$ at $x=\frac 12$ as well as $x=-\frac 12.$

8. Geometry in the multivariate case

We have seen the geometric interpretation of the univariate Jacobian formula. Now we shall do the same for its multivariate version.

First let us understand how a function from ${\mathbb R}^2$ to ${\mathbb R}^2$ may be visualised graphically.
A transform from ${\mathbb R}^2$ to ${\mathbb R}^2$
If you prefer to see this transformation in an animated way click here.

Here we see the effect of the function $\phi(x,y)=\big( (2x+y)^2,\, (x-y)^3\big)$ on the rectangle $[1,2]\times[3,4].$ Notice how the square grid has been deformed unevenly. The diagram also shows the positions of three points (red, green and blue) and two squares adjacent to them before and after the transform. The green and blue squares were of equal area originally. But after the transform blue region has expanded, while the green one has shrunk in area.

We want to measure how much a square will expand or shrink in area. For this we consider a typical point $(a,b)$ in the domain, and a little square $[a,a+\delta]\times[b , b+ \delta].$
Notice how the little green square changes
Let us zoom in upon the little square (before and after the transformation):
A closer look
If the two components of $\phi(x,y)$ are called $u(x,y)$ and $v(x,y),$ then $$\begin{eqnarray*} \phi(a, b) & = & (u(a, b), v(a, b)),\\ \phi(a+\delta, b) & = & (u(a+\delta, b), v(a+\delta, b))\\ \phi(a, b+\delta ) & = & (u(a, b+\delta ), v(a, b+\delta)). \end{eqnarray*}$$ Now, since $\delta$ is "small" we can write $u(a+\delta,b)\approx u(a,b)+\pd u x \delta,$ etc. So we have $$\begin{eqnarray*} \phi(a, b) & = & (u(a, b), v(a, b)),\\ \phi(a+\delta, b) & = & (u(a+\delta, b), v(a+\delta, b))\approx \left(u(a,b)+\pd u x\delta, v(a,b)+\pd v x \delta\right)\\ \phi(a, b+\delta) & = & (u(a, b+\delta), v(a, b+\delta))\approx \left(u(a,b)+\pd u y \delta, v(a,b)+\pd v y \delta\right). \end{eqnarray*}$$ Thus, after the transform, the little green square is approximately the following parallelogram:
A parallelogram
The blue side is given by the vector $\left(\pd u x, \pd v x \right)\delta,$ and the red side by the vector $\left(\pd u y, \pd v y \right)\delta.$

Now, we shall use the following standard result from linear algebra.
Fact from linear algebra
Hence the area of the green parallelogram is $$\left| \det\left[\begin{array}{ccccccccccc}\pd u x & \pd u y\\\pd v x & \pd v y \end{array}\right]\right| \delta^2.$$ Since the original green square had area $\delta^2,$ hence the scaling factor is given by the absolute determinant of the Jacobian.

8.1. Problem set

EXERCISE 35: Consider the transformation $\phi(x,y) = (x,2y).$ Sketch how a square $[a,a+\delta]\times[b,b+\delta]$ is transformed by it. By what factor does the area grow? Answer this both from your diagram as well as Jacobian determinant.

EXERCISE 36: Consider the transformation $\phi(x,y) = (x,-2y).$ Sketch how a square $[a,a+\delta]\times[b,b+\delta]$ is transformed by it. By what factor does the area grow? Answer this both from your diagram as well as Jacobian determinant.

EXERCISE 37: Consider the transformation $\phi(x,y) = (2x,3y).$ Sketch how a square $[a,a+\delta]\times[b,b+\delta]$ is transformed by it. By what factor does the area grow? Answer this both from your diagram as well as Jacobian determinant.

EXERCISE 38: Consider the transformation $\phi(x,y) = (x^3,y^3).$ Which point in the region $[1,2]\times[3,4]$ experiences the maximum stretch?