Vectors are just lists of numbers with rules.
In the LLM page, every token becomes a vector. The model adds vectors, scales them, compares them with dot products, and multiplies them by matrices. This page shows those operations with small numbers.
A vector is an ordered list
A vector is a row of numbers where position matters. In 2D, you can draw it as an arrow. In an LLM, a vector may have thousands of dimensions, so we usually draw it as a row of cells.
For language models, the numbers are not screen coordinates. They are learned features. A 4D toy token vector might look like this:
Add matching positions
Vector addition is component-by-component. The first number adds to the first number, the second to the second, and so on. The vectors must have the same length.
In the LLM explainer, positional vectors are added to token embeddings this way: embedding + position = input vector.
Multiplication can mean a few things
When people say "multiply vectors," check which operation they mean. The two common simple versions are scaling by one number and element-wise multiplication.
Every component gets multiplied by the same number: 2 x 2 = 4, and 2 x 1 = 2. In attention, a weight like 0.57 scales a whole Value vector.
Element-wise multiplication is often used for masks and gates: each position can be kept, weakened, flipped, or zeroed independently.
A dot product turns two vectors into one score
The dot product is "multiply matching positions, then add the results." It is the key comparison operation in attention: a Query dot Key gives a relatedness score.
A bigger positive dot product can mean the vectors point in similar directions, or that one vector is simply much longer. A score near zero means they do not line up much. A negative score means they point against each other.
Both of these are correct. Raw dot product is:
A matrix turns one vector into a new vector
A matrix is a grid of numbers. When a vector multiplies a matrix, each output number is a dot product between the input vector and one column of the matrix.
Vector diagram view: the matrix is three column vectors. The input vector is dotted with each column.
This is why learned matrices are so central in LLMs. A matrix is a bank of learned recipes. Each column asks one question about the input vector, and the answers become the next vector.
Where these operations appear in the explainer
The LLM page uses these same operations repeatedly. The real vectors are wider and the matrices are huge, but the mechanics are the same.