Taxicab geometry

Type of metric geometry

In taxicab geometry, the lengths of the red, blue, green, and yellow paths all equal 12, the taxicab distance between the opposite corners, and all four paths are shortest paths. Instead, in Euclidean geometry, the red, blue, and yellow paths still have length 12 but the green path is the unique shortest path, with length equal to the Euclidean distance between the opposite corners, 6√2 ≈ 8.49.

Taxicab geometry or Manhattan geometry is geometry where the familiar Euclidean distance is ignored, and the distance between two points is instead defined to be the sum of the absolute differences of their respective Cartesian coordinates, a distance function (or metric) called the taxicab distance, Manhattan distance, or city block distance. The name refers to the island of Manhattan, 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 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 L1 distance (see Lp space).[1] This geometry has been used in regression analysis since the 18th century, and is often referred to as LASSO. Its geometric interpretation dates to non-Euclidean geometry of the 19th century and is due to Hermann Minkowski.

In the two-dimensional real coordinate space R 2 {\displaystyle \mathbb {R} ^{2}} , the taxicab distance between two points  ( x 1 , y 1 ) {\displaystyle (x_{1},y_{1})} and  ( x 2 , y 2 ) {\displaystyle (x_{2},y_{2})} is  | x 1 − x 2 | + | y 1 − y 2 | {\displaystyle \left|x_{1}-x_{2}\right|+\left|y_{1}-y_{2}\right|} . That is, it is the sum of the absolute values of the differences in both coordinates.

## Formal definition

[edit]

The taxicab distance,  d T {\displaystyle d_{\text{T}}} , between two points  p = ( p 1 , p 2 , … , p n ) and q = ( q 1 , q 2 , … , q n ) {\displaystyle \mathbf {p} =(p_{1},p_{2},\dots ,p_{n}){\text{ and }}\mathbf {q} =(q_{1},q_{2},\dots ,q_{n})} in an n-dimensional real coordinate space with fixed Cartesian coordinate system, is the sum of the lengths of the projections of the line segment between the points onto the coordinate axes. More formally, d T ( p , q ) = ‖ p − q ‖ T = ∑ i = 1 n | p i − q i | {\displaystyle d_{\text{T}}(\mathbf {p} ,\mathbf {q} )=\left\|\mathbf {p} -\mathbf {q} \right\|_{\text{T}}=\sum _{i=1}^{n}\left|p_{i}-q_{i}\right|} For example, in  R 2 {\displaystyle \mathbb {R} ^{2}} , the taxicab distance between  p = ( p 1 , p 2 ) {\displaystyle \mathbf {p} =(p_{1},p_{2})} and  q = ( q 1 , q 2 ) {\displaystyle \mathbf {q} =(q_{1},q_{2})} is  | p 1 − q 1 | + | p 2 − q 2 | . {\displaystyle \left|p_{1}-q_{1}\right|+\left|p_{2}-q_{2}\right|.}

## History

[edit]

The L1 metric was used in regression analysis, as a measure of goodness of fit, in 1757 by Roger Joseph Boscovich.[2] 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. Notably it appeared in 1910 in the works of both Frigyes Riesz and Hermann Minkowski. The formalization of Lp spaces, which include taxicab geometry as a special case, is credited to Riesz.[3] In developing the geometry of numbers, Hermann Minkowski established his Minkowski inequality, stating that these spaces define normed vector spaces.[4]

The name taxicab geometry was introduced by Karl Menger 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.[5]

## Properties

[edit]

Thought of as an additional structure layered on Euclidean space, taxicab distance depends on the orientation of the coordinate system and is changed by Euclidean rotation of the space, but is unaffected by translation or axis-aligned reflections. Taxicab geometry satisfies all of Hilbert's axioms (a formalization of Euclidean geometry) 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.

### Spheres

[edit]

Grid points on a circle in taxicab geometry as the grid is made finer

In any metric space, a sphere is a set of points at a fixed distance, the radius, 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, the n-dimensional generalization of a regular octahedron, whose points  p {\displaystyle \mathbf {p} } satisfy the equation:

d T ( p , c ) = ∑ i = 1 n | p i − c i | = r , {\displaystyle d_{\text{T}}(\mathbf {p} ,\mathbf {c} )=\sum _{i=1}^{n}|p_{i}-c_{i}|=r,}

