3 Comments
Jul 2Liked by Christoph Molnar

I'm not sure I see the distinction between dot product and distance? Isn't the dot product just the unscaled angular separation of the two vectors? I think if we do scale it, the angle between the two vectors will be a distance measure (symmetric, has a zero, obeys the triangle inequality)?

Expand full comment
author

Thanks for the feedback. Euclidean distance and dot product are related to each other: https://math.stackexchange.com/a/2981910

By normalizing the vectors we go from dot product to cosine similarity.

Taking (1 - cosine similarity), we get cosine distance (which is not a true distance function).

Taking sqrt(2 • cosine distance) gives us Euclidean distance of the normalized vectors.

So this only works for normalized vectors and requires a few steps. For me this separates the two concepts enough to mention them as separate concepts of similarity.

Your feedback convinced me I should at least add a section to the book about the connection between the two.

Expand full comment

Fascinating idea! What would be the statistical analogue of the cross product? Maybe PCA.

Expand full comment