In plain words
A vector is just an ordered list of numbers, like [0.47, 0.88]. With two numbers we can draw it on graph paper as an arrow from the corner: go 0.47 across, 0.88 up.
AI uses vectors to hold meaning. Every word, sentence or photo it handles is turned into one. The useful part is direction. Things with similar meaning get arrows pointing nearly the same way. "Chai" and "coffee" point close together. "Cricket" points somewhere else.
So to ask "how similar are these two?", the computer measures the angle between their arrows. A small angle means similar. This one trick powers search that understands meaning, "more like this" suggestions and much of what happens inside a language model.
Real AI vectors have hundreds or thousands of numbers, not two. We cannot picture that many directions, but the maths works exactly the same.
Everyday example
Giving directions in a new city
Ask two people the way to the railway station. One says "500 metres north, 200 east", the other "450 north, 250 east". Different words, nearly the same arrow, so we know they agree. A third says "300 south". That arrow points elsewhere. AI compares meanings the same way: it checks whether two lists of numbers point the same way.
Where the example breaks: Directions on a map have two numbers with clear meanings, north and east. An AI vector has hundreds, and no single number means anything a person could name. Meaning is spread across all of them together.
How it actually works
In maths a vector has a size and a direction. In AI the word mostly means a long list of numbers that a model reads, writes and compares.
Anything can become a vector
An embedding model turns text, images or audio into a vector of fixed length. OpenAI's text-embedding-3-small, for example, gives 1,536 numbers for any input; its larger model gives 3,072.
Similarity is the angle
The usual measure is cosine similarity: the cosine of the angle between two arrows. Pointing the same way gives 1, at right angles gives 0. It ignores length, so a long document and a short one on the same topic still match.
Directions can carry relationships
In 2013, researchers led by Tomas Mikolov showed that with word vectors, king minus man plus woman lands very close to queen. Differences between vectors can encode relationships such as gender or country to capital, though the effect is messier in practice than in demos.
Inside a language model, everything is vectors
Each token enters a transformer as a vector. Every layer reshapes those vectors with large grids of learned numbers called matrices. Attention itself is a set of vector comparisons.
Stored and searched at scale
A vector database keeps millions of vectors and finds the ones nearest to a question's vector very quickly. That is the search step behind retrieval-augmented generation.
- Typical size
- Word vectors are often 256 to 1,024 numbers long (Google ML Crash Course); OpenAI's larger embedding model uses 3,072
- Famous result
- "King - Man + Woman" is closest to "Queen" (Mikolov and colleagues, 2013)
- Word2vec
- 2013, Google: learned word vectors from 1.6 billion words in under a day
- Similarity score
- Cosine similarity, from 1 (same direction) to 0 (unrelated) to -1 (opposite)
Questions people ask
What is the difference between a vector and an embedding?
A vector is any ordered list of numbers. An embedding is a vector made on purpose to capture meaning, so similar things get similar vectors. Every embedding is a vector, but not every vector is an embedding.
Why does AI use vectors?
Computers are fast at arithmetic on lists of numbers. Once meaning becomes numbers, comparing two ideas is a quick calculation, and a neural network can transform them layer by layer. Vectors are the common language of almost all modern AI.
What is a vector database?
A vector database stores huge numbers of vectors and quickly finds the ones closest to a new one. Apps use it to find documents that match a question by meaning, not just by matching words.
What is cosine similarity in simple terms?
It measures how closely two arrows point the same way. A score near 1 means very similar, near 0 means unrelated. It is the most common way AI systems decide which text or image matches a search.
Is a vector in AI the same as a vector in physics?
The maths is the same: a quantity with direction and size, written as numbers. Physics uses two or three numbers, such as wind speed east and north. AI uses hundreds or thousands, and the directions stand for patterns in meaning instead of space.
Further reading
- Embeddings: Embedding space and static embeddingsGoogle for Developers, 2024
- Linguistic Regularities in Continuous Space Word Representations (Mikolov, Yih, Zweig)ACL Anthology, 2013
- Efficient Estimation of Word Representations in Vector Space (Mikolov et al.)arXiv, 2013
- Vector embeddings guideOpenAI, 2026