Ingeometry, theline element orlength element can be informally thought of as a line segment associated with aninfinitesimaldisplacement vector in ametric space. The length of the line element, which may be thought of as a differentialarc length, is a function of themetric tensor and is denoted by.
Line elements are used inphysics, especially in theories ofgravitation (most notablygeneral relativity) wherespacetime is modelled as a curvedpseudo-Riemannian manifold with an appropriatemetric tensor.[1]
Thecoordinate-independent definition of the square of the line elementds in ann-dimensionalRiemannian orpseudo-Riemannian manifold (in physics usually aLorentzian manifold) is the "square of the length" of an infinitesimal displacement[2] (in pseudo-Riemannian manifolds possibly negative) whose square root should be used for computing curve length: whereg is themetric tensor,· denotesinner product, anddq aninfinitesimaldisplacement on the (pseudo) Riemannian manifold. By parametrizing a curve, we can define thearc length of the curve length of the curve between, and as theintegral:[3]
To compute a sensible length of curves in pseudo Riemannian manifolds, it is best to assume that the infinitesimal displacements have the same sign everywhere. E.g. in physics the square of a line element along a timeline curve would (in the signature convention) be negative and the negative square root of the square of the line element along the curve would measure the proper time passing for an observer moving along the curve.From this point of view, the metric also defines in addition to line element thesurface andvolume elements etc.
Since is an arbitrary "square of the arc length", completely defines the metric, and it is therefore usually best to consider the expression for as a definition of the metric tensor itself, written in a suggestive but non tensorial notation: This identification of the square of arc length with the metric is even more easy to see inn-dimensional generalcurvilinear coordinatesq = (q1,q2,q3, ...,qn), where it is written as a symmetric rank 2 tensor[3][4] coinciding with the metric tensor:
Here theindicesi andj take values 1, 2, 3, ...,n andEinstein summation convention is used. Common examples of (pseudo-) Riemannian spaces includethree-dimensionalspace (no inclusion oftime coordinates), and indeedfour-dimensionalspacetime.

Following are examples of how the line elements are found from the metric.
The simplest line element is inCartesian coordinates - in which case the metric tensor is just theKronecker delta:(herei, j = 1, 2, 3 for space) or inmatrix form (i denotes row,j denotes column):
The general curvilinear coordinates reduce to Cartesian coordinates:so
For allorthogonal coordinates the metric tensor is given by:[3]where
fori = 1, 2, 3 arescale factors, so the square of the line element is:
Some examples of line elements in these coordinates are below.[2]
| Coordinate system | (q1,q2,q3) | Metric tensor | Line element |
|---|---|---|---|
| Cartesian | (x,y,z) | ||
| Plane polars | (r,θ) | ||
| Spherical polars | (r,θ,φ) | ||
| Cylindrical polars | (r,φ,z) |
Given an arbitrary basis of a space of dimension, the metric is defined as the inner product of the basis vectors.
Where and the inner product is with respect to the ambient space (usually its)
In a coordinate basis
The coordinate basis is a special type of basis that is regularly used in differential geometry.
TheMinkowski metric is:[5][1]where one sign or the other is chosen, both conventions are used. This applies only forflat spacetime. The coordinates are given by the4-position:
so the line element is:
InSchwarzschild coordinates coordinates are, being the general metric of the form:
(note the similitudes with the metric in 3D spherical polar coordinates).
so the line element is:
The coordinate-independent definition of the square of the line element ds inspacetime is:[1]
In terms of coordinates:where for this case the indicesα andβ run over 0, 1, 2, 3 for spacetime.
This is thespacetime interval - the measure of separation between two arbitrarily closeevents inspacetime. Inspecial relativity it is invariant underLorentz transformations. Ingeneral relativity it is invariant under arbitraryinvertibledifferentiablecoordinate transformations.