Tensors in curvilinear coordinates

Curvilinear coordinates can be formulated in tensor calculus, with important applications in physics and engineering, particularly for describing transportation of physical quantities and deformation of matter in fluid mechanics and continuum mechanics.

Vector and tensor algebra in three-dimensional curvilinear coordinates
Elementary vector and tensor algebra in curvilinear coordinates is used in some of the older scientific literature in mechanics and physics and can be indispensable to understanding work from the early and mid 1900s, for example the text by Green and Zerna. Some useful relations in the algebra of vectors and second-order tensors in curvilinear coordinates are given in this section. The notation and contents are primarily from Ogden, Naghdi, Simmonds, Green and Zerna, Basar and Weichert, and Ciarlet.

Coordinate transformations
Consider two coordinate systems with coordinate variables $$(Z^1, Z^2 ,Z^3 )$$ and $$(Z^\acute{1} , Z^\acute{2} ,Z^\acute{3} )$$, which we shall represent in short as just $$Z^i $$ and $$Z^\acute{i}$$ respectively and always assume our index $$i$$ runs from 1 through 3. We shall assume that these coordinates systems are embedded in the three-dimensional euclidean space. Coordinates $$Z^i $$ and $$Z^\acute{i}$$ may be used to explain each other, because as we move along the coordinate line in one coordinate system we can use the other to describe our position. In this way Coordinates $$Z^i $$ and $$Z^\acute{i}$$ are functions of each other

$$Z^i= f^{i}(Z^\acute{1}, Z^\acute{2} ,Z^\acute{3} ) $$ for $$i=1,2,3 $$

which can be written as

$$Z^i= Z^{i}(Z^\acute{1}, Z^\acute{2} ,Z^\acute{3} )= Z^{i}(Z^\acute{i}) $$ for $$\acute{i},i=1,2,3 $$

These three equations together are also called a coordinate transformation from $$Z^\acute{i}$$ to $$Z^i $$.Let us denote this transformation by $$T $$. We will therefore represent the transformation from the coordinate system with coordinate variables $$Z^\acute{i}$$ to the coordinate system with coordinates $$Z^i $$ as:

$$Z= T(\acute{z}) $$

Similarly we can represent $$Z^\acute{i}$$ as a function of $$Z^i $$ as follows:

$$Z^\acute{i}= g^{\acute{i}}(Z^{1}, Z^{2} ,Z^{3} ) $$ for $$\acute{i}=1,2,3 $$

similarly we can write the free equations more compactly as

$$Z^\acute{i}= Z^\acute{i}(Z^{1}, Z^{2} ,Z^{3} )= Z^\acute{i}(Z^{i}) $$ for $$\acute{i},i=1,2,3 $$

These three equations together are also called a coordinate transformation from $$Z^i $$ to $$Z^\acute{i}$$. Let us denote this transformation by $$S $$. We will represent the transformation from the coordinate system with coordinate variables $$Z^i $$ to the coordinate system with coordinates $$Z^\acute{i}$$ as:

$$\acute{z}= S(z) $$

If the transformation $$T $$ is bijective then we call the image of the transformation,namely $$Z^i $$, a set of admissible coordinates for $$Z^\acute{i}$$. If $$T $$ is linear the coordinate system $$Z^i $$ will be called an affine coordinate system ,otherwise $$Z^i $$ is called a curvilinear coordinate system

The Jacobian
As we now see that the Coordinates $$Z^i $$ and $$Z^\acute{i}$$ are functions of each other, we can take the derivative of the coordinate variable $$Z^i $$ with respect to the coordinate variable $$Z^\acute{i}$$

consider

$$\frac{\partial{Z^i} } {\partial{Z^\acute{i}} } \; \overset{\underset{\mathrm{def}}{}}{=} \; J_\acute{i}^i $$ for $$\acute{i},i = 1,2,3 $$, these derivatives can be arranged in a matrix, say $$J $$,in which $$J_\acute{i}^i $$ is the element in the $$i$$-th row and $$\acute{i} $$-th column

$$J = \begin{pmatrix} J_\acute{1}^{1} & J_\acute{2}^{1} & J_\acute{3}^{1} \\ J_\acute{1}^{2} & J_\acute{2}^{2}& J_\acute{3}^{2} \\ J_\acute{1}^{3}& J_\acute{2}^{3}& J_\acute{3}^{3}  \end{pmatrix} = \begin{pmatrix} {\partial{Z^1} \over \partial{Z^\acute{1}}} & {\partial{Z^1} \over \partial{Z^\acute{2}}} & {\partial{Z^1} \over \partial{Z^\acute{3}}}\\ {\partial{Z^2} \over \partial{Z^\acute{1}}} & {\partial{Z^2} \over \partial{Z^\acute{2}}} & {\partial{Z^2} \over \partial{Z^\acute{3}}}\\{\partial{Z^3} \over \partial{Z^\acute{1}}} & {\partial{Z^3} \over \partial{Z^\acute{2}}} & {\partial{Z^3} \over \partial{Z^\acute{3}}} \end{pmatrix}  $$

The resultant matrix is called the Jacobian matrix.

Vectors in curvilinear coordinates
Let (b1, b2, b3) be an arbitrary basis for three-dimensional Euclidean space. In general, the basis vectors are neither unit vectors nor mutually orthogonal. However, they are required to be linearly independent. Then a vector v can be expressed as $$ \mathbf{v} = v^k\,\mathbf{b}_k $$ The components vk are the contravariant components of the vector v.

The reciprocal basis (b1, b2, b3) is defined by the relation $$  \mathbf{b}^i\cdot\mathbf{b}_j = \delta^i_j $$ where δi j is the Kronecker delta.

The vector v can also be expressed in terms of the reciprocal basis: $$   \mathbf{v} = v_k~\mathbf{b}^k $$ The components vk are the covariant components of the vector $$\mathbf{v}$$.

Second-order tensors in curvilinear coordinates
A second-order tensor can be expressed as $$ \boldsymbol{S} = S^{ij}~\mathbf{b}_i\otimes\mathbf{b}_j = S^{i}_{~j}~\mathbf{b}_i\otimes\mathbf{b}^j = S_{i}^{~j}~\mathbf{b}^i\otimes\mathbf{b}_j = S_{ij}~\mathbf{b}^i\otimes\mathbf{b}^j $$ The components Sij are called the contravariant components, Si j the mixed right-covariant components, Si j the mixed left-covariant components, and Sij the covariant components of the second-order tensor.

Metric tensor and relations between components
The quantities gij, gij are defined as

$$   g_{ij} = \mathbf{b}_i \cdot \mathbf{b}_j = g_{ji} ~; g^{ij} = \mathbf{b}^i \cdot \mathbf{b}^j = g^{ji} $$ From the above equations we have $$  v^i = g^{ik}~v_k ~; v_i = g_{ik}~v^k ~; \mathbf{b}^i = g^{ij}~\mathbf{b}_j ~; \mathbf{b}_i = g_{ij}~\mathbf{b}^j $$

The components of a vector are related by $$ \mathbf{v}\cdot\mathbf{b}^i = v^k~\mathbf{b}_k\cdot\mathbf{b}^i = v^k~\delta^i_k = v^i $$ $$  \mathbf{v}\cdot\mathbf{b}_i = v_k~\mathbf{b}^k\cdot\mathbf{b}_i = v_k~\delta_i^k = v_i $$ Also, $$  \mathbf{v}\cdot\mathbf{b}_i = v^k~\mathbf{b}_k\cdot\mathbf{b}_i = g_{ki}~v^k $$ $$  \mathbf{v}\cdot\mathbf{b}^i = v_k~\mathbf{b}^k\cdot\mathbf{b}^i = g^{ki}~v_k $$

The components of the second-order tensor are related by $$ S^{ij} = g^{ik}~S_k^{~j} = g^{jk}~S^i_{~k} = g^{ik}~g^{jl}~S_{kl} $$

