← Curriculum map
L03 · Phase 2 · 20 min

Similarity and the Dot Product

If words are arrows on a meaning map, how might a system tell whether two of them point the same way?

Dot Product Visualizer

ab
a = [3, 4]b = [4, 5]
a·b = (3×4) + (4×5) = 32cosine similarity ≈ 1.00

Nearly the same direction — both point 'toward hot-water hardware'.

Prototype note: these are 2-D toy vectors for illustration, not real embedding vectors — the arithmetic (dot product, magnitude, cosine similarity) is exactly the real formula, just applied at a scale small enough to draw.

Depth ladder

If two arrows on the meaning map point roughly the same way, the words they represent are related — 'coil' and 'heater' point together, while 'football' points somewhere else entirely. The dot product is a way of turning 'pointing the same way' into an actual number, so a computer can compare millions of word-pairs instead of eyeballing a picture.

Knowledge check

Given two 3-number vectors, compute the dot product by hand and say whether they are 'compatible'.