where  c {\displaystyle \mathbf {c} } is the center and r is the radius. Points  p {\displaystyle \mathbf {p} } on the unit sphere, a sphere of radius 1 centered at the origin, satisfy the equation  d T ( p , 0 ) = ∑ i = 1 n | p i | = 1. {\textstyle d_{\text{T}}(\mathbf {p} ,\mathbf {0} )=\sum _{i=1}^{n}|p_{i}|=1.}

In two dimensional taxicab geometry, the sphere (called a circle) is a square 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 2r, so the circumference is 8r. Thus, in taxicab geometry, the value of the analog of the circle constant π, the ratio of circumference to diameter, is equal to 4.

A closed ball (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 (L∞ metric) on a plane is also a square with side length 2r 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 L1 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.

### Arc length

[edit]

Let  y = f ( x ) {\displaystyle y=f(x)} be a continuously differentiable function. Let  s {\displaystyle s} be the taxicab arc length of the graph of  f {\displaystyle f} on some interval  [ a , b ] {\displaystyle [a,b]} . Take a partition of the interval into equal infinitesimal subintervals, and let  Δ s i {\displaystyle \Delta s_{i}} be the taxicab length of the  i th {\displaystyle i^{\text{th}}} subarc. Then[6]

Δ s i = Δ x i + Δ y i = Δ x i + | f ( x i ) − f ( x i − 1 ) | . {\displaystyle \Delta s_{i}=\Delta x_{i}+\Delta y_{i}=\Delta x_{i}+|f(x_{i})-f(x_{i-1})|.}

By the mean value theorem, there exists some point  x i ∗ {\displaystyle x_{i}^{*}} between  x i {\displaystyle x_{i}} and  x i − 1 {\displaystyle x_{i-1}} such that  f ( x i ) − f ( x i − 1 ) = f ′ ( x i ∗ ) d x i {\displaystyle f(x_{i})-f(x_{i-1})=f'(x_{i}^{*})dx_{i}} .[7] Then the previous equation can be written

Δ s i = Δ x i + | f ′ ( x i ∗ ) | Δ x i = Δ x i ( 1 + | f ′ ( x i ∗ ) | ) . {\displaystyle \Delta s_{i}=\Delta x_{i}+|f'(x_{i}^{*})|\Delta x_{i}=\Delta x_{i}(1+|f'(x_{i}^{*})|).}

Then  s {\displaystyle s} is given as the sum of every partition of  s {\displaystyle s} on  [ a , b ] {\displaystyle [a,b]} as they get arbitrarily small.

Curves defined by monotone increasing or decreasing functions have the same taxicab arc length as long as they share the same endpoints.

s = lim n -> ∞ ∑ i = 1 n Δ x i ( 1 + | f ′ ( x i ∗ ) | ) = ∫ a b 1 + | f ′ ( x ) | d x {\displaystyle {\begin{aligned}s&=\lim _{n\to \infty }\sum _{i=1}^{n}\Delta x_{i}(1+|f'(x_{i}^{*})|)\\\&=\int _{a}^{b}1+|f'(x)|\,dx\end{aligned}}} To test this, take the taxicab circle of radius r {\displaystyle r} centered at the origin. Its curve in the first quadrant is given by  f ( x ) = − x + r {\displaystyle f(x)=-x+r} whose length is

s = ∫ 0 r 1 + | − 1 | d x = 2 r {\displaystyle s=\int _{0}^{r}1+|-1|dx=2r}

Multiplying this value by  4 {\displaystyle 4} to account for the remaining quadrants gives  8 r {\displaystyle 8r} , which agrees with the circumference of a taxicab circle.[8] Now take the Euclidean circle of radius  r {\displaystyle r} centered at the origin, which is given by  f ( x ) = r 2 − x 2 {\displaystyle f(x)={\sqrt {r^{2}-x^{2}}}} . Its arc length in the first quadrant is given by

s = ∫ 0 r 1 + | − x r 2 − x 2 | d x = x + r 2 − x 2 | 0 r = r − ( − r ) = 2 r {\displaystyle {\begin{aligned}s&=\int _{0}^{r}1+\left|{\frac {-x}{\sqrt {r^{2}-x^{2}}}}\right|dx\\\&=\left.x+{\sqrt {r^{2}-x^{2}}}\right|_{0}^{r}\\\&=r-(-r)\\\&=2r\end{aligned}}}

Accounting for the remaining quadrants gives  4 × 2 r = 8 r {\displaystyle 4\times 2r=8r} again. Therefore, the circumference of the taxicab circle and the Euclidean circle in the taxicab metric are equal.[9] In fact, for any function  f {\displaystyle f} that is monotonic and differentiable with a continuous derivative over an interval  [ a , b ] {\displaystyle [a,b]} , the arc length of  f {\displaystyle f} over  [ a , b ] {\displaystyle [a,b]} is  ( b − a ) + ∣ f ( b ) − f ( a ) ∣ {\displaystyle (b-a)+\mid f(b)-f(a)\mid } .[10]

### Triangle congruence

[edit]

Two taxicab right isoceles triangles. Three angles and two legs are congruent, but the triangles are not congruent. Therefore, ASASA is not a congruence theorem in taxicab geometry.

Two triangles are congruent if and only if three corresponding sides are equal in distance and three corresponding angles are equal in measure. There are several theorems that guarantee triangle congruence in Euclidean geometry, namely Angle-Angle-Side (AAS), Angle-Side-Angle (ASA), Side-Angle-Side (SAS), and Side-Side-Side (SSS). In taxicab geometry, however, only SASAS guarantees triangle congruence.[11]

Take, for example, two right isosceles taxicab triangles whose angles measure 45-90-45. The two legs of both triangles have a taxicab length 2, but the hypotenuses are not congruent. This counterexample eliminates AAS, ASA, and SAS. It also eliminates AASS, AAAS, and even ASASA. Having three congruent angles and two sides does not guarantee triangle congruence in taxicab geometry. Therefore, the only triangle congruence theorem in taxicab geometry is SASAS, where all three corresponding sides must be congruent and at least two corresponding angles must be congruent.[12] This result is mainly due to the fact that the length of a line segment depends on its orientation in taxicab geometry.

## Applications

[edit]

### Compressed sensing

[edit]

In solving an underdetermined system of linear equations, the regularization term for the parameter vector is expressed in terms of the  ℓ 1 {\displaystyle \ell _{1}} norm (taxicab geometry) of the vector.[13] This approach appears in the signal recovery framework called compressed sensing.

### Differences of frequency distributions

[edit]

Taxicab geometry can be used to assess the differences in discrete frequency distributions. For example, in RNA splicing positional distributions of hexamers, which plot the probability of each hexamer appearing at each given nucleotide near a splice site, can be compared with L1-distance. Each position distribution can be represented as a vector where each entry represents the likelihood of the hexamer starting at a certain nucleotide. A large L1-distance between the two vectors indicates a significant difference in the nature of the distributions while a small distance denotes similarly shaped distributions. This is equivalent to measuring the area between the two distribution curves because the area of each segment is the absolute difference between the two curves' likelihoods at that point. When summed together for all segments, it provides the same measure as L1-distance.[14]

## See also

[edit]

Comparison of Chebyshev, Euclidean and taxicab distances for the hypotenuse of a 3-4-5 triangle on a chessboard

* Chebyshev distance
* Hamming distance – The number of differing bits between two strings of binary digits
* Lee distance
* Orthogonal convex hull – Minimal superset that intersects each axis-parallel line in an interval
* Staircase paradox – The paradox that the limit of the lengths of finer and finer "staircase curves" does not tend to the length of the diagonal line segment the curves tend towards

## External links

[edit]

* Taxicab metric with stoplights

## References

[edit]

1. ^ Black, Paul E. "Manhattan distance". Dictionary of Algorithms and Data Structures. Retrieved October 6, 2019.
2. ^ Stigler, Stephen M. (1986). The History of Statistics: The Measurement of Uncertainty before 1900. Harvard University Press. ISBN 9780674403406. Retrieved October 6, 2019.
3. ^ Riesz, Frigyes (1910). "Untersuchungen über Systeme integrierbarer Funktionen". Mathematische Annalen (in German). 69 (4): 449–497\. doi:10.1007/BF01457637. hdl:10338.dmlcz/128558. S2CID 120242933.
4. ^ Minkowski, Hermann (1910). Geometrie der Zahlen (in German). Leipzig and Berlin: R. G. Teubner. JFM 41.0239.03. MR 0249269. Retrieved October 6, 2019.
5. ^ Menger, Karl (1952). You Will Like Geometry. A Guide Book for the Illinois Institute of Technology Geometry Exhibition. Chicago: Museum of Science and Industry.

Golland, Louise (1990). "Karl Menger and Taxicab Geometry". Mathematics Magazine. 63 (5): 326–327\. doi:10.1080/0025570x.1990.11977548.
6. ^ Heinbockel, J.H. (2012). Introduction to Calculus Volume II. Old Dominion University. pp. 54–55.
7. ^ Penot, J.P. (1988-01-01). "On the mean value theorem". Optimization. 19 (2): 147–156\. doi:10.1080/02331938808843330. ISSN 0233-1934.
8. ^ Petrović, Maja; Malešević, Branko; Banjac, Bojan; Obradović, Ratko (2014). Geometry of some taxicab curves. 4th International Scientific Conference on Geometry and Graphics. Serbian Society for Geometry and Graphics, University of Niš, Srbija. arXiv:1405.7579.
9. ^ Kemp, Aubrey (2018). Generalizing and Transferring Mathematical Definitions from Euclidean to Taxicab Geometry (PhD thesis). Georgia State University. doi:10.57709/12521263.
10. ^ Thompson, Kevin P. (2011). "The Nature of Length, Area, and Volume in Taxicab Geometry". International Electronic Journal of Geometry. 4 (2): 193–207\. arXiv:1101.2922.
11. ^ Mironychev, Alexander (2018). "SAS and SSA Conditions for Congruent Triangles". Journal of Mathematics and System Science. 8 (2): 59–66.
12. ^ THOMPSON, KEVIN; DRAY, TEVIAN (2000). "Taxicab Angles and Trigonometry". Pi Mu Epsilon Journal. 11 (2): 87–96\. ISSN 0031-952X. JSTOR 24340535.
13. ^ Donoho, David L. (March 23, 2006). "For most large underdetermined systems of linear equations the minimal  ℓ 1 {\displaystyle \ell _{1}} -norm solution is also the sparsest solution". Communications on Pure and Applied Mathematics. 59 (6): 797–829\. doi:10.1002/cpa.20132. S2CID 8510060.
14. ^ Lim, Kian Huat; Ferraris, Luciana; Filloux, Madeleine E.; Raphael, Benjamin J.; Fairbrother, William G. (July 5, 2011). "Using positional distribution to identify splicing elements and predict pre-mRNA processing defects in human genes". Proceedings of the National Academy of Sciences of the United States of America. 108 (27): 11093–11098\. Bibcode:2011PNAS..10811093H. doi:10.1073/pnas.1101135108. PMC 3131313. PMID 21685335.

## Further reading

[edit]

* Gardner, Martin (1997). "10. Taxicab Geometry". The Last Recreations. Copernicus. pp. 159–176\. ISBN 0-387-94929-1.
* Krause, Eugene F. (1975). Taxicab Geometry. Addison-Wesley. ISBN 0201039346. Reprinted by Dover (1986), ISBN 0-486-25202-7.

## External links

[edit]

* Weisstein, Eric W. "Taxicab Metric". MathWorld.
* Malkevitch, Joe (October 1, 2007). "Taxi!". American Mathematical Society. Retrieved October 6, 2019.

* v
* t
* e

Lp spaces

Basic concepts|

* Banach & Hilbert spaces
* Lp spaces
* Measure
* Lebesgue
* Measure space
* Measurable space/function
* Minkowski distance
* Sequence spaces

L1 spaces|

* Integrable function
* Lebesgue integration
* Taxicab geometry

L2 spaces|

* Bessel's
* Cauchy–Schwarz
* Euclidean distance
* Hilbert space
* Parseval's identity
* Polarization identity
* Pythagorean theorem
* Square-integrable function

L ∞ {\displaystyle L^{\infty }} spaces|

* Bounded function
* Chebyshev distance
* Infimum and supremum
* Essential
* Uniform norm

Maps|

* Almost everywhere
* Convergence almost everywhere
* Convergence in measure
* Function space
* Integral transform
* Locally integrable function
* Measurable function
* Symmetric decreasing rearrangement

Inequalities|

* Babenko–Beckner
* Chebyshev's
* Clarkson's
* Hanner's
* Hausdorff–Young
* Hölder's
* Markov's
* Minkowski
* Young's convolution

Results|

* Marcinkiewicz interpolation theorem
* Plancherel theorem
* Riemann–Lebesgue
* Riesz–Fischer theorem
* Riesz–Thorin theorem

| For Lebesgue measure|

* Isoperimetric inequality
* Brunn–Minkowski theorem
* Milman's reverse
* Minkowski–Steiner formula
* Prékopa–Leindler inequality
* Vitale's random Brunn–Minkowski inequality

|

Applications & related|

* Bochner space
* Fourier analysis
* Lorentz space
* Probability theory
* Quasinorm
* Real analysis
* Sobolev space
* *-algebra
* C*-algebra
* Von Neumann

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template