Euclidean vs Manhattan Distance

Euclidean Distance: In order to calculate the distance b/w tow points in a given Space – can be a N-dimensional, we can use Euclidean distance formula:

D(x1,x2) = SQRT((x1-x2)**2 + (y1-y2)**2) where SQRT is Square Root D stands for distance b/w point x1,x2. we can extend this for N- dimensional plan as follows

D(x1,x2,x3,…xn) = SQRT((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2 +…(xn – xn-1)**2)

Manhattan distance: it is defined as follows:

D(x1,x2) = |x1-x2| + |y1-y2| i.e. Sum of Absolute distance b/w x1,x2 and y1 and y2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: