Chapter 4 · Part 2
Doing math on meaning
Here's the result that made researchers sit up. Once words are vectors, you can add and subtract them — and the answers make sense. The famous example:
king − man + woman ≈ queen
Take the vector for king, subtract man, add woman, and you land almost exactly on queen. Meaning, it turns out, has a geometry you can do arithmetic in.
Scroll to walk the equation through the space.
Four words sit in a neat parallelogram: man and woman, king and queen.
Relationships are directions
The key insight: a relationship between words shows up as a consistent direction in the space. The arrow from man to woman points the same way as the arrow from king to queen — both encode "make this more feminine." Because it's the same direction, subtracting man and adding woman moves any word along that axis.
To actually find the answer word, you compute that target vector and look for the nearest real word to it (using the cosine similarity from Chapter 2):
target = embed("king") - embed("man") + embed("woman")
# find the existing word whose vector is closest to the target
best = max(vocabulary, key=lambda w: cosine(embed(w), target))
print(best) # -> "queen"Why this is more than a parlor trick
It's a window into what the model learned. These directions weren't programmed — they fell out of predicting words from context (Chapter 3). The fact that "gender," "capital city," and "verb tense" became clean directions tells us the space is genuinely organized by meaning, not just memorizing which words look alike.
The same property is what lets embeddings power recommendations and search: "find me something like this but more that" is just a step in a direction. We've built words, measured them, learned them, and done math with them. Next we leave words behind entirely — and embed everything.