The alternating tensor
In an orthonormal right-handed basis, the third-order alternating tensor is defined as $$ \boldsymbol{\mathcal{E}} = \varepsilon_{ijk}~\mathbf{e}^i\otimes\mathbf{e}^j\otimes\mathbf{e}^k $$ In a general curvilinear basis the same tensor may be expressed as $$ \boldsymbol{\mathcal{E}} = \mathcal{E}_{ijk}~\mathbf{b}^i\otimes\mathbf{b}^j\otimes\mathbf{b}^k = \mathcal{E}^{ijk}~\mathbf{b}_i\otimes\mathbf{b}_j\otimes\mathbf{b}_k $$ It can be shown that $$ \mathcal{E}_{ijk} = \left[\mathbf{b}_i,\mathbf{b}_j,\mathbf{b}_k\right] =(\mathbf{b}_i\times\mathbf{b}_j)\cdot\mathbf{b}_k ~; \mathcal{E}^{ijk} = \left[\mathbf{b}^i,\mathbf{b}^j,\mathbf{b}^k\right] $$ Now, $$ \mathbf{b}_i\times\mathbf{b}_j = J~\varepsilon_{ijp}~\mathbf{b}^p = \sqrt{g}~\varepsilon_{ijp}~\mathbf{b}^p $$ Hence, $$ \mathcal{E}_{ijk} = J~\varepsilon_{ijk} = \sqrt{g}~\varepsilon_{ijk} $$ Similarly, we can show that $$ \mathcal{E}^{ijk} = \cfrac{1}{J}~\varepsilon^{ijk} = \cfrac{1}{\sqrt{g}}~\varepsilon^{ijk} $$

Identity map
The identity map I defined by $$\mathbf{I}\cdot\mathbf{v} = \mathbf{v}$$ can be shown to be:

$$\mathbf{I} = g^{ij}\mathbf{b}_i\otimes\mathbf{b}_j = g_{ij}\mathbf{b}^i\otimes\mathbf{b}^j = \mathbf{b}_i\otimes\mathbf{b}^i = \mathbf{b}^i\otimes\mathbf{b}_i$$

Scalar (dot) product
The scalar product of two vectors in curvilinear coordinates is

$$\mathbf{u}\cdot\mathbf{v} = u^i v_i = u_i v^i = g_{ij} u^i v^j = g^{ij} u_i v_j$$

Vector (cross) product
The cross product of two vectors is given by:

$$\mathbf{u}\times\mathbf{v} = \varepsilon_{ijk}u_jv_k\mathbf{e}_i$$

where εijk is the permutation symbol and ei is a Cartesian basis vector. In curvilinear coordinates, the equivalent expression is:

$$\mathbf{u}\times\mathbf{v} =[(\mathbf{b}_m\times\mathbf{b}_n)\cdot\mathbf{b}_s] u^m v^n \mathbf{b}^s =\mathcal{E}_{smn} u^mv^n\mathbf{b}^s$$

where $$\mathcal{E}_{ijk}$$ is the third-order alternating tensor. The cross product of two vectors is given by:

$$\mathbf{u}\times\mathbf{v} = \varepsilon_{ijk}\hat{u}_j\hat{v}_k\mathbf{e}_i$$

where εijk is the permutation symbol and $$\mathbf{e}_i$$ is a Cartesian basis vector. Therefore,

$$\mathbf{e}_p\times\mathbf{e}_q = \varepsilon_{ipq}\mathbf{e}_i$$

and

$$\mathbf{b}_m\times\mathbf{b}_n = \frac{\partial \mathbf{x}}{\partial q^m}\times\frac{\partial \mathbf{x}}{\partial q^n} = \frac{\partial(x_p\mathbf{e}_p)}{\partial q^m}\times\frac{\partial(x_q\mathbf{e}_q)}{\partial q^n} = \frac{\partial x_p}{\partial q^m} \frac{\partial x_q}{\partial q^n} \mathbf{e}_p\times\mathbf{e}_q = \varepsilon_{ipq}\frac{\partial x_p}{\partial q^m}\frac{\partial x_q}{\partial q^n}\mathbf{e}_i.$$

Hence,

$$(\mathbf{b}_m\times\mathbf{b}_n)\cdot\mathbf{b}_s =\varepsilon_{ipq}\frac{\partial x_p}{\partial q^m}\frac{\partial x_q}{\partial q^n}\frac{\partial x_i}{\partial q^s}$$

Returning to the vector product and using the relations:

$$\hat{u}_j = \frac{\partial x_j}{\partial q^m}u^m, \quad \hat{v}_k = \frac{\partial x_k}{\partial q^n}v^n, \quad \mathbf{e}_i = \frac{\partial x_i}{\partial q^s}\mathbf{b}^s,$$

gives us:

$$\mathbf{u}\times\mathbf{v}=\varepsilon_{ijk} \hat{u}_j \hat{v}_k \mathbf{e}_i = \varepsilon_{ijk} \frac{\partial x_j}{\partial q^m} \frac{\partial x_k}{\partial q^n}\frac{\partial x_i}{\partial q^s} u^m v^n\mathbf{b}^s = [(\mathbf{b}_m \times \mathbf{b}_n) \cdot\mathbf{b}_s] u^m v^n \mathbf{b}^s= \mathcal{E}_{smn} u^m v^n\mathbf{b}^s$$

Identity map
The identity map $$\mathsf{I}$$ defined by $$\mathsf{I}\cdot\mathbf{v} = \mathbf{v}$$ can be shown to be

$$\mathsf{I} = g^{ij}\mathbf{b}_i\otimes\mathbf{b}_j = g_{ij}\mathbf{b}^i\otimes\mathbf{b}^j = \mathbf{b}_i\otimes\mathbf{b}^i = \mathbf{b}^i \otimes \mathbf{b}_i$$

Action of a second-order tensor on a vector
The action $$\mathbf{v} = \boldsymbol{S}\mathbf{u}$$ can be expressed in curvilinear coordinates as

$$v^i\mathbf{b}_i = S^{ij}u_j\mathbf{b}_i = S^i_{j}u^j\mathbf{b}_i;\qquad v_i\mathbf{b}^i = S_{ij}u^i\mathbf{b}^i = S_{i}^{j}u_j \mathbf{b}^i$$

Inner product of two second-order tensors
The inner product of two second-order tensors $$\boldsymbol{U} = \boldsymbol{S}\cdot\boldsymbol{T}$$ can be expressed in curvilinear coordinates as

$$U_{ij}\mathbf{b}^i\otimes\mathbf{b}^j = S_{ik}T^k_{.j} \mathbf{b}^i\otimes\mathbf{b}^j= S_i^{.k}T_{kj}\mathbf{b}^i\otimes\mathbf{b}^j$$

Alternatively,

$$\boldsymbol{U} = S^{ij}T^m_{.n}g_{jm}\mathbf{b}_i\otimes\mathbf{b}^n = S^i_{.m}T^m_{.n}\mathbf{b}_i\otimes\mathbf{b}^n= S^{ij}T_{jn} \mathbf{b}_i \otimes\mathbf{b}^n$$

Determinant of a second-order tensor
If $$\boldsymbol{S}$$ is a second-order tensor, then the determinant is defined by the relation

$$\left[\boldsymbol{S}\mathbf{u}, \boldsymbol{S}\mathbf{v}, \boldsymbol{S}\mathbf{w}\right] = \det\boldsymbol{S}\left[\mathbf{u}, \mathbf{v}, \mathbf{w}\right]$$

where $$\mathbf{u}, \mathbf{v}, \mathbf{w}$$ are arbitrary vectors and

$$\left[\mathbf{u},\mathbf{v},\mathbf{w}\right] := \mathbf{u}\cdot(\mathbf{v}\times\mathbf{w}).$$

