Foundations — Vector databases and embeddings
The parent note Vector databases and embeddings throws a lot of notation at you in one breath: , , , , , . If any of those made you pause, this page is for you. We build each one from absolutely nothing, anchor it to a picture, and only then let the next symbol lean on it.
1. A number line, then a plane — what "space" means
Now glue two number lines together at right angles — one horizontal, one vertical. Any point now needs two numbers to pin it down: how far right, how far up. That pair, like , is a location on a flat sheet (a plane).

WHAT we just did: we upgraded from "one number = one position on a line" to "two numbers = one position on a plane." WHY the topic needs it: an embedding is a long list of numbers, not just two. But the leap from 1 number to 2 is the same leap as from 2 to 768 — you just keep adding axes. If you understand the plane, you understand the idea; the rest is scale.
2. The arrow: what a vector is
Look at the figure above: the arrow labelled starts at the origin and its tip lands at . Two facts about an arrow matter to us:
- Direction — which way it points.
- Length — how far it reaches.
3. Coordinates and the subscript
WHY we need this: we cannot write out 768 separate letters. The subscript lets us say "the -th number of " once and mean all of them. It is bookkeeping, nothing deeper.
4. Dimension and the space
5. The summation symbol
Worked unrolling, so it is never mysterious again. For : That is the entire meaning — a loop that adds. WHY the topic needs it: dot products and norms both add up many small pieces, and writing by hand is absurd. says it in three symbols.
6. Length of an arrow: the norm

Pythagoras says: (long side) = (across) + (up). So the length is
WHY the topic needs it: two documents about dogs — a tweet and a whole essay — can point the same direction but have very different lengths. To compare meaning we must be able to measure and then cancel out length. The norm is the measuring stick. More in Vector Norms.
7. The angle between two arrows

WHY the topic needs it: the angle is the similarity signal. Look at the figure: the two mint arrows point almost the same way (tiny , very similar), while the coral arrow points off at a wide (unrelated). Turning "angle" into "a number between and " is the job of cosine, next.
8. Cosine: turning an angle into a similarity number
You don't need trigonometry to use it, because — as the parent shows — cosine can be computed straight from the coordinates via the dot product, without ever finding the angle first. That is the magic of the next symbol.
9. The dot product
Tiny example: .
The deep fact (proven in Dot Product) is that this arithmetic secretly equals length-times-length-times-cosine:
WHY this matters so much: rearrange it and you get the whole parent page's centerpiece, We divide by both lengths precisely to cancel magnitude (from §6) and leave only direction (from §7–8). The dot product is the cheap, coordinate-only route to the angle — no trigonometry needed. Databases love it because it is just "multiply and add," which hardware does at blazing speed.
10. Reading — counting the work
Here = how many stored vectors, = length of each vector. To compare a query against all stored vectors, each comparison touches numbers → total operations. For and that is nearly a trillion operations per query — too slow. That single realisation is why the parent introduces approximate search (HNSW and ANN Indexes); just means the work grows far more gently as explodes.
How these foundations feed the topic
Read it top-down: the arrow idea splits into how we address its numbers (index → sum), how big the space is (dimension → cost), and how we measure it (norm, dot, angle → cosine → similarity). All roads meet at the parent topic.
Equipment checklist
Cover the right side and answer out loud; reveal to check.
A vector is, geometrically, a
What does mean?
What is in ?
Unroll
Compute the norm and say what it measures
What does the angle tell us about two vectors?
Why report instead of itself?
Compute for
State the identity linking dot product, norms, and angle
Rearrange it to get cosine similarity
What does mean for exact k-NN?
Connections
- Parent topic: Vector databases and embeddings — everything here feeds it.
- Dot Product · Vector Norms · Cosine Similarity — the three measuring tools built above.
- Curse of Dimensionality — where high stops behaving like the 2D picture.
- HNSW and ANN Indexes — why forces approximate search.
- Retrieval-Augmented Generation · Prompt Engineering · Chunking Strategies · Contrastive Learning — the pipeline these foundations power.