In geometry, the line element or length element can be informally thought of as a line segment associated with an infinitesimal displacement vector in a metric space. The length of the line element, which may be thought of as a differential arc length, is a function of the metric tensor and is denoted by d s {\displaystyle ds} . Line elements are used in physics, especially in theories of gravitation (most notably general relativity) where spacetime is modelled as a curved pseudo-Riemannian manifold with an appropriate metric tensor.
General formulation
Definition of the line element and arc length The coordinate-independent definition of the square of the line element ds in an n-dimensional Riemannian or pseudo-Riemannian manifold (in physics usually a Lorentzian manifold) is the "square of the length" of an infinitesimal displacement d q {\displaystyle d\mathbf {q} } (in pseudo-Riemannian manifolds possibly negative) whose square root should be used for computing curve length:
d s 2 = d q ⋅ d q = g ( d q , d q ) {\displaystyle ds^{2}=d\mathbf {q} \cdot d\mathbf {q} =g(d\mathbf {q} ,d\mathbf {q} )} where g is the metric tensor, · denotes inner product, and dq an infinitesimal displacement on the (pseudo) Riemannian manifold. By parametrizing a curve q ( λ ) {\displaystyle \mathbf {q} (\lambda )} , we can define the arc length of the curve length of the curve between q 1 = q ( λ 1 ) {\displaystyle \mathbf {q} _{1}=\mathbf {q} (\lambda _{1})} , and q 2 = q ( λ 2 ) {\displaystyle \mathbf {q} _{2}=\mathbf {q} (\lambda _{2})} as the integral:
s = ∫ q 1 q 2 | d s 2 | = ∫ λ 1 λ 2 d λ | g ( d q d λ , d q d λ ) | = ∫ λ 1 λ 2 d λ | g i j d q i d λ d q j d λ | . {\displaystyle s=\int _{\mathbf {q} _{1}}^{\mathbf {q} _{2}}{\sqrt {\left|ds^{2}\right|}}=\int _{\lambda _{1}}^{\lambda _{2}}d\lambda {\sqrt {\left|g\left({\frac {d\mathbf {q} }{d\lambda }},{\frac {d\mathbf {q} }{d\lambda }}\right)\right|}}=\int _{\lambda _{1}}^{\lambda _{2}}d\lambda {\sqrt {\left|g_{ij}{\frac {dq^{i}}{d\lambda }}{\frac {dq^{j}}{d\lambda }}\right|}}.}
… excerpt ends here. Continue reading the full article.