Relations between curvilinear and Cartesian basis vectors
Let (e1, e2, e3) be the usual Cartesian basis vectors for the Euclidean space of interest and let $$ \mathbf{b}_i = \boldsymbol{F}\mathbf{e}_i $$ where Fi is a second-order transformation tensor that maps ei to bi. Then, $$ \mathbf{b}_i\otimes\mathbf{e}_i = (\boldsymbol{F}\mathbf{e}_i)\otimes\mathbf{e}_i = \boldsymbol{F}(\mathbf{e}_i\otimes\mathbf{e}_i) = \boldsymbol{F}~. $$ From this relation we can show that $$  \mathbf{b}^i = \boldsymbol{F}^{-\rm{T}}\mathbf{e}^i ~; g^{ij} = [\boldsymbol{F}^{-\rm{1}}\boldsymbol{F}^{-\rm{T}}]_{ij} ~; g_{ij} = [g^{ij}]^{-1} = [\boldsymbol{F}^{\rm{T}}\boldsymbol{F}]_{ij} $$ Let $$J := \det\boldsymbol{F}$$ be the Jacobian of the transformation. Then, from the definition of the determinant, $$ \left[\mathbf{b}_1,\mathbf{b}_2,\mathbf{b}_3\right] = \det\boldsymbol{F}\left[\mathbf{e}_1,\mathbf{e}_2,\mathbf{e}_3\right] ~. $$ Since $$ \left[\mathbf{e}_1,\mathbf{e}_2,\mathbf{e}_3\right] = 1 $$ we have $$ J = \det\boldsymbol{F} = \left[\mathbf{b}_1,\mathbf{b}_2,\mathbf{b}_3\right] = \mathbf{b}_1\cdot(\mathbf{b}_2\times\mathbf{b}_3) $$ A number of interesting results can be derived using the above relations.

First, consider $$  g := \det[g_{ij}] $$ Then $$  g = \det[\boldsymbol{F}^{\rm{T}}]\cdot\det[\boldsymbol{F}] = J\cdot J = J^2 $$ Similarly, we can show that $$  \det[g^{ij}] = \cfrac{1}{J^2} $$ Therefore, using the fact that $$[g^{ij}] = [g_{ij}]^{-1}$$, $$  \cfrac{\partial g}{\partial g_{ij}} = 2~J~\cfrac{\partial J}{\partial g_{ij}} = g~g^{ij} $$

Another interesting relation is derived below. Recall that $$ \mathbf{b}^i\cdot\mathbf{b}_j = \delta^i_j \quad \Rightarrow \quad \mathbf{b}^1\cdot\mathbf{b}_1 = 1,~\mathbf{b}^1\cdot\mathbf{b}_2=\mathbf{b}^1\cdot\mathbf{b}_3=0 \quad \Rightarrow \quad \mathbf{b}^1 = A~(\mathbf{b}_2\times\mathbf{b}_3) $$ where A is a, yet undetermined, constant. Then $$ \mathbf{b}^1\cdot\mathbf{b}_1 =  A~\mathbf{b}_1\cdot(\mathbf{b}_2\times\mathbf{b}_3) = AJ = 1 \quad \Rightarrow \quad A = \cfrac{1}{J} $$ This observation leads to the relations $$ \mathbf{b}^1 = \cfrac{1}{J}(\mathbf{b}_2\times\mathbf{b}_3) ~; \mathbf{b}^2 = \cfrac{1}{J}(\mathbf{b}_3\times\mathbf{b}_1) ~; \mathbf{b}^3 = \cfrac{1}{J}(\mathbf{b}_1\times\mathbf{b}_2) $$ In index notation, $$ \varepsilon_{ijk}~\mathbf{b}^k = \cfrac{1}{J}(\mathbf{b}_i\times\mathbf{b}_j) = \cfrac{1}{\sqrt{g}}(\mathbf{b}_i\times\mathbf{b}_j) $$ where $$\varepsilon_{ijk}$$ is the usual permutation symbol.

We have not identified an explicit expression for the transformation tensor F because an alternative form of the mapping between curvilinear and Cartesian bases is more useful. Assuming a sufficient degree of smoothness in the mapping (and a bit of abuse of notation), we have $$  \mathbf{b}_i = \cfrac{\partial\mathbf{x}}{\partial q^i} =  \cfrac{\partial\mathbf{x}}{\partial x_j}~\cfrac{\partial x_j}{\partial q^i} = \mathbf{e}_j~\cfrac{\partial x_j}{\partial q^i} $$ Similarly, $$ \mathbf{e}_i = \mathbf{b}_j~\cfrac{\partial q^j}{\partial x_i} $$ From these results we have $$ \mathbf{e}^k\cdot\mathbf{b}_i = \frac{\partial x_k}{\partial q^i} \quad \Rightarrow \quad \frac{\partial x_k}{\partial q^i}~\mathbf{b}^i = \mathbf{e}^k\cdot(\mathbf{b}_i\otimes\mathbf{b}^i) = \mathbf{e}^k $$ and $$ \mathbf{b}^k = \frac{\partial q^k}{\partial x_i}~\mathbf{e}^i $$

Vector and tensor calculus in three-dimensional curvilinear coordinates
Simmonds, in his book on tensor analysis, quotes Albert Einstein saying

"The magic of this theory will hardly fail to impose itself on anybody who has truly understood it; it represents a genuine triumph of the method of absolute differential calculus, founded by Gauss, Riemann, Ricci, and Levi-Civita."

Vector and tensor calculus in general curvilinear coordinates is used in tensor analysis on four-dimensional curvilinear manifolds in general relativity, in the mechanics of curved shells, in examining the invariance properties of Maxwell's equations which has been of interest in metamaterials and in many other fields.

Some useful relations in the calculus of vectors and second-order tensors in curvilinear coordinates are given in this section. The notation and contents are primarily from Ogden, Simmonds, Green and Zerna, Basar and Weichert, and Ciarlet.

Basic definitions
Let the position of a point in space be characterized by three coordinate variables $$(q^1, q^2, q^3)$$.

The coordinate curve q1 represents a curve on which q2, q3 are constant. Let x be the position vector of the point relative to some origin. Then, assuming that such a mapping and its inverse exist and are continuous, we can write $$  \mathbf{x} = \boldsymbol{\varphi}(q^1, q^2, q^3) ~; q^i = \psi^i(\mathbf{x}) = [\boldsymbol{\varphi}^{-1}(\mathbf{x})]^i $$ The fields ψi(x) are called the curvilinear coordinate functions of the curvilinear coordinate system ψ(x) = φ−1(x).

The qi coordinate curves are defined by the one-parameter family of functions given by $$ \mathbf{x}_i(\alpha) = \boldsymbol{\varphi}(\alpha, q^j, q^k) ~, i\ne j \ne k $$ with qj, qk fixed.

Tangent vector to coordinate curves
The tangent vector to the curve xi at the point xi(α) (or to the coordinate curve qi at the point x) is $$ \cfrac{\rm{d}\mathbf{x}_i}{\rm{d}\alpha} \equiv \cfrac{\partial\mathbf{x}}{\partial q^i} $$

Scalar field
Let f(x) be a scalar field in space. Then $$  f(\mathbf{x}) = f[\boldsymbol{\varphi}(q^1,q^2,q^3)] = f_\varphi(q^1,q^2,q^3) $$ The gradient of the field f is defined by $$ [\boldsymbol{\nabla}f(\mathbf{x})]\cdot\mathbf{c} = \cfrac{\rm{d}}{\rm{d}\alpha} f(\mathbf{x}+\alpha\mathbf{c})\biggr|_{\alpha=0} $$ where c is an arbitrary constant vector. If we define the components ci of c are such that $$  q^i + \alpha~c^i = \psi^i(\mathbf{x} + \alpha~\mathbf{c}) $$ then $$  [\boldsymbol{\nabla}f(\mathbf{x})]\cdot\mathbf{c} = \cfrac{\rm{d}}{\rm{d}\alpha} f_\varphi(q^1 + \alpha~c^1, q^2 + \alpha~c^2, q^3 + \alpha~c^3)\biggr|_{\alpha=0} = \cfrac{\partial f_\varphi}{\partial q^i}~c^i = \cfrac{\partial f}{\partial q^i}~c^i $$

If we set $$f(\mathbf{x}) = \psi^i(\mathbf{x})$$, then since $$q^i = \psi^i(\mathbf{x})$$, we have $$  [\boldsymbol{\nabla}\psi^i(\mathbf{x})]\cdot\mathbf{c} = \cfrac{\partial \psi^i}{\partial q^j}~c^j = c^i $$ which provides a means of extracting the contravariant component of a vector c.

