← Mathematical compendium

Published equation contexts

sim⁡(u,v)=⟨u,v⟩∥u∥ ∥v∥\operatorname{sim}(u, v) = \frac{\langle u, v \rangle}{\lVert u \rVert \, \lVert v \rVert}

Why this formula appears here

The conventional similarity metric is the cosine of the angle between two vectors: sim⁡(u,v)=⟨u,v⟩∥u∥ ∥v∥\operatorname{sim}(u, v) = \frac{\langle u, v \rangle}{\lVert u \rVert \, \lVert v \rVert}. Cosine became conventional for reasons that are mostly good. It is scale-invariant, which matters when vector norms correlate with nuisance properties like token frequency or document length. It reduces to an inner product on normalised vectors, which is cheap and which most approximate indexes support natively. And it is what several influential embedding models were explicitly trained to make meaningful: Sentence-BERT fine-tuned siamese networks precisely so that sentence embeddings could be compared with cosine similarity, cutting a pairwise-comparison workload from roughly 65 hours to…

Read the full article-specific guide →

Read the representative guide

∥u∥ ∥v∥\lVert u \rVert \, \lVert v \rVert

Denominator: lVert u rVert lVert v rVert

The complete quantity below the fraction bar; it must be nonzero for this division.

Read this term in its guide →

How to interpret it

With a fixed numerator, increasing a nonzero denominator reduces the fraction. Read it with the definitions, units, and assumptions supplied by the article.

Research cited beside this formula

Published contexts (1)

A symbol can carry a different meaning in another article. Each occurrence keeps its own guide and term definitions.

sim⁡(u,v)=⟨u,v⟩∥u∥ ∥v∥.\operatorname{sim}(u, v) = \frac{\langle u, v \rangle}{\lVert u \rVert \, \lVert v \rVert}.

Equation 1 · AI Agents & Systems

Embeddings and the Geometry of Similarity

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions.

The conventional similarity metric is the cosine of the angle between two vectors: sim⁡(u,v)=⟨u,v⟩∥u∥ ∥v∥\operatorname{sim}(u, v) = \frac{\langle u, v \rangle}{\lVert u \rVert \, \lVert v \rVert}. Cosine became conventional for reasons that are mostly good. It is scale-invariant, which matters when vector norms correlate with nuisance properties like token frequency or document length. It reduces to an inner product on normalised vectors, which is cheap and which most approximate indexes support natively. And it is what several influential embedding models were explicitly trained to make meaningful: Sentence-BERT fine-tuned siamese networks precisely so that sentence embeddings could be compared with cosine similarity, cutting a pairwise-comparison workload from roughly 65 hours to…

Equation guide → · Article →