And you want to say map the distance between the two centers of the two cities.

well, you can draw a straight diagonal line between the two cities.

And then, the you can calculate the distance, kind of, in the usual way.

And the distance is going to be a function of the difference

in the x coordinates and the difference in the y coordinates.

So to calculate the Euclidian distance you take the distance you know, in the x

coordinates, you square it, you take the difference

in the y coordinates and you square it.

You add the two squares together, you take the square root.

That's the classical definition of Euclidian distance.

And so you can imagine, you know, in real life, it'd be like

if a bird were to fly from DC to Baltimore, they would just fly

straight from one city to another, they could, because they can fly in

the air and they're not impeded by things like roads or mountains, or whatever.

And so

that's the straight line distance between two cities.

Whether that makes sense for you depends on

you know, whether you're a bird or something else.

And so you have to think about kind of that in the context of your problem.

Now Euclidean distance is easily generalizable to higher dimensions.

But even if you have, you know, instead here we

just have two dimension, but if you have 100 dimensions, you

can easily take the difference between 100, each of the dimensions,

square it, sum it together and then take the square root.

So it's a very nice type

kind of, it, it extends very naturally to very high dimensions problems.

[BLANK_AUDIO]

The Manhattan distance gets its name from the idea that, you know, you can, you

can look at points on a kind of a grid or a city block grid.

Think or imagine you're in the city of Manhattan in New York.

And you want to get from one point to another.

So you can look at the two black circles on this diagram.

And if you want to get from one point to another,

if you're in a city, you know, in a city

block, you can't just go directly from one point to

another, because there'd be all these buildings in the way, or

you'd have to follow the streets.