If bi is the covariant (or natural) basis at a point, and if bi is the contravariant (or reciprocal) basis at that point, then $$  [\boldsymbol{\nabla}f(\mathbf{x})]\cdot\mathbf{c} = \cfrac{\partial f}{\partial q^i}~c^i = \left(\cfrac{\partial f}{\partial q^i}~\mathbf{b}^i\right) \left(c^i~\mathbf{b}_i\right) \quad \Rightarrow \quad \boldsymbol{\nabla}f(\mathbf{x}) = \cfrac{\partial f}{\partial q^i}~\mathbf{b}^i $$ A brief rationale for this choice of basis is given in the next section.

Vector field
A similar process can be used to arrive at the gradient of a vector field f(x). The gradient is given by $$ [\boldsymbol{\nabla}\mathbf{f}(\mathbf{x})]\cdot\mathbf{c} = \cfrac{\partial \mathbf{f}}{\partial q^i}~c^i $$ If we consider the gradient of the position vector field r(x) = x, then we can show that $$  \mathbf{c} = \cfrac{\partial\mathbf{x}}{\partial q^i}~c^i = \mathbf{b}_i(\mathbf{x})~c^i ~; \mathbf{b}_i(\mathbf{x}) := \cfrac{\partial\mathbf{x}}{\partial q^i} $$ The vector field bi is tangent to the qi coordinate curve and forms a natural basis at each point on the curve. This basis, as discussed at the beginning of this article, is also called the covariant curvilinear basis. We can also define a reciprocal basis, or contravariant curvilinear basis, bi. All the algebraic relations between the basis vectors, as discussed in the section on tensor algebra, apply for the natural basis and its reciprocal at each point x.

Since c is arbitrary, we can write $$ \boldsymbol{\nabla}\mathbf{f}(\mathbf{x}) = \cfrac{\partial \mathbf{f}}{\partial q^i}\otimes\mathbf{b}^i $$

Note that the contravariant basis vector bi is perpendicular to the surface of constant ψi and is given by $$ \mathbf{b}^i = \boldsymbol{\nabla}\psi^i $$

Christoffel symbols of the first kind
The Christoffel symbols of the first kind are defined as $$ \mathbf{b}_{i,j} = \frac{\partial \mathbf{b}_i}{\partial q^j} := \Gamma_{ijk}~\mathbf{b}^k \quad \Rightarrow \quad \mathbf{b}_{i,j} \cdot \mathbf{b}_l = \Gamma_{ijl} $$ To express Γijk in terms of gij we note that $$  \begin{align} g_{ij,k} & = (\mathbf{b}_i\cdot\mathbf{b}_j)_{,k} = \mathbf{b}_{i,k}\cdot\mathbf{b}_j + \mathbf{b}_i\cdot\mathbf{b}_{j,k} = \Gamma_{ikj} + \Gamma_{jki}\\ g_{ik,j} & = (\mathbf{b}_i\cdot\mathbf{b}_k)_{,j} = \mathbf{b}_{i,j}\cdot\mathbf{b}_k + \mathbf{b}_i\cdot\mathbf{b}_{k,j} = \Gamma_{ijk} + \Gamma_{kji}\\ g_{jk,i} & = (\mathbf{b}_j\cdot\mathbf{b}_k)_{,i} = \mathbf{b}_{j,i}\cdot\mathbf{b}_k + \mathbf{b}_j\cdot\mathbf{b}_{k,i} = \Gamma_{jik} + \Gamma_{kij} \end{align} $$ Since bi,j = bj,i we have Γijk = Γjik. Using these to rearrange the above relations gives $$  \Gamma_{ijk} = \frac{1}{2}(g_{ik,j} + g_{jk,i} - g_{ij,k}) = \frac{1}{2}[(\mathbf{b}_i\cdot\mathbf{b}_k)_{,j} + (\mathbf{b}_j\cdot\mathbf{b}_k)_{,i} - (\mathbf{b}_i\cdot\mathbf{b}_j)_{,k}] $$

Christoffel symbols of the second kind
The Christoffel symbols of the second kind are defined as $$ \Gamma_{ij}^k = \Gamma_{ji}^k $$ in which

$$\cfrac{\partial \mathbf{b}_i}{\partial q^j} = \Gamma_{ij}^k~\mathbf{b}_k $$

This implies that $$  \Gamma_{ij}^k = \cfrac{\partial \mathbf{b}_i}{\partial q^j}\cdot\mathbf{b}^k = -\mathbf{b}_i\cdot\cfrac{\partial \mathbf{b}^k}{\partial q^j} $$ Other relations that follow are $$    \cfrac{\partial \mathbf{b}^i}{\partial q^j} = -\Gamma^i_{jk}~\mathbf{b}^k ~; \boldsymbol{\nabla}\mathbf{b}_i = \Gamma_{ij}^k~\mathbf{b}_k\otimes\mathbf{b}^j ~; \boldsymbol{\nabla}\mathbf{b}^i = -\Gamma_{jk}^i~\mathbf{b}^k\otimes\mathbf{b}^j $$

Another particularly useful relation, which shows that the Christoffel symbol depends only on the metric tensor and its derivatives, is $$ \Gamma^k_{ij} = \frac{g^{km}}{2}\left(\frac{\partial g_{mi}}{\partial q^j} + \frac{\partial g_{mj}}{\partial q^i} - \frac{\partial g_{ij}}{\partial q^m} \right) $$

Explicit expression for the gradient of a vector field
The following expressions for the gradient of a vector field in curvilinear coordinates are quite useful. $$  \begin{align} \boldsymbol{\nabla}\mathbf{v} & = \left[\cfrac{\partial v^i}{\partial q^k} + \Gamma^i_{lk}~v^l\right]~\mathbf{b}_i\otimes\mathbf{b}^k \\[8pt] & = \left[\cfrac{\partial v_i}{\partial q^k} - \Gamma^l_{ki}~v_l\right]~\mathbf{b}^i\otimes\mathbf{b}^k \end{align} $$

Representing a physical vector field
The vector field v can be represented as $$ \mathbf{v} = v_i~\mathbf{b}^i = \hat{v}_i~\hat{\mathbf{b}}^i $$ where $$v_i$$ are the covariant components of the field, $$\hat{v}_i$$ are the physical components, and (no summation) $$  \hat{\mathbf{b}}^i = \cfrac{\mathbf{b}^i}{\sqrt{g^{ii}}} $$ is the normalized contravariant basis vector.

Second-order tensor field
The gradient of a second order tensor field can similarly be expressed as $$ \boldsymbol{\nabla}\boldsymbol{S} = \frac{\partial \boldsymbol{S}}{\partial q^i}\otimes\mathbf{b}^i $$

Explicit expressions for the gradient
If we consider the expression for the tensor in terms of a contravariant basis, then $$  \boldsymbol{\nabla}\boldsymbol{S} = \frac{\partial}{\partial q^k} [S_{ij}~\mathbf{b}^i\otimes\mathbf{b}^j]\otimes\mathbf{b}^k = \left[\frac{\partial S_{ij}}{\partial q^k} - \Gamma^l_{ki}~S_{lj} - \Gamma^l_{kj} ~S_{il}\right] ~\mathbf{b}^i \otimes\mathbf{b}^j \otimes \mathbf{b}^k $$ We may also write $$ \begin{align} \boldsymbol{\nabla}\boldsymbol{S} & = \left[\cfrac{\partial S^{ij}}{\partial q^k} + \Gamma^i_{kl} ~ S^{lj} + \Gamma^j_{kl} ~ S^{il}\right]~ \mathbf{b}_i\otimes\mathbf{b}_j\otimes\mathbf{b}^k \\[8pt] & = \left[\cfrac{\partial S^i_{~j}}{\partial q^k} + \Gamma^i_{kl}~S^l_{~j} - \Gamma^l_{kj}~S^i_{~l}\right]~\mathbf{b}_i\otimes\mathbf{b}^j\otimes\mathbf{b}^k \\[8pt] & = \left[\cfrac{\partial S_i^{~j}}{\partial q^k} - \Gamma^l_{ik}~S_l^{~j} + \Gamma^j_{kl}~S_i^{~l}\right]~\mathbf{b}^i\otimes\mathbf{b}_j\otimes\mathbf{b}^k \end{align} $$

