The arc length of geodesics gives a way of measuring distance from the perspective of an ant or other flightless creature living on that surface. Effects of relativity In the theory of relativity, because of phenomena such as length contraction and the relativity of simultaneity, distances between objects depend on a choice of inertial frame of reference. On galactic and larger scales, the measurement of distance is also affected by the expansion of the universe. In practice, a number of distance measures are used in cosmology to quantify such distances. Other spatial distances Unusual definitions of distance can be helpful to model certain physical situations, but are also used in theoretical mathematics: In practice, one is often interested in the travel distance between two points along roads, rather than as the crow flies. In a grid plan, the travel distance between street corners is given by the Manhattan distance: the number of east–west and north–south blocks one must traverse to get between those two points. Chessboard distance, formalized as Chebyshev distance, is the minimum number of moves a king must make on a chessboard in order to travel between two squares. Metaphorical distances Many abstract notions of distance used in mathematics, science and engineering represent a degree of difference or separation between similar objects. This page gives a few examples. Statistical distances In statistics and information geometry, statistical distances measure the degree of difference between two probability distributions. There are many kinds of statistical distances, typically formalized as divergences; these allow a set of probability distributions to be understood as a geometrical object called a statistical manifold. The most elementary is the squared Euclidean distance, which is minimized by the least squares method; this is the most basic Bregman divergence. The most important in information theory is the relative entropy (Kullback–Leibler divergence), which allows one to analogously study maximum likelihood estimation geometrically; this is an example of both an f-divergence and a Bregman divergence (and in fact the only example which is both). Statistical manifolds corresponding to Bregman divergences are flat manifolds in the corresponding geometry, allowing an analog of the Pythagorean theorem (which holds for squared Euclidean distance) to be used for linear inverse problems in inference by optimization theory. Other important statistical distances include the Mahalanobis distance and the energy distance. Edit distances In computer science, an edit distance or string metric between two strings measures how different