Skip to content

Dot Product

Operation on two vectors: multiply corresponding coordinates and sum. Gives a single number that reflects how much the vectors 'point' in the same direction.

Formula

a · b = a₁·b₁ + a₂·b₂ + … + aₙ·bₙ

Relation to Cosine

If vectors are normalized (length = 1), the dot product coincides with cosine similarity. Therefore, in Qdrant and other vector DBs, it is often used as a quick metric: the higher the value, the closer in meaning.

Pros and Cons

  • Pros: faster to compute than cosine, no square root.
  • Cons: depends on vector length — without normalization, longer vectors 'win' simply due to length.

See Also

← All terms