Representing a physical second-order tensor field
The physical components of a second-order tensor field can be obtained by using a normalized contravariant basis, i.e., $$  \boldsymbol{S} = S_{ij}~\mathbf{b}^i\otimes\mathbf{b}^j = \hat{S}_{ij}~\hat{\mathbf{b}}^i\otimes\hat{\mathbf{b}}^j $$ where the hatted basis vectors have been normalized. This implies that (again no summation)

$$ \hat{S}_{ij} = S_{ij} ~ \sqrt{g^{ii}~g^{jj}} $$

Vector field
The divergence of a vector field ($$\mathbf{v}$$)is defined as $$ \operatorname{div}~\mathbf{v} = \boldsymbol{\nabla}\cdot\mathbf{v} = \text{tr}(\boldsymbol{\nabla}\mathbf{v}) $$ In terms of components with respect to a curvilinear basis $$  \boldsymbol{\nabla}\cdot\mathbf{v} = \cfrac{\partial v^i}{\partial q^i} + \Gamma^i_{\ell i}~v^\ell = \left[\cfrac{\partial v_i}{\partial q^j} - \Gamma^\ell_{ji}~v_\ell\right]~g^{ij} $$

An alternative equation for the divergence of a vector field is frequently used. To derive this relation recall that $$ \boldsymbol{\nabla} \cdot \mathbf{v} = \frac{\partial v^i}{\partial q^i} + \Gamma_{\ell i}^i~v^\ell $$ Now, $$ \Gamma_{\ell i}^i = \Gamma_{i\ell}^i = \cfrac{g^{mi}}{2}\left[\frac{\partial g_{im}}{\partial q^\ell} + \frac{\partial g_{\ell m}}{\partial q^i} - \frac{\partial g_{il}}{\partial q^m}\right] $$ Noting that, due to the symmetry of $$\boldsymbol{g}$$, $$ g^{mi}~\frac{\partial g_{\ell m}}{\partial q^i}  = g^{mi}~ \frac{\partial g_{i\ell}}{\partial q^m} $$ we have $$ \boldsymbol{\nabla} \cdot \mathbf{v} = \frac{\partial v^i}{\partial q^i} +  \cfrac{g^{mi}}{2}~\frac{\partial g_{im}}{\partial q^\ell}~v^\ell $$ Recall that if [gij] is the matrix whose components are gij, then the inverse of the matrix is $$[g_{ij}]^{-1} = [g^{ij}]$$. The inverse of the matrix is given by $$ [g^{ij}] = [g_{ij}]^{-1} = \cfrac{A^{ij}}{g} ~; g := \det([g_{ij}]) = \det\boldsymbol{g} $$ where Aij are the Cofactor matrix of the components gij. From matrix algebra we have $$ g = \det([g_{ij}]) = \sum_i g_{ij}~A^{ij} \quad \Rightarrow \quad \frac{\partial g}{\partial g_{ij}} = A^{ij} $$ Hence, $$  [g^{ij}] = \cfrac{1}{g}~\frac{\partial g}{\partial g_{ij}} $$ Plugging this relation into the expression for the divergence gives $$ \boldsymbol{\nabla} \cdot \mathbf{v} = \frac{\partial v^i}{\partial q^i} +  \cfrac{1}{2g}~\frac{\partial g}{\partial g_{mi}}~\frac{\partial g_{im}}{\partial q^\ell}~v^\ell = \frac{\partial v^i}{\partial q^i} +  \cfrac{1}{2g}~\frac{\partial g}{\partial q^\ell}~v^\ell $$ A little manipulation leads to the more compact form $$ \boldsymbol{\nabla} \cdot \mathbf{v} = \cfrac{1}{\sqrt{g}}~\frac{\partial }{\partial q^i}(v^i~\sqrt{g}) $$

Second-order tensor field
The divergence of a second-order tensor field is defined using $$  (\boldsymbol{\nabla}\cdot\boldsymbol{S})\cdot\mathbf{a} = \boldsymbol{\nabla}\cdot(\boldsymbol{S}\mathbf{a}) $$ where a is an arbitrary constant vector. In curvilinear coordinates, $$ \begin{align} \boldsymbol{\nabla}\cdot\boldsymbol{S} & = \left[\cfrac{\partial S_{ij}}{\partial q^k} - \Gamma^l_{ki}~S_{lj} - \Gamma^l_{kj}~S_{il}\right]~g^{ik}~\mathbf{b}^j \\[8pt] & = \left[\cfrac{\partial S^{ij}}{\partial q^i} + \Gamma^i_{il}~S^{lj} + \Gamma^j_{il}~S^{il}\right]~\mathbf{b}_j \\[8pt] & = \left[\cfrac{\partial S^i_{~j}}{\partial q^i} + \Gamma^i_{il}~S^l_{~j} - \Gamma^l_{ij}~S^i_{~l}\right]~\mathbf{b}^j \\[8pt] & = \left[\cfrac{\partial S_i^{~j}}{\partial q^k} - \Gamma^l_{ik}~S_l^{~j} + \Gamma^j_{kl}~S_i^{~l}\right]~g^{ik}~\mathbf{b}_j \end{align} $$

Scalar field
The Laplacian of a scalar field φ(x) is defined as $$ \nabla^2 \varphi := \boldsymbol{\nabla} \cdot (\boldsymbol{\nabla} \varphi) $$ Using the alternative expression for the divergence of a vector field gives us $$ \nabla^2 \varphi = \cfrac{1}{\sqrt{g}}~\frac{\partial }{\partial q^i}([\boldsymbol{\nabla} \varphi]^i~\sqrt{g}) $$ Now $$ \boldsymbol{\nabla} \varphi = \frac{\partial \varphi}{\partial q^l}~\mathbf{b}^l = g^{li}~\frac{\partial \varphi}{\partial q^l}~\mathbf{b}_i \quad \Rightarrow \quad [\boldsymbol{\nabla} \varphi]^i = g^{li}~\frac{\partial \varphi}{\partial q^l} $$ Therefore, $$ \nabla^2 \varphi =  \cfrac{1}{\sqrt{g}}~\frac{\partial }{\partial q^i}\left(g^{li}~\frac{\partial \varphi}{\partial q^l} ~\sqrt{g}\right) $$

Curl of a vector field
The curl of a vector field v in covariant curvilinear coordinates can be written as $$ \boldsymbol{\nabla}\times\mathbf{v} = \mathcal{E}^{rst} v_{s|r}~ \mathbf{b}_t $$ where $$  v_{s|r} = v_{s,r} - \Gamma^i_{sr}~v_i $$

Orthogonal curvilinear coordinates
Assume, for the purposes of this section, that the curvilinear coordinate system is orthogonal, i.e., $$ \mathbf{b}_i\cdot\mathbf{b}_j = \begin{cases} g_{ii} & \text{if } i = j \\ 0 & \text{if } i \ne j,  \end{cases} $$ or equivalently, $$ \mathbf{b}^i\cdot\mathbf{b}^j = \begin{cases} g^{ii} & \text{if } i = j \\ 0 & \text{if } i \ne j,  \end{cases} $$ where $$g^{ii} = g_{ii}^{-1}$$. As before, $$\mathbf{b}_i, \mathbf{b}_j$$ are covariant basis vectors and bi, bj are contravariant basis vectors. Also, let (e1, e2, e3) be a background, fixed, Cartesian basis. A list of orthogonal curvilinear coordinates is given below.

Metric tensor in orthogonal curvilinear coordinates
Let r(x) be the position vector of the point x with respect to the origin of the coordinate system. The notation can be simplified by noting that x = r(x). At each point we can construct a small line element dx. The square of the length of the line element is the scalar product dx • dx and is called the metric of the space. Recall that the space of interest is assumed to be Euclidean when we talk of curvilinear coordinates. Let us express the position vector in terms of the background, fixed, Cartesian basis, i.e., $$  \mathbf{x} = \sum_{i=1}^3 x_i~\mathbf{e}_i $$

