 Let formula_102 be a (pseudo-)Riemannian manifold, formula_103 a curve in formula_102 and formula_105 the (pseudo-) metric tensor.The length of formula_106 is defined to be

where formula_108 is the tangent vector of formula_106 at formula_110 The sign in the square root is chosen once for a given curve, to ensure that the square root is a real number.The positive sign is chosen for spacelike curves; in a pseudo-Riemannian manifold, the negative sign may be chosen for timelike curves.