The vector space model is a classic way for a search system to compare text. It represents every document, and every query, as a list of numbers: one number per word in the collection's vocabulary, showing how important that word is in that text. Two texts that use the same important words in similar proportions get similar lists, and the system ranks documents by how similar their list is to the query's.
Gerard Salton's SMART retrieval system at Cornell built search around this idea, and the 1975 paper "A vector space model for automatic indexing" by Salton, Wong and Yang is the usual reference for it.
How the model works
- Build the vocabulary. Every distinct term in the collection becomes one dimension. Very common words (stop words) are often dropped, and words may be reduced to their stem (stemming).
- Weight each term. The simplest weight is a count of how often the term appears (term frequency). The usual choice is TF-IDF, which also lowers the weight of terms that appear in many documents. That second part, inverse document frequency, comes from Karen Spärck Jones's 1972 paper on term specificity.
- Compare with cosine similarity. The system measures the angle between the query vector and each document vector. A cosine of 1 means the same direction (the same mix of terms); 0 means no terms in common.
- Rank. Documents are sorted by their cosine score.
Cosine looks at direction, not length. A long article that uses the query terms in the same proportion as a short one scores the same, so longer documents don't win just by having more words.
A small worked example
Take the query "running shoes" and two documents, after dropping the stop word "for":
- Document A: "running shoes for trail running"
- Document B: "shoes"
With raw counts over the vocabulary (running, shoes, trail), the vectors are:
| running | shoes | trail | |
|---|---|---|---|
| Query | 1 | 1 | 0 |
| Document A | 2 | 1 | 1 |
| Document B | 0 | 1 | 0 |
Document A's cosine with the query is 3 ÷ (√2 × √6) ≈ 0.87. Document B's is 1 ÷ √2 ≈ 0.71. A ranks first because it covers both query terms, even though it also contains a word the query lacks. B still gets a score for its partial match.
Compared with Boolean search
Before the vector space model, retrieval systems mostly used Boolean search: a document either matched the query's AND, OR and NOT conditions or it didn't.
| Boolean model | Vector space model | |
|---|---|---|
| Match | Yes or no | A score between 0 and 1 |
| Partial matches | Excluded | Ranked lower |
| Term weights | None | Counts or TF-IDF |
| Result | An unordered set | A ranked list |
Where the model falls short
- It ignores word order. "Dog bites man" and "man bites dog" get the same vector. That's why it's called a bag-of-words model.
- It doesn't know synonyms. "Car" and "automobile" are separate dimensions, so a document about automobiles scores zero for "car".
- It doesn't know senses. "Apple" the fruit and "Apple" the company share one dimension.
Later methods tackled these gaps. Latent semantic analysis compresses the term dimensions into fewer "concept" dimensions. Today's embeddings go further: a neural model produces short, dense vectors in which related words and passages sit close together, which is the basis of vector search. The geometry is the same idea, points compared by angle, with learned dimensions instead of one per word.
What it means for SEO today
Modern search engines don't rank pages with a plain vector space model; they combine many systems. The model is still worth knowing for two reasons. It's the clearest explanation of why matching a query's terms, and the terms that usually appear with them, makes a page look relevant to a text-based system. And it's the idea behind TF-IDF content tools, so it tells you their limits: they compare word statistics, and a page can score well on them and still fail to answer the reader's question.