Vectors, Distance and Similarity
Multiply, Add, and Get an Angle
Last timeHow Far Apart
Multiply two vectors coordinate by coordinate and add the results. That one number turns out to encode the angle between them, which is why it appears in almost every similarity calculation.
There is one way to turn two vectors into a single number that matters more than
all the others. It is also the cheapest thing you could reasonably do with them.
- the ith coordinate of the first vector
- the ith coordinate of the second, in the same position
The same number, said differently
Now the part that is not obvious from the arithmetic at all.
- the length of the first vector
- the length of the second
- the angle between them, measured in the plane the two of them span
Everything else in this course comes out of reading that equation in one
direction or the other. Computing the left side is cheap; the right side is what
you actually wanted to know.
The lesson stops here
3 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