
Taxicab geometry or Manhattan geometry is
geometry
Geometry (; ) is a branch of mathematics concerned with properties of space such as the distance, shape, size, and relative position of figures. Geometry is, along with arithmetic, one of the oldest branches of mathematics. A mathematician w ...
where the familiar
Euclidean distance
In mathematics, the Euclidean distance between two points in Euclidean space is the length of the line segment between them. It can be calculated from the Cartesian coordinates of the points using the Pythagorean theorem, and therefore is o ...
is ignored, and the
distance
Distance is a numerical or occasionally qualitative measurement of how far apart objects, points, people, or ideas are. In physics or everyday usage, distance may refer to a physical length or an estimation based on other criteria (e.g. "two co ...
between two
points
A point is a small dot or the sharp tip of something. Point or points may refer to:
Mathematics
* Point (geometry), an entity that has a location in space or on a plane, but has no extent; more generally, an element of some abstract topologica ...
is instead defined to be the sum of the
absolute difference
The absolute difference of two real numbers x and y is given by , x-y, , the absolute value of their difference. It describes the distance on the real line between the points corresponding to x and y, and is a special case of the Lp distance fo ...
s of their respective
Cartesian coordinate
In geometry, a Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of real numbers called ''coordinates'', which are the signed distances to the point from two fixed perpendicular o ...
s, a distance function (or
metric
Metric or metrical may refer to:
Measuring
* Metric system, an internationally adopted decimal system of measurement
* An adjective indicating relation to measurement in general, or a noun describing a specific type of measurement
Mathematics
...
) called the ''taxicab distance'', ''Manhattan distance'', or ''city block distance''. The name refers to the island of
Manhattan
Manhattan ( ) is the most densely populated and geographically smallest of the Boroughs of New York City, five boroughs of New York City. Coextensive with New York County, Manhattan is the County statistics of the United States#Smallest, larg ...
, or generically any planned city with a
rectangular grid of streets, in which a taxicab can only travel along grid directions. In taxicab geometry, the distance between any two points equals the length of their shortest grid path. This different definition of distance also leads to a different definition of the length of a curve, for which a
line segment
In geometry, a line segment is a part of a line (mathematics), straight line that is bounded by two distinct endpoints (its extreme points), and contains every Point (geometry), point on the line that is between its endpoints. It is a special c ...
between any two points has the same length as a grid path between those points rather than its Euclidean length.
The taxicab distance is also sometimes known as ''rectilinear distance'' or distance (see
''Lp'' space). This geometry has been used in
regression analysis since the 18th century, and is often referred to as
LASSO
A lasso or lazo ( or ), also called reata or la reata in Mexico, and in the United States riata or lariat (from Mexican Spanish lasso for roping cattle), is a loop of rope designed as a restraint to be thrown around a target and tightened when ...
. Its geometric interpretation dates to
non-Euclidean geometry
In mathematics, non-Euclidean geometry consists of two geometries based on axioms closely related to those that specify Euclidean geometry. As Euclidean geometry lies at the intersection of metric geometry and affine geometry, non-Euclidean ge ...
of the 19th century and is due to
Hermann Minkowski
Hermann Minkowski (22 June 1864 – 12 January 1909) was a mathematician and professor at the University of Königsberg, the University of Zürich, and the University of Göttingen, described variously as German, Polish, Lithuanian-German, o ...
.
In the two-
dimension
In physics and mathematics, the dimension of a mathematical space (or object) is informally defined as the minimum number of coordinates needed to specify any point within it. Thus, a line has a dimension of one (1D) because only one coo ...
al
real coordinate space
In mathematics, the real coordinate space or real coordinate ''n''-space, of dimension , denoted or , is the set of all ordered -tuples of real numbers, that is the set of all sequences of real numbers, also known as '' coordinate vectors''.
...
, the taxicab distance between two points
and
is
. That is, it is the sum of the
absolute value
In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if x is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
s of the differences in both coordinates.
Formal definition
The taxicab distance,
, between two points
in an ''n''-dimensional
real coordinate space
In mathematics, the real coordinate space or real coordinate ''n''-space, of dimension , denoted or , is the set of all ordered -tuples of real numbers, that is the set of all sequences of real numbers, also known as '' coordinate vectors''.
...
with fixed
Cartesian coordinate system
In geometry, a Cartesian coordinate system (, ) in a plane (geometry), plane is a coordinate system that specifies each point (geometry), point uniquely by a pair of real numbers called ''coordinates'', which are the positive and negative number ...
, is the sum of the lengths of the projections of the
line segment
In geometry, a line segment is a part of a line (mathematics), straight line that is bounded by two distinct endpoints (its extreme points), and contains every Point (geometry), point on the line that is between its endpoints. It is a special c ...
between the points onto the
coordinate axes
In geometry, a coordinate system is a system that uses one or more numbers, or coordinates, to uniquely determine and standardize the position of the points or other geometric elements on a manifold such as Euclidean space. The coordinates are ...
. More formally,
For example, in
, the taxicab distance between
and
is
History
The ''L''
1 metric was used in
regression analysis, as a measure of
goodness of fit
The goodness of fit of a statistical model describes how well it fits a set of observations. Measures of goodness of fit typically summarize the discrepancy between observed values and the values expected under the model in question. Such measur ...
, in 1757 by
Roger Joseph Boscovich.
The interpretation of it as a distance between points in a geometric space dates to the late 19th century and the development of
non-Euclidean geometries
In mathematics, non-Euclidean geometry consists of two geometries based on axioms closely related to those that specify Euclidean geometry. As Euclidean geometry lies at the intersection of metric geometry and affine geometry, non-Euclidean geo ...
. Notably it appeared in 1910 in the works of both
Frigyes Riesz
Frigyes Riesz (, , sometimes known in English and French as Frederic Riesz; 22 January 1880 – 28 February 1956) was a HungarianEberhard Zeidler: Nonlinear Functional Analysis and Its Applications: Linear monotone operators. Springer, 199/ref> ...
and
Hermann Minkowski
Hermann Minkowski (22 June 1864 – 12 January 1909) was a mathematician and professor at the University of Königsberg, the University of Zürich, and the University of Göttingen, described variously as German, Polish, Lithuanian-German, o ...
. The formalization of
''L''p spaces, which include taxicab geometry as a special case, is credited to Riesz. In developing the
geometry of numbers
Geometry of numbers is the part of number theory which uses geometry for the study of algebraic numbers. Typically, a ring of algebraic integers is viewed as a lattice (group), lattice in \mathbb R^n, and the study of these lattices provides fundam ...
,
Hermann Minkowski
Hermann Minkowski (22 June 1864 – 12 January 1909) was a mathematician and professor at the University of Königsberg, the University of Zürich, and the University of Göttingen, described variously as German, Polish, Lithuanian-German, o ...
established his
Minkowski inequality, stating that these spaces define
normed vector space
The Ateliers et Chantiers de France (ACF, Workshops and Shipyards of France) was a major shipyard that was established in Dunkirk, France, in 1898.
The shipyard boomed in the period before World War I (1914–18), but struggled in the inter-war ...
s.
The name ''taxicab geometry'' was introduced by
Karl Menger
Karl Menger (; January 13, 1902 – October 5, 1985) was an Austrian-born American mathematician, the son of the economist Carl Menger. In mathematics, Menger studied the theory of algebra over a field, algebras and the dimension theory of low-r ...
in a 1952 booklet ''You Will Like Geometry'', accompanying a geometry exhibit intended for the general public at the
Museum of Science and Industry in Chicago.
Properties
Thought of as an additional structure layered on
Euclidean space
Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are ''Euclidean spaces ...
, taxicab distance depends on the
orientation of the coordinate system and is changed by Euclidean
rotation
Rotation or rotational/rotary motion is the circular movement of an object around a central line, known as an ''axis of rotation''. A plane figure can rotate in either a clockwise or counterclockwise sense around a perpendicular axis intersect ...
of the space, but is unaffected by
translation
Translation is the communication of the semantics, meaning of a #Source and target languages, source-language text by means of an Dynamic and formal equivalence, equivalent #Source and target languages, target-language text. The English la ...
or axis-aligned
reflections. Taxicab geometry satisfies all of
Hilbert's axioms
Hilbert's axioms are a set of 20 assumptions proposed by David Hilbert in 1899 in his book ''Grundlagen der Geometrie'' (tr. ''The Foundations of Geometry'') as the foundation for a modern treatment of Euclidean geometry. Other well-known modern ax ...
(a formalization of
Euclidean geometry
Euclidean geometry is a mathematical system attributed to ancient Greek mathematics, Greek mathematician Euclid, which he described in his textbook on geometry, ''Euclid's Elements, Elements''. Euclid's approach consists in assuming a small set ...
) except that the congruence of angles cannot be defined to precisely match the Euclidean concept, and under plausible definitions of congruent taxicab angles, the
side-angle-side axiom is not satisfied as in general triangles with two taxicab-congruent sides and a taxicab-congruent angle between them are not
congruent triangles
In geometry, two figures or objects are congruent if they have the same shape and size, or if one has the same shape and size as the mirror image of the other.
More formally, two sets of points are called congruent if, and only if, one can be ...
.
Spheres

In any
metric space
In mathematics, a metric space is a Set (mathematics), set together with a notion of ''distance'' between its Element (mathematics), elements, usually called point (geometry), points. The distance is measured by a function (mathematics), functi ...
, a
sphere
A sphere (from Ancient Greek, Greek , ) is a surface (mathematics), surface analogous to the circle, a curve. In solid geometry, a sphere is the Locus (mathematics), set of points that are all at the same distance from a given point in three ...
is a set of points at a fixed distance, the ''
radius
In classical geometry, a radius (: radii or radiuses) of a circle or sphere is any of the line segments from its Centre (geometry), center to its perimeter, and in more modern usage, it is also their length. The radius of a regular polygon is th ...
'', from a specific ''
center'' point. Whereas a Euclidean sphere is round and rotationally symmetric, under the taxicab distance, the shape of a sphere is a
cross-polytope
In geometry, a cross-polytope, hyperoctahedron, orthoplex, staurotope, or cocube is a regular, convex polytope that exists in ''n''- dimensional Euclidean space. A 2-dimensional cross-polytope is a square, a 3-dimensional cross-polytope is a reg ...
, the ''n''-dimensional generalization of a
regular octahedron
In geometry, a regular octahedron is a Platonic solid composed of eight equilateral triangles, four of which meet at each vertex. Regular octahedra occur in nature as crystal structures. An octahedron, more generally, can be any eight-sided polyh ...
, whose points
satisfy the equation:
:
where
is the center and ''r'' is the radius. Points
on the
unit sphere
In mathematics, a unit sphere is a sphere of unit radius: the locus (mathematics), set of points at Euclidean distance 1 from some center (geometry), center point in three-dimensional space. More generally, the ''unit -sphere'' is an n-sphere, -s ...
, a sphere of radius 1 centered at the
origin, satisfy the equation
In two dimensional taxicab geometry, the sphere (called a ''
circle
A circle is a shape consisting of all point (geometry), points in a plane (mathematics), plane that are at a given distance from a given point, the Centre (geometry), centre. The distance between any point of the circle and the centre is cal ...
'') is a
square
In geometry, a square is a regular polygon, regular quadrilateral. It has four straight sides of equal length and four equal angles. Squares are special cases of rectangles, which have four equal angles, and of rhombuses, which have four equal si ...
oriented diagonally to the coordinate axes. The image to the right shows in red the set of all points on a square grid with a fixed distance from the blue center. As the grid is made finer, the red points become more numerous, and in the limit tend to a continuous tilted square. Each side has taxicab length 2''r'', so the
circumference
In geometry, the circumference () is the perimeter of a circle or ellipse. The circumference is the arc length of the circle, as if it were opened up and straightened out to a line segment. More generally, the perimeter is the curve length arou ...
is 8''r''. Thus, in taxicab geometry, the value of the analog of the circle constant
π, the ratio of circumference to
diameter
In geometry, a diameter of a circle is any straight line segment that passes through the centre of the circle and whose endpoints lie on the circle. It can also be defined as the longest Chord (geometry), chord of the circle. Both definitions a ...
, is equal to 4.
A closed ''
ball
A ball is a round object (usually spherical, but sometimes ovoid) with several uses. It is used in ball games, where the play of the game follows the state of the ball as it is hit, kicked or thrown by players. Balls can also be used for s ...
'' (or closed ''
disk'' in the 2-dimensional case) is a filled-in sphere, the set of points at distance less than or equal to the radius from a specific center. For
cellular automata on a square grid, a taxicab
disk is the
von Neumann neighborhood of range ''r'' of its center.
A circle of radius ''r'' for the
Chebyshev distance
In mathematics, Chebyshev distance (or Tchebychev distance), maximum metric, or L∞ metric is a metric defined on a real coordinate space where the distance between two points is the greatest of their differences along any coordinate dimensio ...
(
L∞ metric) on a plane is also a square with side length 2''r'' parallel to the coordinate axes, so planar Chebyshev distance can be viewed as equivalent by rotation and scaling to planar taxicab distance. However, this equivalence between L
1 and L
∞ metrics does not generalize to higher dimensions.
Whenever each pair in a collection of these circles has a nonempty intersection, there exists an intersection point for the whole collection; therefore, the Manhattan distance forms an
injective metric space In metric geometry, an injective metric space, or equivalently a hyperconvex metric space, is a metric space with certain properties generalizing those of the real line and of L∞ distances in higher- dimensional vector spaces. These properties c ...
.
Arc length
Let
be a
continuously differentiable
In mathematics, a differentiable function of one Real number, real variable is a Function (mathematics), function whose derivative exists at each point in its Domain of a function, domain. In other words, the Graph of a function, graph of a differ ...
function. Let
be the taxicab
arc length
Arc length is the distance between two points along a section of a curve. Development of a formulation of arc length suitable for applications to mathematics and the sciences is a problem in vector calculus and in differential geometry. In the ...
of the
graph
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discret ...
of
on some interval