Using the chain rule, we can then express dx in terms of three-dimensional orthogonal curvilinear coordinates (q1, q2, q3) as $$ \mathrm{d}\mathbf{x} = \sum_{i=1}^3 \sum_{j=1}^3 \left(\cfrac{\partial x_i}{\partial q^j}~\mathbf{e}_i\right)\mathrm{d}q^j $$ Therefore, the metric is given by $$ \mathrm{d}\mathbf{x}\cdot\mathrm{d}\mathbf{x} = \sum_{i=1}^3 \sum_{j=1}^3 \sum_{k=1}^3 \cfrac{\partial x_i}{\partial q^j}~\cfrac{\partial x_i}{\partial q^k}~\mathrm{d}q^j~\mathrm{d}q^k $$

The symmetric quantity $$ g_{ij}(q^i,q^j) = \sum_{k=1}^3 \cfrac{\partial x_k}{\partial q^i}~\cfrac{\partial x_k}{\partial q^j} = \mathbf{b}_i\cdot\mathbf{b}_j $$ is called the fundamental (or metric) tensor of the Euclidean space in curvilinear coordinates.

Note also that $$  g_{ij} = \cfrac{\partial\mathbf{x}}{\partial q^i}\cdot\cfrac{\partial\mathbf{x}}{\partial q^j} = \left(\sum_{k} h_{ki}~\mathbf{e}_k\right)\cdot\left(\sum_{m} h_{mj}~\mathbf{e}_m\right) = \sum_{k} h_{ki}~h_{kj} $$ where hij are the Lamé coefficients.

If we define the scale factors, hi, using $$  \mathbf{b}_i\cdot\mathbf{b}_i = g_{ii} = \sum_{k} h_{ki}^2 =: h_i^2 \quad \Rightarrow \quad \left|\cfrac{\partial\mathbf{x}}{\partial q^i}\right| = \left|\mathbf{b}_i\right| = \sqrt{g_{ii}} = h_i $$ we get a relation between the fundamental tensor and the Lamé coefficients.

Example: Polar coordinates
If we consider polar coordinates for R2, note that $$ (x, y)=(r \cos \theta, r \sin \theta) $$ (r, θ) are the curvilinear coordinates, and the Jacobian determinant of the transformation (r,θ) → (r cos θ, r sin θ) is r.

The orthogonal basis vectors are br = (cos θ, sin θ), bθ = (−r sin θ, r cos θ). The normalized basis vectors are er = (cos θ, sin θ), eθ = (−sin θ, cos θ) and the scale factors are hr = 1 and hθ= r. The fundamental tensor is g11 =1, g22 =r2, g12 = g21 =0.

Line and surface integrals
If we wish to use curvilinear coordinates for vector calculus calculations, adjustments need to be made in the calculation of line, surface and volume integrals. For simplicity, we again restrict the discussion to three dimensions and orthogonal curvilinear coordinates. However, the same arguments apply for $$n$$-dimensional problems though there are some additional terms in the expressions when the coordinate system is not orthogonal.

Line integrals
Normally in the calculation of line integrals we are interested in calculating $$ \int_C f \,ds = \int_a^b f(\mathbf{x}(t))\left|{\partial \mathbf{x} \over \partial t}\right|\; dt$$ where x(t) parametrizes C in Cartesian coordinates. In curvilinear coordinates, the term

$$ \left|{\partial \mathbf{x} \over \partial t}\right| = \left| \sum_{i=1}^3 {\partial \mathbf{x} \over \partial q^i}{\partial q^i \over \partial t}\right|$$

by the chain rule. And from the definition of the Lamé coefficients,

$$ {\partial \mathbf{x} \over \partial q^i} = \sum_{k} h_{ki}~ \mathbf{e}_{k} $$

and thus

$$ \begin{align} \left|{\partial \mathbf{x} \over \partial t}\right| & = \left| \sum_k\left(\sum_i h_{ki}~\cfrac{\partial q^i}{\partial t}\right)\mathbf{e}_k\right| \\[8pt] & = \sqrt{\sum_i\sum_j\sum_k h_{ki}~h_{kj}\cfrac{\partial q^i}{\partial t}\cfrac{\partial q^j}{\partial t}} = \sqrt{\sum_i\sum_j g_{ij}~\cfrac{\partial q^i}{\partial t}\cfrac{\partial q^j}{\partial t}} \end{align} $$

Now, since $$g_{ij} = 0$$ when $$ i \ne j $$, we have $$ \left|{\partial \mathbf{x} \over \partial t}\right| = \sqrt{\sum_i g_{ii}~\left(\cfrac{\partial q^i}{\partial t}\right)^2} = \sqrt{\sum_i h_{i}^2~\left(\cfrac{\partial q^i}{\partial t}\right)^2} $$ and we can proceed normally.

Surface integrals
Likewise, if we are interested in a surface integral, the relevant calculation, with the parameterization of the surface in Cartesian coordinates is: $$\int_S f \,dS = \iint_T f(\mathbf{x}(s, t)) \left|{\partial \mathbf{x} \over \partial s}\times {\partial \mathbf{x} \over \partial t}\right| \, ds \, dt$$ Again, in curvilinear coordinates, we have $$ \left|{\partial \mathbf{x} \over \partial s}\times {\partial \mathbf{x} \over \partial t}\right| = \left|\left(\sum_i {\partial \mathbf{x} \over \partial q^i}{\partial q^i \over \partial s}\right) \times \left(\sum_j {\partial \mathbf{x} \over \partial q^j}{\partial q^j \over \partial t}\right)\right| $$ and we make use of the definition of curvilinear coordinates again to yield $$ {\partial \mathbf{x} \over \partial q^i}{\partial q^i \over \partial s} = \sum_k \left(\sum_{i=1}^3 h_{ki}~{\partial q^i \over \partial s}\right) \mathbf{e}_k ~; {\partial \mathbf{x} \over \partial q^j}{\partial q^j \over \partial t} = \sum_m \left(\sum_{j=1}^3 h_{mj}~{\partial q^j \over \partial t}\right) \mathbf{e}_{m} $$

Therefore, $$ \begin{align} \left|{\partial \mathbf{x} \over \partial s}\times {\partial \mathbf{x} \over \partial t}\right| & = \left| \sum_k \sum_m \left(\sum_{i=1}^3 h_{ki}~{\partial q^i \over \partial s}\right)\left(\sum_{j=1}^3 h_{mj}~{\partial q^j \over \partial t}\right) \mathbf{e}_k\times\mathbf{e}_m \right| \\[8pt] & = \left|\sum_p \sum_k \sum_m \mathcal{E}_{kmp}\left(\sum_{i=1}^3 h_{ki}~{\partial q^i \over \partial s}\right)\left(\sum_{j=1}^3 h_{mj}~{\partial q^j \over \partial t}\right) \mathbf{e}_p \right| \end{align} $$ where $$\mathcal{E}$$ is the permutation symbol.

In determinant form, the cross product in terms of curvilinear coordinates will be: $$\begin{vmatrix} \mathbf{e}_1                   & \mathbf{e}_2                    & \mathbf{e}_3 \\ && \\ \sum_i h_{1i} {\partial q^i \over \partial s} & \sum_i h_{2i} {\partial q^i \over \partial s} & \sum_i h_{3i} {\partial q^i \over \partial s} \\ && \\ \sum_j h_{1j} {\partial q^j \over \partial t} & \sum_j h_{2j} {\partial q^j \over \partial t} & \sum_j h_{3j} {\partial q^j \over \partial t} \end{vmatrix}$$

