COURSE 04L2100% FREE
Verified 2026-08-10

Dot products and similarity

A **dot product** combines two vectors into one number that reflects how aligned they are. In AI, it often stands in for **similarity**—especially after vectors are normalized.

What it is

A dot product combines two vectors into one number that reflects how aligned they are. In AI, it often stands in for similarity—especially after vectors are normalized.

Why it matters

Embeddings, attention scores, and many recommenders lean on “how close are these vectors?” Understanding the picture prevents treating cosine similarity as magic.

How it works (plain)

If two arrows point the same way, their dot product is larger (for a given length). If they point opposite ways, it shrinks or goes negative. Cosine similarity focuses on angle, not raw length.

Everyday example

Two playlists that share many “vibe dimensions” score as similar—even if one playlist is longer.

Try it

Write two 3-number vectors for “sports car” vs “family van.” Guess which pair of dimensions differ most.

Myths

⚠️ Myth: Highest similarity always means “same meaning.”
✓ Reality: It means close in that embedding space—which can be weird or biased.
⚠️ Myth: Longer vectors are automatically “more similar.”
✓ Reality: Length and angle are different; cosine separates them.

Sources