Coordinate transformations – the Jacobian determinant

Required math: algebra, calculus

Required physics: none

Reference: d’Inverno, Ray, Introducing Einstein’s Relativity (1992), Oxford Uni Press. – Section 5.4 and Problem 5.2.

Since one of the main aspects of the definition of a tensor is the way it transforms under a change in coordinate systems, it’s important to consider how such coordinate changes work.

We’ll consider two coordinate systems, one denoted by unprimed symbols {x^{i}} and the other by primed symbols {x'^{i}}. In general, one system is a function of the other one, so we can write

\displaystyle  x'^{i}=x'^{i}\left(x\right) \ \ \ \ \ (1)

where the index {i} runs over the {n} dimensions of the manifold (so we have a set of {n} equations), and the symbol {x} without an index means the set of all components of {x}, so it’s equivalent to (but shorter than) writing

\displaystyle  x'^{i}=x'^{i}\left(x^{1},x^{2},x^{3},\ldots,x^{n}\right) \ \ \ \ \ (2)

Now suppose we want to do an integral over a portion of the manifold that is bounded by some subsurface in the manifold. As we know from elementary calculus, the differential volume (or area) has a different form depending on which coordinate system we’re using. For example, in 3-d rectangular coordinates, the volume element is {dxdydz}, while in spherical coordinates it is {r^{2}\sin\theta drd\theta d\phi}.

To see how this works we can start with one dimension. If we have an integral in rectangular coordinates such as

\displaystyle  \int_{x_{1}}^{x_{2}}f(x)dx \ \ \ \ \ (3)

we can change coordinate systems if we define {x=x(u)}. Then we have {dx=\frac{dx}{du}du}. To transform the limits of the integral, we need to invert the definition to get {u=u\left(x\right)}. Then the integral becomes

\displaystyle  \int_{u\left(x_{1}\right)}^{u\left(x_{2}\right)}f(x\left(u\right)\frac{dx}{du}du \ \ \ \ \ (4)

Essentially, this redefines the line element into the {u} coordinate system.

In two dimensions, we’d start off with (we’ll leave out the limits on the integrals since we’re really interested only in the area element):

\displaystyle  \int\int f(x,y)dxdy \ \ \ \ \ (5)

Now if we want to switch to another coordinate system, we define

\displaystyle   u \displaystyle  = \displaystyle  u\left(x,y\right)\ \ \ \ \ (6)
\displaystyle  v \displaystyle  = \displaystyle  v\left(x,y\right) \ \ \ \ \ (7)

Consider now an elemental rectangle {R} in the {xy} plane. The rectangle has its lower left corner at the point {\left(x_{0},y_{0}\right)} and has dimensions {\Delta x} and {\Delta y}, so that its area is {\Delta x\Delta y}.

We want to see how this rectangle transforms under the coordinate transformation above. The new elemental area will not necessarily be a rectangle, but we can transform it point by point to get the new shape. Starting with the lower left corner, this transforms to

\displaystyle  \left(u_{0},v_{0}\right)=\left[u\left(x_{0},y_{0}\right),v\left(x_{0},y_{0}\right)\right] \ \ \ \ \ (8)

We can write the general transformation as a vector:

\displaystyle  \mathbf{r}\left(x,y\right)=u\left(x,y\right)\hat{\mathbf{i}}+v\left(x,y\right)\hat{\mathbf{j}} \ \ \ \ \ (9)

Here, {\mathbf{r}} is the transformed location of the original point {\left(x,y\right)}, written with respect to the rectangular basis vectors.

The idea now is to consider what happens as {\Delta x} and {\Delta y} tend to zero. In this case, the transformed version of {R} tends to a parallelogram whose sides are parallel to the transformation of the two sides of R that touch at the point {P_{0}=\left(x_{0},y_{0}\right)} (the lower left corner of {R} we mentioned above). Consider first the edge of R along the line {y=y_{0}} (the bottom of the rectangle). We can think of this edge as a tangent to the rectangle at the point {P_{0}}. How does this tangent transform?

Well, the lower edge of R transforms as

\displaystyle  \mathbf{r}\left(x,y_{0}\right)=u\left(x,y_{0}\right)\hat{\mathbf{i}}+v\left(x,y_{0}\right)\hat{\mathbf{j}} \ \ \ \ \ (10)

The tangent along this curve is then the derivative with respect to {x}, so we get

\displaystyle  \frac{\partial}{\partial x}\mathbf{r}\left(x,y_{0}\right)=\frac{\partial}{\partial x}u\left(x,y_{0}\right)\hat{\mathbf{i}}+\frac{\partial}{\partial x}v\left(x,y_{0}\right)\hat{\mathbf{j}} \ \ \ \ \ (11)

Thus the tangent along the bottom edge of R at the transformed location of {P_{0}} is

\displaystyle  \mathbf{r}_{x}\equiv\left.\frac{\partial}{\partial x}\mathbf{r}\left(x,y_{0}\right)\right|_{x=x_{0}}=\left.\frac{\partial}{\partial x}u\left(x,y_{0}\right)\right|_{x=x_{0}}\hat{\mathbf{i}}+\left.\frac{\partial}{\partial x}v\left(x,y_{0}\right)\right|_{x=x_{0}}\hat{\mathbf{j}} \ \ \ \ \ (12)

By the same argument, the tangent at {P_{0}} along the left edge of R is found by setting {x=x_{0}} and differentiating with respect to {y}, and we get

\displaystyle  \mathbf{r}_{y}\equiv\left.\frac{\partial}{\partial y}\mathbf{r}\left(x_{0},y\right)\right|_{y=y_{0}}=\left.\frac{\partial}{\partial y}u\left(x_{0},y\right)\right|_{y=y_{0}}\hat{\mathbf{i}}+\left.\frac{\partial}{\partial y}v\left(x_{0},y\right)\right|_{y=y_{0}}\hat{\mathbf{j}} \ \ \ \ \ (13)

By the definition of a derivative, we can write these tangents in the form

\displaystyle   \mathbf{r}_{x} \displaystyle  = \displaystyle  \lim_{\Delta x\rightarrow0}\frac{\mathbf{r}\left(x_{0}+\Delta x,y_{0}\right)-\mathbf{r}\left(x_{0},y_{0}\right)}{\Delta x}\ \ \ \ \ (14)
\displaystyle  \mathbf{r}_{y} \displaystyle  = \displaystyle  \lim_{\Delta y\rightarrow0}\frac{\mathbf{r}\left(x_{0},y_{0}+\Delta y\right)-\mathbf{r}\left(x_{0},y_{0}\right)}{\Delta y} \ \ \ \ \ (15)

The vector {\mathbf{r}\left(x_{0}+\Delta x,y_{0}\right)-\mathbf{r}\left(x_{0},y_{0}\right)} connects the transformed lower left corner of R to the transformed lower right corner. Similarly {\mathbf{r}\left(x_{0},y_{0}+\Delta y\right)-\mathbf{r}\left(x_{0},y_{0}\right)} connects the lower left corner to the upper left corner. Thus these two vectors define the sides of a parallelogram that, for very small {\Delta x} and {\Delta y}, is a good approximation to the transformed R. In this approximation, we can write

\displaystyle   \mathbf{r}\left(x_{0}+\Delta x,y_{0}\right)-\mathbf{r}\left(x_{0},y_{0}\right) \displaystyle  \simeq \displaystyle  \mathbf{r}_{x}\Delta x\ \ \ \ \ (16)
\displaystyle  \mathbf{r}\left(x_{0},y_{0}+\Delta y\right)-\mathbf{r}\left(x_{0},y_{0}\right) \displaystyle  \simeq \displaystyle  \mathbf{r}_{y}\Delta y \ \ \ \ \ (17)

The area of a parallelogram is {A=s_{1}s_{2}\sin\theta}, where {s_{1}} and {s_{2}} are two adjacent sides and {\theta} is the angle between them. If we have two vectors corresponding to the sides, the area is thus the magnitude of the cross product of the vectors. So we get

\displaystyle  \Delta A=\left|\mathbf{r}_{x}\times\mathbf{r}_{y}\right|\Delta x\Delta y \ \ \ \ \ (18)

Using the equations above, we can work out this cross product. We’ll use the notation {u_{y}\equiv\partial u/\partial y} to save space. We get

\displaystyle  \mathbf{r}_{x}\times\mathbf{r}_{y}=\left|\begin{array}{ccc} \hat{\mathbf{i}} & \hat{\mathbf{j}} & \hat{\mathbf{k}}\\ u_{x} & v_{x} & 0\\ u_{y} & v_{y} & 0 \end{array}\right|=\left(u_{x}v_{y}-v_{x}u_{y}\right)\hat{\mathbf{k}} \ \ \ \ \ (19)

The coefficient of {\hat{\mathbf{k}}} is itself a {2\times2} determinant, and can be written as

\displaystyle  J(x,y)\equiv\left|\begin{array}{cc} u_{x} & u_{y}\\ v_{x} & v_{y} \end{array}\right| \ \ \ \ \ (20)

This is called the Jacobian of the transformation. The area element is thus

\displaystyle  dA=J\left(x,y\right)dxdy \ \ \ \ \ (21)

Now this is all very well, but the differentials {\Delta x} and {\Delta y} are still in the original coordinate system. How can we use this result to transform the integral that we began with?

The trick is to assume that the transformation is invertible, that is, that we can also write

\displaystyle   x \displaystyle  = \displaystyle  x\left(u,v\right)\ \ \ \ \ (22)
\displaystyle  y \displaystyle  = \displaystyle  y\left(u,v\right) \ \ \ \ \ (23)

We can run through the same argument again to get

\displaystyle  dA=J\left(u,v\right)dudv \ \ \ \ \ (24)

with

\displaystyle  J\left(u,v\right)=\left|\begin{array}{cc} x_{u} & x_{v}\\ y_{u} & y_{v} \end{array}\right| \ \ \ \ \ (25)

That is:

\displaystyle  \int\int f(x,y)dxdy=\int\int f\left[x\left(u,v\right),y\left(u,v\right)\right]\left|J\left(u,v\right)\right|dudv \ \ \ \ \ (26)

Note that we’ve taken the absolute value of J since we’re dealing with an area element, which must be positive.

It can also be shown that (the proof would make this post too long) the Jacobian satisfies a very convenient property:

\displaystyle  J\left(u,v\right)=\frac{1}{J\left(x,y\right)} \ \ \ \ \ (27)

That is, the Jacobian of an inverse transformation is the reciprocal of the Jacobian of the original transformation.

The Jacobian generalizes to any number of dimensions, so we get, reverting to our primed and unprimed coordinates:

\displaystyle  J\left(x'\right)=\left|\begin{array}{cccc} \frac{\partial x^{1}}{\partial x'^{1}} & \frac{\partial x^{1}}{\partial x'^{2}} & \cdots & \frac{\partial x^{1}}{\partial x'^{n}}\\ \frac{\partial x^{2}}{\partial x'^{1}} & \frac{\partial x^{2}}{\partial x'^{2}} & \cdots & \frac{\partial x^{2}}{\partial x'^{n}}\\ \vdots & \vdots & \ddots & \vdots\\ \frac{\partial x^{n}}{\partial x'^{1}} & \frac{\partial x^{n}}{\partial x'^{2}} & \cdots & \frac{\partial x^{n}}{\partial x'^{n}} \end{array}\right| \ \ \ \ \ (28)

For obvious reasons, this can be abbreviated to

\displaystyle  J=\left|\frac{\partial x^{a}}{\partial x'^{b}}\right| \ \ \ \ \ (29)

As a simple example, consider the transformation from rectangular to polar coordinates in 2-d. From the above, the Jacobian we want is {J\left(r,\theta\right)} which requires expressing the old coordinates in terms of the new ones. The transformation is

\displaystyle   x \displaystyle  = \displaystyle  r\cos\theta\ \ \ \ \ (30)
\displaystyle  y \displaystyle  = \displaystyle  r\sin\theta \ \ \ \ \ (31)

So we have

\displaystyle  J\left(r,\theta\right)=\left|\begin{array}{cc} \cos\theta & -r\sin\theta\\ \sin\theta & r\cos\theta \end{array}\right|=r \ \ \ \ \ (32)

Thus the transformation of the area element is

\displaystyle  dxdy\rightarrow rdrd\theta \ \ \ \ \ (33)

For the inverse transformation, we have

\displaystyle   r \displaystyle  = \displaystyle  \sqrt{x^{2}+y^{2}}\ \ \ \ \ (34)
\displaystyle  \theta \displaystyle  = \displaystyle  \tan^{-1}\frac{y}{x} \ \ \ \ \ (35)

so

\displaystyle  J\left(x,y\right)=\left|\begin{array}{cc} \frac{x}{\sqrt{x^{2}+y^{2}}} & \frac{y}{\sqrt{x^{2}+y^{2}}}\\ \frac{-y/x^{2}}{1+\left(y/x\right)^{2}} & \frac{1/x}{1+\left(y/x\right)^{2}} \end{array}\right|=\frac{1}{\sqrt{x^{2}+y^{2}}}=\frac{1}{r} \ \ \ \ \ (36)

Thus {J\left(u,v\right)=1/J\left(x,y\right)} as required.

In 3-d,

\displaystyle   x \displaystyle  = \displaystyle  r\sin\theta\cos\phi\ \ \ \ \ (37)
\displaystyle  y \displaystyle  = \displaystyle  r\sin\theta\sin\phi\ \ \ \ \ (38)
\displaystyle  z \displaystyle  = \displaystyle  r\cos\theta \ \ \ \ \ (39)

\displaystyle  J\left(r,\theta,\phi\right)=\left|\begin{array}{ccc} \sin\theta\cos\phi & r\cos\theta\cos\phi & -r\sin\theta\sin\phi\\ \sin\theta\sin\phi & r\cos\theta\sin\phi & r\sin\theta\cos\phi\\ \cos\theta & -r\sin\theta & 0 \end{array}\right|=r^{2}\sin\theta \ \ \ \ \ (40)

For the inverse:

\displaystyle   r \displaystyle  = \displaystyle  \sqrt{x^{2}+y^{2}+z^{2}}\ \ \ \ \ (41)
\displaystyle  \theta \displaystyle  = \displaystyle  \tan^{-1}\frac{\sqrt{x^{2}+y^{2}}}{z}\ \ \ \ \ (42)
\displaystyle  \phi \displaystyle  = \displaystyle  \tan^{-1}\frac{y}{x} \ \ \ \ \ (43)

\displaystyle  J\left(x,y,z\right)=\left|\begin{array}{ccc} \frac{x}{\sqrt{x^{2}+y^{2}+z^{2}}} & \frac{y}{\sqrt{x^{2}+y^{2}+z^{2}}} & \frac{z}{\sqrt{x^{2}+y^{2}+z^{2}}}\\ \frac{x/\left(z\sqrt{x^{2}+y^{2}}\right)}{1+\left(x^{2}+y^{2}\right)/z^{2}} & \frac{y/\left(z\sqrt{x^{2}+y^{2}}\right)}{1+\left(x^{2}+y^{2}\right)/z^{2}} & \frac{-\sqrt{x^{2}+y^{2}}/z^{2}}{1+\left(x^{2}+y^{2}\right)/z^{2}}\\ \frac{-y/x^{2}}{1+\left(y/x\right)^{2}} & \frac{1/x}{1+\left(y/x\right)^{2}} & 0 \end{array}\right| \ \ \ \ \ (44)

Converting back to spherical coordinates proves a bit easier. Substituting the above transformation equations, along with

\displaystyle  r^{2}\sin^{2}\theta=x^{2}+y^{2} \ \ \ \ \ (45)

helps to simplify things.

\displaystyle  J\left(x,y,z\right)=\left|\begin{array}{ccc} \frac{x}{r} & \frac{y}{r} & \frac{z}{r}\\ \frac{xz}{r^{3}\sin\theta} & \frac{yz}{r^{3}\sin\theta} & \frac{-\sin\theta}{r}\\ \frac{-y}{r^{2}\sin^{2}\theta} & \frac{x}{r^{2}\sin^{2}\theta} & 0 \end{array}\right| \ \ \ \ \ (46)

The determinant now comes out to

\displaystyle   J\left(x,y,z\right) \displaystyle  = \displaystyle  \frac{-y}{r^{2}\sin^{2}\theta}\left(\frac{-\sin\theta}{r}\frac{y}{r}-\frac{z}{r}\frac{yz}{r^{3}\sin\theta}\right)-\frac{x}{r^{2}\sin^{2}\theta}\left(\frac{-\sin\theta}{r}\frac{x}{r}-\frac{z}{r}\frac{xz}{r^{3}\sin\theta}\right)\ \ \ \ \ (47)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{r^{4}\sin^{2}\theta}\left(y^{2}\left(\sin\theta+\frac{z^{2}}{r^{2}\sin\theta}\right)+\left(x^{2}\left(\sin\theta+\frac{z^{2}}{r^{2}\sin\theta}\right)\right)\right)\ \ \ \ \ (48)
\displaystyle  \displaystyle  = \displaystyle  \frac{x^{2}+y^{2}}{r^{4}\sin^{2}\theta}\left(\sin\theta+\frac{z^{2}}{r^{2}\sin\theta}\right)\ \ \ \ \ (49)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{r^{2}}\left(\sin\theta+\frac{z^{2}}{r^{2}\sin\theta}\right)\ \ \ \ \ (50)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{r^{2}}\left(\frac{r^{2}\sin^{2}\theta+z^{2}}{r^{2}\sin\theta}\right)\ \ \ \ \ (51)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{r^{2}}\left(\frac{x^{2}+y^{2}+z^{2}}{r^{2}\sin\theta}\right)\ \ \ \ \ (52)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{r^{2}\sin\theta} \ \ \ \ \ (53)

6 thoughts on “Coordinate transformations – the Jacobian determinant

  1. Pingback: Contravariant tensors « Physics tutorials

  2. Pingback: Covariant and mixed tensors « Physics tutorials

  3. Pingback: Manifolds, the Jacobian matrix and coordinate transformations | Physics pages

  4. Pingback: Metric tensor for a non-orthogonal coordinate system | Physics pages

  5. Tue Le

    You said that proving that the Jacobian determinant of an inverse transformation is the reciprocal of the Jacobian determinant of the original matrix would take too long. I think there might be an easier explanation. Since all we are doing is changing variables, the process must be reversible. Therefore, the Jacobian determinant must be non-zero. Since the determinant of the inverse of a matrix is equal to the reciprocal of the determinant of that matrix, the claim immediately follows.

    Reply
  6. Pingback: Noether’s theorem and conservation laws | Physics pages

Leave a Reply

Your email address will not be published. Required fields are marked *