Vectors
Adding up the arrows…
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Vectors
Adding up the arrows…
An arrow you can drag and a list of numbers you can type are the same object. Build from coordinates to dot and cross products, projections, and planes in 3D.
An arrow and a list of numbers are the same thing. Drag the tip and the components change; type the components and the arrow moves.
|v| = √(x² + y²)Start hereArrow = NumbersTip to tail, the parallelogram rule, stretching and flipping with a scalar, and subtraction as adding the opposite.
a + b = (a₁ + b₁, a₂ + b₂)Vectors and CoordinatesTip to TailOne vector's shadow on another, times its length. Its sign says same direction, perpendicular or opposite.
a · b = a₁b₁ + a₂b₂ = |a||b| cos θVector Addition and ScalingShadow × LengthIn 3D, a × b stands perpendicular to both, as long as the parallelogram they span is large — and flips when the order does.
|a × b| = |a||b| sin θDot ProductRight-Hand RuleDrop a perpendicular onto a line in 2D, then onto a plane in 3D. What is left over is always at right angles.
proj_a b = (a · b / a · a) aDot ProductDrop a PerpendicularThree ways to measure length — taxicab, straight-line and largest component — and the unit "circles" each one draws.
‖v‖ₚ = (∑ |vᵢ|ᵖ)^(1/p)Vectors and CoordinatesMeasure, Then DivideA line from a point and a direction, a plane from a point and a normal, where the two meet, and how far a point is from a plane.
n · (x − p) = 0Cross ProductPoint + DirectionMatrices, eigenvectors and least squares are all statements about vectors. Getting comfortable dragging arrows here is what makes those pages feel like geometry instead of bookkeeping.
Every lighting calculation is a dot product, every surface normal is a cross product, and every ray cast is a line meeting a plane. These are the inner loops of a renderer.
Embeddings are vectors. Cosine similarity is the dot product of unit vectors, and regularisation is a choice of norm. The pictures here are the intuition behind those numbers.