Manhattan Distance
Calculator to calculate the manhattan distance
The Manhattan distance function or Manhattan metric calculates the distance that would be moved to get from one data point to another when following a grid-like path. The Manhattan distance between two elements is the sum of the differences of their respective components.
To calculate, enter a series of x /y pairs (vectors). The individual numbers are separated by semicolons or spaces. Then click on the 'Calculate' button.
|
Manhattan distance formula
\(\displaystyle d(x,y)=\sum_{i=1}^n |x_i-y_i|\)
Example
Example for the x/y pairs (3,2) (4,3) and (5,6)
\(\displaystyle |3-2| + |4-3| + |5-6| = 1+1+1=3\)
|