1 / 10
INTRO

Comparing Direction, Not Size

The dot product mixes together both direction and length — two long vectors pointing the same way give a huge number, even though two short vectors pointing the exact same way are "just as aligned."

Cosine similarity fixes this: it measures alignment alone, completely ignoring length.

Two vectors with an angle marked between them and a similarity meter bar