Vector Projection Calculator
Project vector a onto vector b (2D).
The projection of a onto b is the shadow of a in the direction of b.
The math behind it
The scalar projection is (a·b)/|b|. The vector projection multiplies the unit vector of b by that amount: (a·b/|b|²)·b.
Worked example
(3, 4) onto (1, 0) → scalar 3, vector (3, 0).
FAQ
What if b is the zero vector?
Projection is undefined because you cannot divide by zero length.