← Back to article

Equation 1 · Embeddings and the Geometry of Similarity

What does this equation mean?

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

Read the formula alongside the article passage below. Each part has a deeper page with its role in the equation, the supporting passage and nearby citations.

Start withlangle u, v rangle
Divide bylVert u rVert lVert v rVert
This relates tosim(u, v)
How to read the two sides of this formula. Follow the article passage for the meaning of each quantity.

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions. Read the equation part by part below; each part has a contextual explanation and a link to its mathematical background.

Read it piece by piece

uu

Symbol u

u is an argument of the function-like quantity on the left; its role is set by that function’s stated inputs.

Understand this part →

vv

Symbol v

v is an argument of the function-like quantity on the left; its role is set by that function’s stated inputs.

Understand this part →

=

=

The expressions on both sides represent the same quantity under the stated assumptions.

Understand this part →

See an illustrated explanation →
fraction

fraction

Divide the expression above the line by the one below it.

Understand this part →

See an illustrated explanation →
⟨u,v⟩\langle u, v \rangle

Numerator: langle u, v rangle

The complete quantity above the fraction bar.

Understand this part →

∥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.

Understand this part →

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.

What the article says around this equation

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 surrounding passage
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 about 5 seconds while preserving accuracy [ 5 ] .

Read the equation in its article →

Sources cited in the surrounding passage

These citations give research context. Read each source to check which claims it supports.

Return to Embeddings and the Geometry of Similarity

See this formula across 1 published context →

Browse the mathematical compendium →