## Fundamental elements in coordinates
Now we see some exact examples, for how metric tensors and basis defined in specific coordinates.
### Cartesians coordinates
From the definition, $\mathbf{Z}_i = \frac{\partial \mathbf{R}(\mathbf{Z})}{\partial {Z}^i}$, for any $h$, if define the vector $\mathbf{V}$,
$\mathbf{V} = \frac{\mathbf{R}(x+h, y, z) - \mathbf{R}(x, y, z)}{h}$
Then under the limit $\lim_{h \to 0}$, we have $\mathbf{V}$ being the Cartesian basis element $\mathbf{i}$. Under the same condition, the covariant basis $\mathbf{Z}_{i}$ would be
$\mathbf{Z}_1 = \mathbf{i}; \quad \mathbf{Z}_2 = \mathbf{j}; \quad \mathbf{Z}_3 = \mathbf{k}$
The metric tensor would have only diagonal terms,
$Z_{11} = Z_{22} = Z_{33} = 1$
also the contravariant metric tensor (easier way is to directly calculate the matrix inverse),
$Z^{11} = Z^{22} = Z^{33} = 1$
So the metric tensor in matrix form is
${Z}_{ij}, {Z}^{ij} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
and contravariant basis,
$Z^1 = \mathbf{i}; \quad Z^2 = \mathbf{j}; \quad Z^3 = \mathbf{k}$
The metric tensor is unchanged with points.
### Affine coordinates
Similarly, the covariant basis $\mathbf{Z}_{i}$ coincides with the coordinate basis $\mathbf{Z}_1 = \mathbf{i}; \quad \mathbf{Z}_2 = \mathbf{j}; \quad \mathbf{Z}_3 = \mathbf{k}$, so the metric tensor is not varying with points. The matrix form would be
$Z_{ij} = \begin{bmatrix} \mathbf{i} \cdot \mathbf{i} & \mathbf{i} \cdot \mathbf{j} & \mathbf{i} \cdot \mathbf{k} \\ \mathbf{j} \cdot \mathbf{i} & \mathbf{j} \cdot \mathbf{j} & \mathbf{j} \cdot \mathbf{k} \\ \mathbf{k} \cdot \mathbf{i} & \mathbf{k} \cdot \mathbf{j} & \mathbf{k} \cdot \mathbf{k} \end{bmatrix}$
The covariant metric tensor is only diagonal if the affine coordinate systems is orthogonal.
### Polar and cylindrical coordinates
Following the definition, select a vector $\mathbf{V}$ and calculate $\mathbf{V} = \frac{\mathbf{R}(r+h, \theta) - \mathbf{R}(r, \theta)}{h}$, and $\mathbf{V} = \frac{\mathbf{R}(r, \theta+h) - \mathbf{R}(r, \theta)}{h}$, one may see that the $\mathbf{Z}_{1}$ is pointing along the radial direction while $\mathbf{Z}_{2}$ is orthogonal to $\mathbf{Z}_{1}$. Writing with $\mathbf{i}$ and $\mathbf{j}$, we have
$\mathbf{Z}_{1}=\cos\theta\ \mathbf{i}+\sin \theta\ \mathbf{j}$
$\mathbf{Z}_{2}=-r\sin\theta\ \mathbf{i} +r\cos\theta\ \mathbf{j}$
We call a coordinate system without an orthogonal covariant basis *orthogonal*. The metric tensor for polar coordinate is
$Z_{ij} = \begin{bmatrix} 1 & 0 \\ 0 & r^2 \end{bmatrix}; \quad Z^{ij} = \begin{bmatrix} 1 & 0 \\ 0 & r^{-2} \end{bmatrix}$
For cylindrical coordinates, the $\mathbf{Z}_{3}$ is just $\mathbf{k}$, therefore,
$\mathbf{Z}_{1}=\cos\theta\, \mathbf{i}+\sin \theta\, \mathbf{j}$
$\mathbf{Z}_{2}=-r\sin\theta\, \mathbf{i} +r\cos\theta\, \mathbf{j}$
$\mathbf{Z}_{3}=\mathbf{k}$
The metric tensors are
$Z_{ij} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & r^2 & 0 \\ 0 & 0 & 1 \end{bmatrix}; \quad Z^{ij} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & r^{-2} & 0 \\ 0 & 0 & 1 \end{bmatrix}$
### Spherical coordinates
Here we directly present the results, for position vector,
$\mathbf{R}(r, \theta, \phi) = r \sin \theta \cos \phi \, \mathbf{i} + r \sin \theta \sin \phi \, \mathbf{j} + r \cos \theta \, \mathbf{k}$
we have covariant basis,
$\mathbf{Z}_1 = \sin \theta \cos \phi \, \mathbf{i} + \sin \theta \sin \phi \, \mathbf{j} + \cos \theta \, \mathbf{k}$
$\mathbf{Z}_2 = r \cos \theta \cos \phi \, \mathbf{i} + r \cos \theta \sin \phi \, \mathbf{j} - r \sin \theta \, \mathbf{k}$
$\mathbf{Z}_3 = -r \sin \theta \sin \phi \, \mathbf{i} + r \sin \theta \cos \phi \, \mathbf{j}$
Covariant and contravariant metric tensor,
$Z_{ij} = \begin{bmatrix} 1 & r^2 \\ r^2 \sin^2 \theta \end{bmatrix}; \quad Z^{ij} = \begin{bmatrix} 1 & r^{-2} \\ r^{-2} \sin^{-2} \theta \end{bmatrix}$
Contravariant basis
$\mathbf{Z}^1 = \sin \theta \cos \phi \, \mathbf{i} + \sin \theta \sin \phi \, \mathbf{j} + \cos \theta \, \mathbf{k}$
$\mathbf{Z}^2 = r^{-1} \cos \theta \cos \phi \, \mathbf{i} + r^{-1} \cos \theta \sin \phi \, \mathbf{j} - r^{-1} \sin \theta \, \mathbf{k}$
$\mathbf{Z}^3 = -r^{-1} \sin^{-1} \theta \sin \phi \, \mathbf{i} + r^{-1} \sin^{-1} \theta \cos \phi \, \mathbf{j}$
>[!Info]
>previous: [[Covariant and contravariant basis, matric tensors]]
>next: [[The Christoffel symbol]]