u·v = |u||v|cos(θ). Measures how much two vectors point in the same direction. Core operation in attention: Q·Kᵀ computes similarity between queries and keys.
Try: set u and v to 90° apart (θ=90°) - dot product = 0. They carry zero shared information.
The dot product u·v = |u||v|cos(θ) is the single most-used operation in machine learning - it appears in attention (Q·Kᵀ), cosine similarity, projections, and neural network layers. This visualization shows two 2D vectors with adjustable angles and magnitudes. Click Project to animate the projection of v onto u - the geometric interpretation of the dot product.
Drag vector angles and lengths to see dot product change
Animate projection of v onto u with geometric interpretation
See when θ=90° makes vectors orthogonal (dot product = 0)
Foundation for understanding transformers, attention, and retrieval
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.