# How do I derive the volume element $dV = \sqrt{g} du^1 du^2 du^3$ in a 3D curvilinear coordinate system?

I am trying to derive $$dV = \sqrt{g} du^1 du^2 du^3$$ for some general curvilinear coordinate $$(u^1,u^2,u^3)$$ system in $$\mathbb{R}^3$$ where $$g = \mathrm{det}[g_{ij}]$$. I am using the following facts:

1. In my coordinate system there exists a reciprocal pair of bases at each point: $$\mathbf{e}_i = \frac{\partial \mathbf{r}}{\partial u^i }, \quad \mathbf{e}^i=\nabla u^i$$ such that $$\mathbf{e}_i\cdot \mathbf{e}^j = \delta^j_i$$.
2. Any vector $$\mathbf{a} \in \mathbb{R}^3$$ can be expanded as $$\mathbf{a}=a^i \mathbf{e}_i = a_i \mathbf{e}^i$$ and our contravariant and covariant components are given by $$a^i = \mathbf{a}\cdot \mathbf{e}^i$$ and $$a_i = \mathbf{a} \cdot \mathbf{e}_i$$ respectively.
3. The components of the metric tensor $$\mathbf{g}$$ in the basis $$\{ \mathbf{e}_i \}$$ are given by $$g_{ij} = \mathbf{e}_i \cdot \mathbf{e}_j$$.
4. For a matrix $$A$$, $$\mathrm{det}A = \varepsilon_{ijk}A_{i1}A_{j2}A_{k3}$$.

Okay, here we go:

$$dV = |\mathbf{e}_1 \cdot (\mathbf{e}_2 \times \mathbf{e}_3 ) |du^1 du^2 du^3 \\ =\varepsilon_{ijk}(\mathbf{e}_1)_i (\mathbf{e}_2)_j (\mathbf{e}_3)_k du^1 du^2 du^3$$

where $$(\mathbf{e}_i)_j$$ denotes the $$j$$th component of the vector $$\mathbf{e}_i$$. Well using fact numbers 2 and 3 from above, $$(\mathbf{e}_i)_j = \mathbf{e}_i \cdot \mathbf{e}_j =g_{ij}$$, so we get

$$dV = \varepsilon_{ijk} g_{1i} g_{2j} g_{3k} du^1 du^2 du^3 \\ = (\mathrm{det}g )du^1 du^2 du^3$$

where I have used the definition of the determinant from fact number 4. I have obviously done something wrong, where does the square root come from?

I worked out the problem myself so thought I'd post the answer:

My problem was that I assumed the triple product $$|\mathbf{e}_1 \cdot (\mathbf{e}_2 \times \mathbf{e}_3)| = \varepsilon_{ijk} (\mathbf{e}_1)_i (\mathbf{e}_2)_j (\mathbf{e}_3)_k$$ where $$i,j,k$$ are labelling the components w.r.t. the basis $$\{ \mathbf{e}_i \}$$. This is incorrect because I have assumed that the basis $$\{ \mathbf{e}_i \}$$ is orthonormal and the dot product and cross product are the same as they are in a Cartesian basis.

In order to get around this I must express $$\{ \mathbf{e}_i \}$$ in terms of the orthonormal Cartesian basis which I shall call $$\{ \mathbf{x}_a \}$$, where the indices $$a,b,c,\ldots$$ are used to label Cartesian components. We have

$$\mathbf{e}_i = \sum_a c_{ia} \mathbf{x}_a$$

so we have

$$dV = \varepsilon_{abc} (\mathbf{e}_1)_a (\mathbf{e}_2)_b (\mathbf{e}_3)_c du^1 du^2 du^3 \\ = \varepsilon_{abc}c_{1a}c_{2b}c_{3c}du^1 du^2 du^3 \\ = \mathrm{det}Cdu^1 du^2 du^3$$

where I have let $$C$$ be the matrix with the components $$C_{ia}$$. Consider the product $$CC^\mathrm{T}$$:

$$(CC^\mathrm{T})_{ij} = \sum_{k} c_{ik} c_{jk} \\ = \mathbf{e}_i \cdot \mathbf{e}_j \\ = g_{ij}$$

so $$CC^\mathrm{T} = g$$, and hence $$\mathrm{det}g=(\mathrm{det}C)^2$$, so substituting this result in the above expression for $$dV$$ I get

$$dV = \sqrt{g} du^1 du^2 du^3$$