Make sure you check out the problem first.

Instead of worrying about the entire area we’re trying to transform, just think about a single, small square. Its bottom left corner is at $(x_0,y_0)$, and the adjacent corners at $(x_0+dx,y_0), (x_0, y_0+dy)$, and the opposite corner $(x_0+dx, y_0+dy)$.

The transformation equations tell us where the square is mapped. The bottom left corner goes to
$(f(x_0,y_0),g(x_0,y_0))$,
which I’ll denote by
$(u_0,v_0)$.
Then, for example, the bottom right corner goes to
$(f(x_0+dx,y),g(x_0+dx,y)$.
Since $f$ and $g$ are smooth functions, the next step should be to find approximations for them that are more analytically tractable. We’ll do this by approximating them as first-order Taylor series expansions about $(x_0,y_0)$.

$f(x,y) = u_0 + \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y} dy + O(x^2, xy, y^2,...)$
and similarly for $g$.

Then the little square transforms into a parallelogram with corners at
$(u_0,v_0), (u_0 + \frac{\partial f}{\partial x}dx, v_0 + \frac{\partial g}{\partial x}dx)$
for the bottom right,
$(u_0 + \frac{\partial f}{\partial y}dy, v_0 + \frac{\partial g}{\partial y}dy)$
for the upper left corner, and
$(u_0 + \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy, v_0 + \frac{\partial g}{\partial x}dx + \frac{\partial g}{\partial y}dy)$
for the upper right corner.

Now that we have the transformed square, we’ll need its area. The sides of the parallelogram are vectors, explicitly
$(\frac{\partial f}{\partial x}dx,\frac{\partial g}{\partial x}dx)$
and
$(\frac{\partial f}{\partial y}dy,\frac{\partial g}{\partial y}dy)$.

You can find the area of a parallelogram by taking a cross product of its sides, which is the same as the determinant of a matrix with the vector components as entries (previous discussed here and here). In the present case, this yields
$\left| \begin{array}{cc} \frac{\partial f}{\partial x}dx & \frac{\partial g}{\partial x}dx \\ \frac{\partial f}{\partial y}dy & \frac{\partial g}{\partial y}dy \end{array} \right|$

This is the area of a differential element of volume under the transformation. To get the transformed region’s volume, we’ll just integrate our expression over the entire range we’re transforming:
$\int \int_{area} \left| \begin{array}{cc} \frac{\partial f}{\partial x} & \frac{\partial g}{\partial x} \\ \frac{\partial f}{\partial y} & \frac{\partial g}{\partial y} \end{array} \right| dx dy$

This problem was important when we were trying to find the magnification of an image due to gravitational lensing. Imagine us and two galaxies on an almost-line. The gravity of the middle galaxy bends the path of light from the far one. The original area in the sky of the far galaxy gets mapped to a new area on the sky (it’s such a small patch of sky that you can think of it as a Euclidean 2D space). Physics and some guesswork about the distribution of mass at the gravitational lens (middle galaxy) tell us what the functions $f$ and $g$ ought to be, and we try to find the ratio of the area of the source (the actual size of the source (far) galaxy as we would see it without a lens) to the area of the image (what we actually see with the lens in). Of course, we also need the image from the middle galaxy not to overlap the image from the far galaxy, or else we wouldn’t be able to tell what light was coming from where.

In theory, it would be best to observe the actual regions, not just their areas. However, in practice the areas are very small, and maybe even too small to get any shape at all out of them. In the best case scenarios, we can get just a few bits of information about the change in shape of the image. But what we can observe easily is the total amount of light we receive. The total amount of light is directly proportional to the area because gravitational lensing preserves a quantity called surface brightness (flux per unit area). The ratio of the areas of the images is also the ratio of the total light received, or the magnification. Since we can observe this magnification, it gives us important information about what models of galaxies’ mass distributions (i.e. what functions $f$ and $g$) fit the data.

If you observe values for the magnifications that cannot be explained by any model that takes into account only the visible matter of the lens galaxy, you have some evidence for dark matter. And that’s what we were up to.