A vector is an ordered list of numbers that defines a position or direction in high-dimensional space. In retrieval systems, direction represents semantic meaning more than magnitude. section 2.2.1
Cosine similarity compares normalized vectors by their direction:
- 1.0 indicates identical direction, usually near-duplicate text rather than synonymy. section 2.2.1
- 0.0 indicates right angles and no relationship detected by the model. section 2.2.1
- -1.0 indicates opposite directions, although text embeddings almost never produce this value. section 2.2.1
Magnitude is discarded
A query and two documents can point in the same direction even when one vector is twice as long; after normalization, they receive the same cosine score. section 2.2.1
Figure 2.2 What cosine similarity measures and discards. Top left: the query and doc A sit at angle θ, and doc B, twice as long and pointing the same way, scores identically, because normalizing removes magnitude before the dot product. The other three panels draw the values listed above: identical direction scores 1.0, right angles score 0.0, and opposite directions score −1.0, which text embeddings almost never produce.

Use the figure to visualize how angle determines cosine similarity while normalization removes vector length. section 2.2.1


