Vectors, Distance and Similarity
Straight Lines and City Blocks
Last timeA List of Numbers With a Geometry
The length of a vector is the square root of the sum of its squared coordinates, the distance between two is the length of their difference, and there is more than one reasonable way to measure both.
Once a list of numbers is a point, asking how far apart two of them are is the
obvious next question. It has more than one answer, and the answers disagree.
- the ith coordinate of the vector
- how many coordinates there are, which changes nothing about the formula
Distance is that same formula, moved
The distance between two vectors is the length of their difference. Subtract them
coordinate by coordinate and measure the length of what is left.
| step | first coordinate | second coordinate | third coordinate | what happened |
|---|---|---|---|---|
| 1 | 4 | 1 | 6 | The first vector. |
| 2 | 1 | 5 | 6 | The second. |
| 3 | 3 | -4 | 0 | The difference. Note that the third coordinate has dropped out entirely, since the two agreed there. |
| 4 | 9 | 16 | 0 | The squared differences, adding to 25, so the distance is 5. |
A different reasonable answer
Nothing forced the squaring. Adding the sizes of the differences directly is
another perfectly good measure of how far apart two points are, and it is the one
that applies if you have to travel along a grid of streets rather than through
buildings.
The lesson stops here
4 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents