Vectors
Adding up the arrows…
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Vectors
Adding up the arrows…
The closest point on a line or a plane is found by dropping a perpendicular. The dot product says where it lands, and what is left over is always at right angles.
The dashed line runs through the origin along a = (4, 1). Projecting b = (1, 3) onto it means finding the point on the line closest to b's tip.
The projection appears once the tour reaches it.
The fraction a · b / a · a is how many copies of a make up b's shadow. Dividing by a · a rather than |a| is what makes it work for an a of any length.