ContentsThe library

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.

FIG 1The straight-line length
the ith coordinate of the vector
how many coordinates there are, which changes nothing about the formula
In two dimensions this is the rule about right-angled triangles. In three it is the same rule applied twice. Beyond that there is no picture, and the formula is simply taken as the definition, which turns out to be the right decision because everything built on it continues to behave.

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.

FIG 2Two vectors, their difference, and the distance
stepfirst coordinatesecond coordinatethird coordinatewhat happened
1416The first vector.
2156The second.
33-40The difference. Note that the third coordinate has dropped out entirely, since the two agreed there.
49160The squared differences, adding to 25, so the distance is 5.
4 steps
Only the coordinates where the two vectors disagree contribute anything. That is obvious here and worth holding onto for later, when a vector has three hundred coordinates and most of the disagreement lives in a handful of them.

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 contents

This 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

The rest of this course

  1. 01The Same List, Read Two Ways
  2. 02Straight Lines and City Blocksyou are here
  3. 03Multiply, Add, and Get an Angleopening only
  4. 04Dividing the Lengths Outopening only
  5. 05When Distance and Angle Become the Same Questionopening only
  6. 06Everything Is Far Away and Nothing Is Nearbyopening only
  7. 07The Cost of Asking What Is Nearbyopening only
  8. 08Which Question Are You Actually Askingopening only

Read alongside