Vector
A set of numbers for several items, written in a fixed order
- A vector is a set of numbers for several items, written in a fixed order. Reorder them and the meaning changes.
- Because it's a bundle rather than a single number, it can describe one thing along several dimensions at once.
- How many items it holds is called its dimension. Vectors used in AI usually run to a few hundred or a few thousand.
- How alike two vectors are gets worked out by comparing matching positions, so they need the same number of items to be compared at all.
- Inside an AI, text, pictures, and sound all get turned into vectors. It's the only shape the model knows the world in.
Contents
1The analogy
A business card packs information into fixed lines: company on the first line, department on the next, title below that, region at the bottom. Lay two cards side by side and comparing line by line gives a rough sense of how alike two people's positions are. A vector works the same way: it fixes the order of the items first, then just lists the values.
Order is what matters. If one card's second line is department and another's second line is region, laying them side by side proves nothing. A vector only makes sense for comparison when the first position means the same thing, and the second position means the same thing, for everyone involved.
Cards with different numbers of lines can't be compared either. A card with five fields and one with three don't line up no matter how you lay them side by side.
2In detail
It's a number line with a fixed order
The first thing people miss about a vector is the order. Three values aren't just any three numbers — they're the value of the first item, the second item, and the third item, in that order. Shuffle the positions and you're pointing at something completely different.
That rule is exactly what makes the math simple. Adding two vectors just means adding first-to-first and second-to-second. Computers can run thousands of these additions at once precisely because the positions always line up.
The item count is the dimension
Two items and you can plot a single point on paper. Three, and it's a point inside a room. Past four items you can't draw it anymore, but the math works exactly the same — the limit is human eyesight, not mathematics.
Vectors used in AI usually run to a few hundred or a few thousand items. More items capture finer distinctions, but storage and computation grow right along with them. That's why lighter, shrunk-down vectors get built for jobs where speed matters more than precision.
Adding and subtracting gives you a direction
A vector is a point, but it's also a direction. Draw an arrow from the origin to that point and you get both a direction and a length. Add two vectors and you land where the arrows would chain together; subtract one from the other and you get the direction from one point to the other.
This property does real work inside AI. Subtract one meaning-vector from another and the result is a direction standing for "the relationship between these two." Add that direction to a different vector and you land somewhere with a similar relationship. That's where the observation comes from that the direction from a country's name to its capital looks similar across many countries.
Closeness gets measured as an angle
To judge how alike two vectors are, direction usually matters more than distance. A narrow angle between two arrows from the origin means similar; a wide one means different.
Why angle instead of length? A short retelling of a story and a long one produce arrows of very different length, but they still point roughly the same way. Looking only at direction keeps you from being thrown off by how much was written, and lets you catch how alike the content actually is.
Inside a model, everything is a vector
A model can't handle letters or pictures directly. Text cut into pieces passes through an embedding and becomes a vector; a photo becomes a vector of brightness values; sound becomes a vector of intensity values over time.
Every layer it passes through turns that vector into a different vector. What a model does, in the end, is repeatedly take in a vector and hand back another one. The letters we see on screen are just the final step, translated back for people to read.
3More precisely
A vector is a one-dimensional array of same-type values listed in order, and its item count is its dimension. Stack several vectors and you get a matrix; stack matrices and you get a tensor. Most of the computation inside a model comes down to multiplying vectors by matrices, layer after layer, until the last vector produced gets turned back into something a person can read.
Measuring closeness by angle is called cosine similarity: two vectors pointing in exactly the same direction score close to 1, and two pointing in unrelated directions score close to 0. Straight-line distance gets used too, and which one works better depends on how the vectors were built.
The analogy has a limit. Each line on a business card carries a label like "department" or "region" that a person can read. Each position in a model's vector carries no such label — it's an axis training happened to settle on, and nobody can say what it stands for. A person fills in a business card by hand, too, while a model's vector is a value that fell out of training on its own.
4Try it yourself
5Common misconceptions
It's easy to think a vector is just a plain list of numbers, but actually every position carries a fixed meaning, so reordering it points at something else entirely.
It's easy to think more items is always better, but actually storage and computation cost grow right along with them, so picking a size that fits the job usually wins.
It's easy to think vectors from two different models can be compared, but actually their positions mean different things, so lining them up and measuring means nothing.
7One-line summary
In shortA vector fixes the order of a set of items and simply lists their values, and it's the one shape everything moving through an AI takes.
Spotted an error or have a better analogy? Suggest an edit · Last updated2026-09-02