Distância Manhattan
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
Formula
Manhattan
About this calculator
The Manhattan Distance, also known as L1 distance, is a measure of distance between two points in the Cartesian plane. It is calculated by summing the absolute differences of the x and y coordinates of the two points.
The formula for calculating the Manhattan distance is Δx + Δy, where Δx is the difference of the x coordinates and Δy is the difference of the y coordinates. For example, if two points have coordinates (x1, y1) and (x2, y2), the Manhattan distance is |x2 - x1| + |y2 - y1|.
The Manhattan distance is useful in geometry and calculus problems, especially when working with rectangles and squares. It is also an important measure in navigation and geography problems.
It is worth noting that the Manhattan distance is not the same as the Euclidean distance (or point-to-point distance), which is based on the formula √((x2 - x1)^2 + (y2 - y1)^2). The Manhattan distance is a simpler and more practical measure in certain contexts.
Frequently asked questions
When to use the Manhattan distance?
The Manhattan distance is useful in geometry and calculus problems, especially when working with rectangles and squares. It is also an important measure in navigation and geography problems.
What is the Euclidean distance?
The Euclidean distance, also known as point-to-point distance, is a measure of distance that takes into account the x and y coordinates of two points and is based on the formula √((x2 - x1)^2 + (y2 - y1)^2).
How to calculate the Manhattan distance?
The Manhattan distance is calculated by summing the absolute differences of the x and y coordinates of the two points. For example, if two points have coordinates (x1, y1) and (x2, y2), the Manhattan distance is |x2 - x1| + |y2 - y1|.
Difference between Manhattan distance and Euclidean distance?
The Manhattan distance is a simpler and more practical measure in certain contexts, while the Euclidean distance is a more precise measure used in many areas, such as geometry and calculus.
What are the real cases in which the Manhattan distance is useful?
The Manhattan distance is useful in navigation and geography problems, especially when working with rectangles and squares, as well as being an important measure in geometry and calculus problems.