The Geometry of the Taxicab
Imagine you are standing in a city laid out in a perfect grid, like Manhattan. You want to go from the origin O(0,0) to a point A(3,2).
In a standard Euclidean world, you would walk in a straight line, cutting through buildings. But here, you must follow the streets—moving only horizontally and vertically.
This is the essence of the Manhattan distance, defined as:
d(P,Q)=∣x1−x2∣+∣y1−y2∣
Today, we are going to find the set of all points P(x,y) in the first quadrant that are equidistant from O and A under this unique metric. It is a journey that will change how you perceive distance itself.
Defining the Playing Field
First, let us define our distances. For any point P(x,y) in the first quadrant, the distance to the origin is d(P,O)=∣x−0∣+∣y−0∣.
Since x≥0 and y≥0, this simplifies beautifully to d(P,O)=x+y.
Now, consider the distance to point A(3,2). This is d(P,A)=∣x−3∣+∣y−2∣.
Our goal is to find the locus where
d(P,O)=d(P,A), which gives us the master equation:
x+y=∣x−3∣+∣y−2∣
The Critical Seams
This equation looks simple, but the absolute value bars are traps. They change their behavior at the 'critical lines' x=3 and y=2.
These lines act as boundaries that divide the first quadrant into four distinct regions. We must explore each region to see if any points there satisfy our condition.
Let us start with the region where x<3 and y<2. In this zone, both (x−3) and (y−2) are negative.
Therefore,
∣x−3∣=−(x−3)=3−x and
∣y−2∣=−(y−2)=2−y. Substituting these into our master equation, we get:
x+y=(3−x)+(2−y)
Simplifying the right side, we have
x+y=5−x−y. Bringing all variables to the left, we get
2x+2y=5, or:
x+y=25
This is a straight line with a slope of −1. Because this is only valid for x<3 and y<2, it forms a finite line segment starting from the x-axis at (25,0) and ending at (0.5,2).
The Infinite Ray
Now, let us venture into the region where x<3 but y≥2. Here, (x−3) is still negative, so ∣x−3∣=3−x.
However,
(y−2) is now non-negative, so
∣y−2∣=y−2. Our equation becomes:
x+y=(3−x)+(y−2)
Look at the magic that happens: the
y terms on both sides cancel out! We are left with
x=1−x, which simplifies to
2x=1, or:
x=21
This is a vertical line. Since this is valid for all y≥2, it forms an infinite ray starting at (0.5,2) and extending upwards to infinity. This is the second part of our locus.
Conclusion
If you check the other regions, such as x≥3, you will find that the equations lead to contradictions like 0=−5, meaning no points exist there.
Thus, the set of equidistant points is the union of the finite segment x+y=25 (for y<2) and the infinite ray x=21 (for y≥2).
It is a stunning result—a piecewise linear shape that perfectly captures the rigid, grid-like nature of the Manhattan metric. You have just mapped the geometry of a city!