Grad, curl, div, Laplacian
In orthogonal curvilinear coordinates of 3 dimensions, where $$       \mathbf{b}^i = \sum_k g^{ik}~\mathbf{b}_k ~; g^{ii} = \cfrac{1}{g_{ii}} = \cfrac{1}{h_i^2} $$ one can express the gradient of a scalar or vector field as $$ \nabla\varphi = \sum_{i} {\partial\varphi \over \partial q^i}~ \mathbf{b}^i = \sum_{i} \sum_j {\partial\varphi \over \partial q^i}~ g^{ij}~\mathbf{b}_j = \sum_i \cfrac{1}{h_i^2}~{\partial f \over \partial q^i}~\mathbf{b}_i ~; \nabla\mathbf{v} = \sum_i \cfrac{1}{h_i^2}~{\partial \mathbf{v} \over \partial q^i}\otimes\mathbf{b}_i $$ For an orthogonal basis $$  g = g_{11}~g_{22}~g_{33} = h_1^2~h_2^2~h_3^2 \quad \Rightarrow \quad \sqrt{g} = h_1 h_2 h_3 $$ The divergence of a vector field can then be written as $$ \boldsymbol{\nabla} \cdot \mathbf{v} = \cfrac{1}{h_1 h_2 h_3}~\frac{\partial }{\partial q^i}(h_1 h_2 h_3~v^i) $$ Also, $$ v^i = g^{ik}~v_k \quad \Rightarrow v^1 = g^{11}~v_1 = \cfrac{v_1}{h_1^2} ~; v^2 = g^{22}~v_2  = \cfrac{v_2}{h_2^2}~; v^3 = g^{33}~v_3 = \cfrac{v_3}{h_3^2} $$ Therefore, $$ \boldsymbol{\nabla} \cdot \mathbf{v} = \cfrac{1}{h_1 h_2 h_3}~\sum_i \frac{\partial }{\partial q^i}\left(\cfrac{h_1 h_2 h_3}{h_i^2}~v_i\right) $$ We can get an expression for the Laplacian in a similar manner by noting that $$ g^{li}~\frac{\partial \varphi}{\partial q^l} = \left\{ g^{11}~\frac{\partial \varphi}{\partial q^1}, g^{22}~\frac{\partial \varphi}{\partial q^2}, g^{33}~\frac{\partial \varphi}{\partial q^3} \right\} = \left\{ \cfrac{1}{h_1^2}~\frac{\partial \varphi}{\partial q^1}, \cfrac{1}{h_2^2}~\frac{\partial \varphi}{\partial q^2}, \cfrac{1}{h_3^2}~\frac{\partial \varphi}{\partial q^3} \right\} $$ Then we have $$ \nabla^2 \varphi =  \cfrac{1}{h_1 h_2 h_3}~\sum_i\frac{\partial }{\partial q^i}\left(\cfrac{h_1 h_2 h_3}{h_i^2}~\frac{\partial \varphi}{\partial q^i}\right) $$ The expressions for the gradient, divergence, and Laplacian can be directly extended to n-dimensions.

The curl of a vector field is given by $$ \nabla\times\mathbf{v} = \frac{1}{h_1h_2h_3} \sum_{i=1}^n \mathbf{e}_i \sum_{jk} \varepsilon_{ijk} h_i \frac{\partial (h_k v_k)}{\partial q^j} $$ where εijk is the Levi-Civita symbol.

Example: Cylindrical polar coordinates
For cylindrical coordinates we have $$  (x_1, x_2, x_3) = \mathbf{x} = \boldsymbol{\varphi}(q^1, q^2, q^3) = \boldsymbol{\varphi}(r, \theta, z)     = \{r\cos\theta, r\sin\theta, z\} $$ and $$  \{\psi^1(\mathbf{x}), \psi^2(\mathbf{x}), \psi^3(\mathbf{x})\} = (q^1, q^2, q^3) \equiv (r, \theta, z)    = \{ \sqrt{x_1^2+x_2^2}, \tan^{-1}(x_2/x_1), x_3\} $$ where $$ 0 < r < \infty ~, 0 < \theta < 2\pi ~, -\infty < z < \infty $$

Then the covariant and contravariant basis vectors are $$ \begin{align} \mathbf{b}_1 & = \mathbf{e}_r = \mathbf{b}^1 \\ \mathbf{b}_2 & = r~\mathbf{e}_\theta = r^2~\mathbf{b}^2 \\ \mathbf{b}_3 & = \mathbf{e}_z = \mathbf{b}^3 \end{align} $$ where $$\mathbf{e}_r, \mathbf{e}_\theta, \mathbf{e}_z$$ are the unit vectors in the $$r, \theta, z$$ directions.

Note that the components of the metric tensor are such that $$   g^{ij} = g_{ij} = 0 (i \ne j) ~; \sqrt{g^{11}} = 1,~\sqrt{g^{22}} = \cfrac{1}{r},~\sqrt{g^{33}}=1 $$ which shows that the basis is orthogonal.

The non-zero components of the Christoffel symbol of the second kind are $$  \Gamma_{12}^2 = \Gamma_{21}^2 = \cfrac{1}{r} ~; \Gamma_{22}^1 = -r $$

Representing a physical vector field
The normalized contravariant basis vectors in cylindrical polar coordinates are $$  \hat{\mathbf{b}}^1 = \mathbf{e}_r ~;\hat{\mathbf{b}}^2 = \mathbf{e}_\theta ~;\hat{\mathbf{b}}^3 = \mathbf{e}_z $$ and the physical components of a vector v are $$  (\hat{v}_1, \hat{v}_2, \hat{v}_3) = (v_1, v_2/r, v_3) =: (v_r, v_\theta, v_z) $$

Gradient of a scalar field
The gradient of a scalar field, f(x), in cylindrical coordinates can now be computed from the general expression in curvilinear coordinates and has the form $$  \boldsymbol{\nabla}f = \cfrac{\partial f}{\partial r}~\mathbf{e}_r + \cfrac{1}{r}~\cfrac{\partial f}{\partial \theta}~\mathbf{e}_\theta +  \cfrac{\partial f}{\partial z}~\mathbf{e}_z $$

Gradient of a vector field
Similarly, the gradient of a vector field, v(x), in cylindrical coordinates can be shown to be $$ \begin{align} \boldsymbol{\nabla}\mathbf{v} & = \cfrac{\partial v_r}{\partial r}~\mathbf{e}_r\otimes\mathbf{e}_r + \cfrac{1}{r}\left(\cfrac{\partial v_r}{\partial \theta} - v_\theta\right)~\mathbf{e}_r\otimes\mathbf{e}_\theta + \cfrac{\partial v_r}{\partial z}~\mathbf{e}_r\otimes\mathbf{e}_z \\[8pt] & + \cfrac{\partial v_\theta}{\partial r}~\mathbf{e}_\theta\otimes\mathbf{e}_r + \cfrac{1}{r}\left(\cfrac{\partial v_\theta}{\partial \theta} + v_r \right)~\mathbf{e}_\theta\otimes\mathbf{e}_\theta + \cfrac{\partial v_\theta}{\partial z}~\mathbf{e}_\theta\otimes\mathbf{e}_z \\[8pt] & + \cfrac{\partial v_z}{\partial r}~\mathbf{e}_z\otimes\mathbf{e}_r + \cfrac{1}{r}\cfrac{\partial v_z}{\partial \theta}~\mathbf{e}_z\otimes\mathbf{e}_\theta + \cfrac{\partial v_z}{\partial z}~\mathbf{e}_z\otimes\mathbf{e}_z \end{align} $$

Divergence of a vector field
Using the equation for the divergence of a vector field in curvilinear coordinates, the divergence in cylindrical coordinates can be shown to be $$ \begin{align} \boldsymbol{\nabla}\cdot\mathbf{v} & = \cfrac{\partial v_r}{\partial r} + \cfrac{1}{r}\left(\cfrac{\partial v_\theta}{\partial \theta} + v_r \right) + \cfrac{\partial v_z}{\partial z}  \end{align} $$

Laplacian of a scalar field
The Laplacian is more easily computed by noting that $$\boldsymbol{\nabla}^2 f = \boldsymbol{\nabla}\cdot\boldsymbol{\nabla}f$$. In cylindrical polar coordinates $$ \mathbf{v} = \boldsymbol{\nabla}f = \left[v_r v_\theta v_z\right] = \left[\cfrac{\partial f}{\partial r}  \cfrac{1}{r}\cfrac{\partial f}{\partial \theta} \cfrac{\partial f}{\partial z} \right] $$ Hence, $$ \boldsymbol{\nabla}\cdot\mathbf{v} = \boldsymbol{\nabla}^2 f = \cfrac{\partial^2 f}{\partial r^2} + \cfrac{1}{r}\left(\cfrac{1}{r}\cfrac{\partial^2f}{\partial \theta^2} + \cfrac{\partial f}{\partial r} \right) + \cfrac{\partial^2 f}{\partial z^2} = \cfrac{1}{r}\left[\cfrac{\partial}{\partial r}\left(r\cfrac{\partial f}{\partial r}\right)\right] + \cfrac{1}{r^2}\cfrac{\partial^2f}{\partial \theta^2} + \cfrac{\partial^2 f}{\partial z^2} $$

