# 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$
and 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 (b$_1$, b$_2$, b$_3$) 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$^{:27}$ $\mathbf {v} =v^{k}\,\mathbf {b} _{k}$ The components v$^k$ are the contravariant components of the vector v.
The reciprocal basis (b$^1$, b$^2$, b$^3$) is defined by the relation$^{:28–29}$ $\mathbf {b} ^{i}\cdot \mathbf {b} _{j}=\delta _{j}^{i}$ 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 v$_k$ 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_{~j}^{i}~\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 S$^{ij}$ are called the contravariant components, S$^i$ $_j$ the mixed right-covariant components, S$_i$ $^j$ the mixed left-covariant components, and S$_{ij}$ the covariant components of the second-order tensor.

#### Metric tensor and relations between components

The quantities g$_{ij}$, g$^{ij}$ are defined as$^{:39}$
$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$^{:30–32}$ $\mathbf {v} \cdot \mathbf {b} ^{i}=v^{k}~\mathbf {b} _{k}\cdot \mathbf {b} ^{i}=v^{k}~\delta _{k}^{i}=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_{~k}^{i}=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}$

### Vector operations
#### Identity map

The identity map I defined by $\mathbf {I} \cdot \mathbf {v} =\mathbf {v}$ can be shown to be:$^{:39}$
$\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$^{:32}$
$\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:$^{:32–34}$
$\mathbf {u} \times \mathbf {v} =\varepsilon _{ijk}u_{j}v_{k}\mathbf {e} _{i}$
where ε$_{ijk}$ is the permutation symbol and e$_i$ 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^{m}v^{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}$

### Tensor operations
#### Identity map

