Vector
What is a vector?
A vector is an ordered list of numbers representing a point or direction in a mathematical space. In AI systems, vectors often encode features of text, images, audio, users, or other data so that the representations can be compared.
For example, a simple three-dimensional vector might be [0.2, -0.5, 0.8]. Real AI vectors can contain many more values.
How vectors are used in AI
An embedding model converts an item into a vector. The system can then calculate how close that vector is to other vectors using a similarity or distance measure.
If two text embeddings are close, the underlying passages may discuss related concepts. A search system can embed a query, compare it with stored document vectors, and return nearby items.
The coordinate values are learned by the model. Individual dimensions usually do not correspond to clean labels such as “price” or “sentiment.”
Vector versus embedding
A vector is the mathematical data structure. An [embedding](/glossary/embedding/) is a learned vector representation designed to capture useful relationships. Vectors can also represent positions, measurements, or manually engineered features that are not embeddings.
A vector database stores and searches vectors, while the embedding model creates them. The database does not determine meaning by itself.
Similarity is contextual
Common comparison methods include cosine similarity, dot product, and distance measures. The correct choice depends on how the embedding model was designed and how vectors were normalized.
A high similarity score does not prove that two items are factually consistent or appropriate for the same user. It only reflects closeness under that representation and metric.
Simple example
Imagine three passages: one about password resets, one about login security, and one about office catering. Their embeddings may place the first two vectors close together and the catering vector farther away. A query about changing credentials can therefore retrieve the related security passages.
Metadata filters may still be needed to select the correct product version or region.
Why vectors matter
Vectors let software compare complex content efficiently without relying only on exact wording. They support semantic search, RAG, recommendations, clustering, and memory retrieval.
Builders should treat vectors as model-dependent representations. Changing the embedding model, preprocessing, or similarity metric can change search behavior. See [Memory in AI Agents](/memory-in-ai-agents/) for how vector retrieval can help agents recall relevant information.
Learn More
Memory in AI AgentsContinue with the full AIRundown guide →