Representing a physical second-order tensor field
The physical components of a second-order tensor field are those obtained when the tensor is expressed in terms of a normalized contravariant basis. In cylindrical polar coordinates these components are:

$$\begin{align} \hat{S}_{11} &= S_{11} =: S_{rr}, & \hat{S}_{12} &= \frac{S_{12}}{r} =: S_{r\theta}, & \hat{S}_{13} &= S_{13} =: S_{rz} \\[6pt] \hat{S}_{21} &= \frac{S_{21}}{r} =: S_{\theta r}, & \hat{S}_{22} &= \frac{S_{22}}{r^2} =: S_{\theta\theta}, & \hat{S}_{23} &= \frac{S_{23}}{r} =: S_{\theta z} \\[6pt] \hat{S}_{31} &= S_{31} =: S_{zr}, & \hat{S}_{32} &= \frac{S_{32}}{r} =: S_{z\theta}, & \hat{S}_{33} &= S_{33} =: S_{zz} \end{align}$$

Gradient of a second-order tensor field
Using the above definitions we can show that the gradient of a second-order tensor field in cylindrical polar coordinates can be expressed as $$ \begin{align} \boldsymbol{\nabla} \boldsymbol{S} & = \frac{\partial S_{rr}}{\partial r}~\mathbf{e}_r\otimes\mathbf{e}_r\otimes\mathbf{e}_r + \cfrac{1}{r}\left[\frac{\partial S_{rr}}{\partial \theta} - (S_{\theta r}+S_{r\theta})\right]~\mathbf{e}_r\otimes\mathbf{e}_r\otimes\mathbf{e}_\theta + \frac{\partial S_{rr}}{\partial z}~\mathbf{e}_r\otimes\mathbf{e}_r\otimes\mathbf{e}_z \\[8pt] & + \frac{\partial S_{r\theta}}{\partial r}~\mathbf{e}_r\otimes\mathbf{e}_\theta\otimes\mathbf{e}_r + \cfrac{1}{r}\left[\frac{\partial S_{r\theta}}{\partial \theta} + (S_{rr}-S_{\theta\theta})\right]~\mathbf{e}_r\otimes\mathbf{e}_\theta\otimes\mathbf{e}_\theta + \frac{\partial S_{r\theta}}{\partial z}~\mathbf{e}_r\otimes\mathbf{e}_\theta\otimes\mathbf{e}_z \\[8pt] & + \frac{\partial S_{rz}}{\partial r}~\mathbf{e}_r\otimes\mathbf{e}_z\otimes\mathbf{e}_r + \cfrac{1}{r}\left[\frac{\partial S_{rz}}{\partial \theta} -S_{\theta z}\right]~\mathbf{e}_r\otimes\mathbf{e}_z\otimes\mathbf{e}_\theta + \frac{\partial S_{rz}}{\partial z}~\mathbf{e}_r\otimes\mathbf{e}_z\otimes\mathbf{e}_z \\[8pt] & + \frac{\partial S_{\theta r}}{\partial r}~\mathbf{e}_\theta\otimes\mathbf{e}_r\otimes\mathbf{e}_r + \cfrac{1}{r}\left[\frac{\partial S_{\theta r}}{\partial \theta} + (S_{rr}-S_{\theta\theta})\right]~\mathbf{e}_\theta\otimes\mathbf{e}_r\otimes\mathbf{e}_\theta + \frac{\partial S_{\theta r}}{\partial z}~\mathbf{e}_\theta\otimes\mathbf{e}_r\otimes\mathbf{e}_z \\[8pt] & + \frac{\partial S_{\theta\theta}}{\partial r}~\mathbf{e}_\theta\otimes\mathbf{e}_\theta\otimes\mathbf{e}_r + \cfrac{1}{r}\left[\frac{\partial S_{\theta\theta}}{\partial \theta} + (S_{r\theta}+S_{\theta r})\right]~\mathbf{e}_\theta\otimes\mathbf{e}_\theta\otimes\mathbf{e}_\theta + \frac{\partial S_{\theta\theta}}{\partial z}~\mathbf{e}_\theta\otimes\mathbf{e}_\theta\otimes\mathbf{e}_z \\[8pt] & + \frac{\partial S_{\theta z}}{\partial r}~\mathbf{e}_\theta\otimes\mathbf{e}_z\otimes\mathbf{e}_r + \cfrac{1}{r}\left[\frac{\partial S_{\theta z}}{\partial \theta} + S_{rz}\right]~\mathbf{e}_\theta\otimes\mathbf{e}_z\otimes\mathbf{e}_\theta + \frac{\partial S_{\theta z}}{\partial z}~\mathbf{e}_\theta\otimes\mathbf{e}_z\otimes\mathbf{e}_z \\[8pt] & + \frac{\partial S_{zr}}{\partial r}~\mathbf{e}_z\otimes\mathbf{e}_r\otimes\mathbf{e}_r + \cfrac{1}{r}\left[\frac{\partial S_{zr}}{\partial \theta} - S_{z\theta}\right]~\mathbf{e}_z\otimes\mathbf{e}_r\otimes\mathbf{e}_\theta + \frac{\partial S_{zr}}{\partial z}~\mathbf{e}_z\otimes\mathbf{e}_r\otimes\mathbf{e}_z \\[8pt] & + \frac{\partial S_{z\theta}}{\partial r}~\mathbf{e}_z\otimes\mathbf{e}_\theta\otimes\mathbf{e}_r + \cfrac{1}{r}\left[\frac{\partial S_{z\theta}}{\partial \theta} + S_{zr}\right]~\mathbf{e}_z\otimes\mathbf{e}_\theta\otimes\mathbf{e}_\theta + \frac{\partial S_{z\theta}}{\partial z}~\mathbf{e}_z\otimes\mathbf{e}_\theta\otimes\mathbf{e}_z \\[8pt] & + \frac{\partial S_{zz}}{\partial r}~\mathbf{e}_z\otimes\mathbf{e}_z\otimes\mathbf{e}_r + \cfrac{1}{r}~\frac{\partial S_{zz}}{\partial \theta}~\mathbf{e}_z\otimes\mathbf{e}_z\otimes\mathbf{e}_\theta + \frac{\partial S_{zz}}{\partial z}~\mathbf{e}_z\otimes\mathbf{e}_z\otimes\mathbf{e}_z \end{align} $$

Divergence of a second-order tensor field
The divergence of a second-order tensor field in cylindrical polar coordinates can be obtained from the expression for the gradient by collecting terms where the scalar product of the two outer vectors in the dyadic products is nonzero. Therefore, $$ \begin{align} \boldsymbol{\nabla}\cdot \boldsymbol{S} & = \frac{\partial S_{rr}}{\partial r}~\mathbf{e}_r + \frac{\partial S_{r\theta}}{\partial r}~\mathbf{e}_\theta + \frac{\partial S_{rz}}{\partial r}~\mathbf{e}_z \\[8pt] & + \cfrac{1}{r}\left[\frac{\partial S_{r \theta}}{\partial \theta} + (S_{rr}-S_{\theta\theta})\right]~\mathbf{e}_r  + \cfrac{1}{r}\left[\frac{\partial S_{\theta\theta}}{\partial \theta} + (S_{r\theta}+S_{\theta r})\right]~\mathbf{e}_\theta  +\cfrac{1}{r}\left[\frac{\partial S_{\theta z}}{\partial \theta} + S_{rz}\right]~\mathbf{e}_z  \\[8pt] & + \frac{\partial S_{zr}}{\partial z}~\mathbf{e}_r + \frac{\partial S_{z\theta}}{\partial z}~\mathbf{e}_\theta + \frac{\partial S_{zz}}{\partial z}~\mathbf{e}_z \end{align} $$