The coordinate formula for the dot product looks like bookkeeping:
Geometrically, it answers a more focused question: how much of one vector points in the direction of the other? The answer is a signed projection, scaled by the length of the vector providing the direction.
The algebraic score
The similarity interpretation is already present in the coordinate formula. Regard as a row of weights applied to the coordinates of :
Each coordinate contributes according to two things: how large the two components are, and whether their signs agree. For a single coordinate,
so the whole score can be read as
When and have the same sign, that coordinate adds to the score. When they have opposite signs, it subtracts from the score. A coordinate contributes little when either component is small. The dot product is therefore an algebraic agreement score: it rewards large components occurring in the same signed directions and penalises components pointing against one another.
For example, the three vectors below all have length :
The first comparison agrees in both coordinates, the second has equal positive and negative contributions that cancel, and the third disagrees in both coordinates. The numbers , , and are not arbitrary labels: they record reinforcement, cancellation, and opposition in the coordinate-wise products.
The coordinate picture depends on choosing perpendicular axes, but the score itself is the same geometric quantity in every orthonormal coordinate system. The projection formula below explains why this algebraic agreement is directional similarity rather than merely a pattern of matching signs.
The shadow on a direction
Take two non-zero vectors and , and let be the angle between them. Turn into a unit vector:
The scalar is the signed length of ‘s shadow on the line pointing along . A shadow in the same direction is positive; one in the opposite direction is negative; a perpendicular vector has no shadow at all.
The notation matters here. means the projection of onto the line determined by . The target is the infinite line
not merely the finite arrow from the origin to the endpoint of . The projection is a vector parallel to . When we draw it from the origin, its endpoint is the foot of the perpendicular dropped from the endpoint of to that line. It can lie beyond the endpoint of , on the opposite ray, or at the origin.
The shadow has length
The ordinary dot product uses rather than the unit direction . It therefore scales this shadow by :
So the dot product is not just an angle measurement. It is a length-weighted signed shadow.
Three directions, three signs
The angle controls the sign and the amount of shared direction:
- : the vectors point partly in the same direction, so ;
- : the shadow disappears, so ;
- : the shadow points backwards, so .
For non-zero vectors, a zero dot product therefore means orthogonality, not that the vectors are unrelated. It says that neither vector has any component in the other’s direction.
The projection itself is the shadow turned back into a vector:
The scalar tells us how far to travel along . The remaining vector
is perpendicular to . The dot product is the number that separates these two pieces.
A small catalogue of cases
The target line and the direction of the result become clearer in concrete cases. “Same direction” means for some ; “opposite directions” means for some .
Identical vectors
Let . Since is already on the target line,
The projection is the whole vector, and the dot product is its squared length.
Same direction, different length
Let and . The projection is itself because lies on the line through :
The endpoint of lies beyond the endpoint of ; the target is an infinite line, not the finite arrow .
Opposite directions
Let and . The projection is still itself, but it lies on the opposite ray:
The negative sign records that the shadow points backwards along .
Perpendicular vectors
Let and . The perpendicular from reaches the origin, so
The zero vector
If , then its projection and dot product are also zero. But the zero vector has no direction, so its angle with is undefined. The statement “zero dot product means perpendicular” is only valid for non-zero vectors.
An oblique pair
Let and . Then
so splits into a part along and a perpendicular part. The dot product is .
The subscript also tells us which vector supplies the target line. In the oblique example,
These projections are different because they land on different lines, even though the dot product itself is symmetric: .
Why the coordinate sum works
Choose perpendicular unit directions . Write
Expanding the dot product gives
Perpendicular unit directions satisfy
Every cross-direction term vanishes. Only matching components remain:
The familiar coordinate formula is therefore a geometric rule in disguise. It pairs the parts of and that lie along the same perpendicular axes, then adds their contributions. Components pointing along different axes do not contribute to the shared direction.
The length hidden in similarity
Two vectors can have a large dot product because they point similarly, because they are long, or both. If only direction matters, remove the length factors:
This is the basis of cosine similarity. It compares shadows after both vectors have been scaled to length one. The ordinary dot product keeps the same geometric comparison but lets longer vectors count more heavily.
The dot product is therefore best pictured as a shadow cast onto a direction: signed by whether the vectors agree, measured by how much of one lies along the other, and enlarged by the length of the measuring vector.