## What is the difference between Euclidean, Manhattan and Hamming Distances?

**Euclidean
Distance:**

Euclidean distance is one of the most used distance metrics. It is calculated using Minkowski Distance formula by setting ** p’s** value to

**. This will update the distance**

*2***formula as below:**

*‘d’*Euclidean distance formula can be used to calculate the distance between two data points in a plane.

**Manhattan Distance:**

Manhattan Distance is used to calculate the distance between two data points in a grid like path.

Distance ** d **will be calculated using an

**between its cartesian co-ordinates as below:**

*absolute sum of difference*where, n- number of variables, ** xi** and

**are the variables of vectors x and y respectively, in the two-dimensional vector space. i.e.**

*yi***and**

*x = (x1, x2, x3, …)***.**

*y = (y1, y2, y3, …)*Now the distance ** d** will be calculated as-

**(x1 – y1) + (x2 – y2) + (x3 – y3) + … + (xn – yn).**

**Hamming Distance:**

Hamming distance is one of several string metrics for
measuring the edit distance between
two sequences. **Hamming
distance** can be used to measure how many attributes must
be changed in order to match one another.