The identity map ${\mathsf {I}}$ defined by ${\mathsf {I}}\cdot \mathbf {v} =\mathbf {v}$ can be shown to be$^{:39}$
${\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_{j}^{i}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_{.j}^{k}\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_{.n}^{m}g_{jm}\mathbf {b} _{i}\otimes \mathbf {b} ^{n}=S_{.m}^{i}T_{.n}^{m}\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 (e$_1$, e$_2$, e$_3$) be the usual Cartesian basis vectors for the Euclidean space of interest and let $\mathbf {b} _{i}={\boldsymbol {F}}\mathbf {e} _{i}$ where F$_i$ is a second-order transformation tensor that maps e$_i$ to b$_i$. 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 _{j}^{i}\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 q$^1$ represents a curve on which q$^2$, q$^3$ 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$^{:55}$ $\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 q$^i$ 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\neq j\neq k$ with q$^j$, q$^k$ fixed.

### Tangent vector to coordinate curves

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

### Gradient
#### 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 c$^i$ 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 b$_i$ is the covariant (or natural) basis at a point, and if b$^i$ 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 b$_i$ is tangent to the q$^i$ 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, b$^i$. 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 b$^i$ 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 g$_{ij}$ we note that ${\begin{aligned}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{aligned}}$ Since b$_{i,j}$ = b$_{j,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 _{jk}^{i}~\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 _{ij}^{k}={\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{aligned}{\boldsymbol {\nabla }}\mathbf {v} &=\left[{\cfrac {\partial v^{i}}{\partial q^{k}}}+\Gamma _{lk}^{i}~v^{l}\right]~\mathbf {b} _{i}\otimes \mathbf {b} ^{k}\\[8pt]&=\left[{\cfrac {\partial v_{i}}{\partial q^{k}}}-\Gamma _{ki}^{l}~v_{l}\right]~\mathbf {b} ^{i}\otimes \mathbf {b} ^{k}\end{aligned}}$

#### 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 _{ki}^{l}~S_{lj}-\Gamma _{kj}^{l}~S_{il}\right]~\mathbf {b} ^{i}\otimes \mathbf {b} ^{j}\otimes \mathbf {b} ^{k}$ We may also write ${\begin{aligned}{\boldsymbol {\nabla }}{\boldsymbol {S}}&=\left[{\cfrac {\partial S^{ij}}{\partial q^{k}}}+\Gamma _{kl}^{i}~S^{lj}+\Gamma _{kl}^{j}~S^{il}\right]~\mathbf {b} _{i}\otimes \mathbf {b} _{j}\otimes \mathbf {b} ^{k}\\[8pt]&=\left[{\cfrac {\partial S_{~j}^{i}}{\partial q^{k}}}+\Gamma _{kl}^{i}~S_{~j}^{l}-\Gamma _{kj}^{l}~S_{~l}^{i}\right]~\mathbf {b} _{i}\otimes \mathbf {b} ^{j}\otimes \mathbf {b} ^{k}\\[8pt]&=\left[{\cfrac {\partial S_{i}^{~j}}{\partial q^{k}}}-\Gamma _{ik}^{l}~S_{l}^{~j}+\Gamma _{kl}^{j}~S_{i}^{~l}\right]~\mathbf {b} ^{i}\otimes \mathbf {b} _{j}\otimes \mathbf {b} ^{k}\end{aligned}}$

#### 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}}}$

### Divergence
#### 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 _{\ell i}^{i}~v^{\ell }=\left[{\cfrac {\partial v_{i}}{\partial q^{j}}}-\Gamma _{ji}^{\ell }~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 [g$_{ij}$] is the matrix whose components are g$_{ij}$, 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 A$^{ij}$ are the Cofactor matrix of the components g$_{ij}$. 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{aligned}{\boldsymbol {\nabla }}\cdot {\boldsymbol {S}}&=\left[{\cfrac {\partial S_{ij}}{\partial q^{k}}}-\Gamma _{ki}^{l}~S_{lj}-\Gamma _{kj}^{l}~S_{il}\right]~g^{ik}~\mathbf {b} ^{j}\\[8pt]&=\left[{\cfrac {\partial S^{ij}}{\partial q^{i}}}+\Gamma _{il}^{i}~S^{lj}+\Gamma _{il}^{j}~S^{il}\right]~\mathbf {b} _{j}\\[8pt]&=\left[{\cfrac {\partial S_{~j}^{i}}{\partial q^{i}}}+\Gamma _{il}^{i}~S_{~j}^{l}-\Gamma _{ij}^{l}~S_{~l}^{i}\right]~\mathbf {b} ^{j}\\[8pt]&=\left[{\cfrac {\partial S_{i}^{~j}}{\partial q^{k}}}-\Gamma _{ik}^{l}~S_{l}^{~j}+\Gamma _{kl}^{j}~S_{i}^{~l}\right]~g^{ik}~\mathbf {b} _{j}\end{aligned}}$

### Laplacian
#### 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 _{sr}^{i}~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\neq j,\end{cases}}$ or equivalently, $\mathbf {b} ^{i}\cdot \mathbf {b} ^{j}={\begin{cases}g^{ii}&{\text{if }}i=j\\0&{\text{if }}i\neq j,\end{cases}}$ where $g^{ii}=g_{ii}^{-1}$. As before, $\mathbf {b} _{i},\mathbf {b} _{j}$ are covariant basis vectors and b$^i$, b$^j$ are contravariant basis vectors. Also, let (e$^1$, e$^2$, e$^3$) 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 (q$^1$, q$^2$, q$^3$) 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 h$_{ij}$ are the Lamé coefficients.
If we define the scale factors, h$_i$, 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 R$^2$, 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 b$_r$ = (cos θ, sin θ), b$_θ$ = (−r sin θ, r cos θ). The normalized basis vectors are e$_r$ = (cos θ, sin θ), e$_θ$ = (−sin θ, cos θ) and the scale factors are h$_r$ = 1 and h$_θ$= r. The fundamental tensor is g$_{11}$ =1, g$_{22}$ =r$^2$, g$_{12}$ = g$_{21}$ =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{aligned}\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{aligned}}$
Now, since $g_{ij}=0$ when $i\neq 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{aligned}\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{aligned}}$ 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_{1}h_{2}h_{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{aligned}\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{aligned}}$ 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\neq 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{aligned}{\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{aligned}}$

### 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{aligned}{\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{aligned}}$

### 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 ^{2}f}{\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 ^{2}f}{\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{aligned}{\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{aligned}}$

### 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{aligned}{\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{aligned}}$

### 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{aligned}{\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{aligned}}$