If a word is a vector, then the difference between two words is a direction — and you can add and subtract those directions to travel across meaning.
Last page you saw that nearby vectors mean similar things. Here's the surprising part: the difference between two vectors is itself meaningful. The arrow from king to man points the same way as the arrow from queen to woman — it's the "royal → commoner" direction.
So you can do arithmetic on meaning. king − man strips away "royalness" leaving the male→neutral leftover; + woman then swings it female — and you land on queen. Nothing below is looked up as an answer: the widget does the subtraction, then searches every word for the nearest one.
Heads-up: this page uses a separate little demo vocabulary (man / woman / king / queen …) with its own axes [gender, royalty, age] — not the cat / sat / it … sentence tokens from the other pages. It needs clean gender and royalty axes for the analogy to land exactly; king is not a row in the sentence table.
TRY → Leave it on king − man + woman and read the big word: queen, cos = 1.00. Now change any dropdown, or tap a preset — every result is the arithmetic in the box run through a nearest-word search, computed on the spot. There is no lookup table of answers.
Each word is a 3-number vector: [gender, royalty, age], where gender is −1 male / +1 female, royalty is 1 for royals, and age is 1 for the young. The whole calculation is three subtractions and additions, done slot by slot.
king − man + woman, worked one dimension at a time:
gender: −1 − (−1) + 1 = 1
royalty: 1 − 0 + 0 = 1
age: 0 − 0 + 0 = 0
Result [1, 1, 0] — that is queen exactly (female, royal, adult), so the cosine is 1.00. Subtracting man and adding woman flipped only the gender slot; the royalty slot never moved, so we stayed royal and just changed sex.
prince − boy + girl, the same way:
gender: −1 − (−1) + 1 = 1
royalty: 1 − 0 + 0 = 1
age: 1 − 1 + 1 = 1
Result [1, 1, 1] = princess (female, royal, young). Same male→female move, but this time the "young" slot rode along untouched.
The widget then measures cosine similarity from the result to all eight words and keeps the largest — excluding A, B and C so the answer can't just be one of the inputs. Because our little vocabulary is built on clean axes, the intended analogies land exactly on a real word (cos 1.00); an off-target combo still returns the honest nearest word, just with a lower score.
Differences between vectors are directions of meaning. Add and subtract them and you navigate — the "answer" is just the real word the math lands nearest to.