How do I calculate Euclidean and Manhattan distance by hand?
Euclidean: Take the square root of the sum of the squares of the differences of the coordinates.
For example, if $x=(\color{darkgreen}a,\color{maroon}b)$ and $y=(\color{darkgreen}c,\color{maroon}d)$, the Euclidean distance between $x$ and $y$ is
$\sqrt{(\color{darkgreen}a-\color{darkgreen}c)^2+(\color{maroon}b-\color{maroon}d)^2 }$.
Manhattan: Take the sum of the absolute values of the differences of the coordinates.
For example, if $x=(\color{darkgreen}a,\color{maroon}b)$ and $y=(\color{darkgreen}c,\color{maroon}d)$, the Manhattan distance between $x$ and $y$ is
$ {|\color{darkgreen}a-\color{darkgreen}c|+|\color{maroon}b-\color{maroon}d| }$.
For your vectors, it's the same thing except you have more coordinates.
This is an old post, but just want to explain that the squaring and square rooting in the euclidean distance function is basically to get absolute values of each dimension assessed. Manhattan distance just bypasses that and goes right to abs value (which if your doing ai, data mining, machine learning, may be a cheaper function call then pow'ing and sqrt'ing.) I've seen debates about using one way vs the other when it gets to higher level stuff, like comparing least squares or linear algebra (?). Manhattan distance is easier to calculate by hand, bc you just subtract the values of a dimensiin then abs them and add all the results. Euclidean distance is harder by hand bc you're squaring anf square rooting. So some of this comes down to what purpose you're using it for.