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.
How the Math Works
The Vector Projection Calculator uses the formula proj_ba = (a·b / |b|²) · b to find how much of vector a lies in the direction of vector b. First, it calculates the dot product of a and b, which measures their alignment. Then it divides by the squared magnitude of b to normalize the result. Finally, it multiplies by vector b to get the projected vector in the same direction as b. This gives the 'shadow' or component of a that points along b's direction.
Practical Applications
To use this calculator, enter the components of your two 2D vectors. For example, if you're analyzing forces in physics or breaking down motion into components, you'd input the force vectors and find the projection of one onto another. Engineers use this when resolving loads on structures, programmers when calculating reflections or shadows in graphics, and data scientists when projecting data onto principal components for dimensionality reduction.
Day-to-Day Use
This calculation helps in everyday scenarios like determining how much of your movement is actually forward when walking up a ramp, or finding the effective component of wind resistance when sailing. GPS navigation uses vector projections to calculate your position relative to destinations, and sports analysts use them to measure how much of a player's velocity contributes to scoring opportunities. Even in photography, understanding vector projection helps grasp how light falls on surfaces at different angles.
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.