InfyCalculator
➗

Vector Projection Calculator

Project vector a onto vector b in 3D: get the projection vector, its scalar component and the perpendicular (rejection) part.

a — x
a — y
a — z
b — x
b — y
b — z
Loading calculator…

How it works

proj_b a = ( (a · b) / |b|² ) b · scalar component comp_b a = (a · b) / |b| · rejection = a − proj_b a

The projection of a onto b is the "shadow" of a in the direction of b. It is found by scaling the unit vector along b by the scalar component (a·b)/|b|, which simplifies to multiplying b itself by (a·b)/|b|². What is left over, a minus its projection, is the rejection — the component of a perpendicular to b. Projection and rejection always add back to the original vector.

Worked example

Projecting a = (3, 4, 0) onto b = (1, 0, 0): a·b = 3 and |b|² = 1, so the scalar is 3 and proj_b a = 3·(1, 0, 0) = (3, 0, 0). The rejection is (3, 4, 0) − (3, 0, 0) = (0, 4, 0), which is indeed perpendicular to b.

Sources: Vector projection (Wikipedia)

Frequently asked questions

What is the difference between the vector and scalar projection?

The scalar projection (a·b)/|b| is a single number — the signed length of a’s shadow along b. The vector projection points that length in the direction of b, giving an actual vector. A negative scalar means the projection points opposite to b.

Why can I not project onto the zero vector?

The formula divides by |b|², and the zero vector has |b|² = 0. It also has no direction to project onto, so the operation is genuinely undefined — the calculator flags this instead of returning a bad number.

What is the rejection used for?

The rejection is the part of a orthogonal to b. Splitting a vector into a component along b and a component perpendicular to b is the core idea behind Gram–Schmidt orthogonalisation and resolving forces in physics.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.