Metric tensor
The metric tensor (see also metric), conventionally notated as <math>G</math>, is a 2-dimensional tensor (making it a matrix once a basis is chosen), that is used to measure distance and angle in a Riemannian geometry. The notation <math>g_{ij}</math> is conventionally used for the components of the metric tensor (that is, the elements of the matrix). (In the following, we use the Einstein summation convention).
The length of a segment of a curve parameterized by t, from a to b, is defined as:
The angle between two tangent vectors, <math>U</math> and <math>V</math>, is defined as:
To compute the metric tensor from a set of equations relating the space to cartesian space (gij = δij: see Kronecker delta for more details), compute the jacobian of the set of equations, and multiply (outer product) the transpose of that jacobian by the jacobian.
Given a two-dimensional Euclidean metric tensor:
The length of a curve reduces to the familiar Calculus formula:
Polar coordinates: <math>(x^1, x^2)=(r, \theta)</math>
Cylindrical coordinates: <math>(x^1, x^2, x^3)=(r, \theta, z)</math>
Spherical coordinates: <math>(x^1, x^2, x^3)=(r, \phi, \theta)</math>
\cos \theta = \frac{g_{ij}U^iV^j}
{\sqrt{ \left| g_{ij}U^iU^j \right| \left| g_{ij}V^iV^j \right|}}
</math>
Example
Some basic Euclidean metrics