In the Stanford Information Retreival book, I'm trying to figure out how a query is turned into a unit vector. Consider the query q = jealous gossip. This query turns into the unit vector ⃗v(q) = (0, 0.707, 0.707) on the three coordinates of Figures 6.12 and 6.13. How is (0, 0.707, 0.707) achieved?


It's a standard vector normalization. A vector is said to be normalized if its distance from the 0 [
(0,0,0)in your case] is exactly 1, which as you can see is the case in this vector (up to rounding difference).Normalization is done by:
In your example, the query "jealous gossip" produces the unormalzied vector
(0,1,1)(since the dictionary consists of the 3 words affection, jealous, gossip). By invoking the above algorithm you gets=2, and thus the normalized vector isn=(0/sqrt(2), 1/sqrt(2), 1/sqrt(2)) ~= (0,0.707,0.707)