Vector Projection Calculator
Compute the projection of vector a onto vector b, returning both the projection vector and the scalar projection.
Signed length of the shadow of a along b
- 1
Dot product a·b
3 × 1 + 4 × 0 = 3Sum of component-wise products of a and b. - 2
Magnitude |b|
√(1) = 1 - 3
Scalar projection
3 ÷ 1 = 3Signed length of the shadow of a along the direction of b.
How does this calculator work?
The projection of a onto b has projection vector (a·b / b·b)·b and scalar projection a·b / |b|. Enter equal-length vectors a and b (b non-zero); the tool computes the dot products, the magnitude of b, and returns both the projection vector along b and its signed scalar length.
Formula
How this is calculated
Enter two vectors a and b with the same number of components, separated by spaces or commas. The calculator parses each into a numeric list and requires equal lengths and a non-zero b.
It computes the dot product a·b = Σ aᵢbᵢ and b·b = Σ bᵢ². The magnitude of b is |b| = √(b·b). The scalar projection (the signed length of a measured along the direction of b) is a·b / |b|. The projection vector proj_b(a) = (a·b / b·b)·b scales b by the ratio a·b / b·b, giving the component of a that lies along b, component by component.
The scalar projection is negative when a points opposite to b and zero when a is perpendicular to b. The result is undefined when b is the zero vector because b·b = 0, so that case is rejected. The plot shows the first two components of a, b, and the projection; higher-dimensional inputs still compute exact numeric results.
Frequently asked questions
The scalar projection is a single number, a·b / |b|, giving the signed length of a along b. The vector projection (a·b / b·b)·b is an actual vector pointing along b with that length.
Projection divides by b·b (and |b|). If b is the zero vector, b·b = 0 and the projection is undefined, so the calculator asks for a non-zero b.
Yes. Enter any equal-length vectors; the math works in any dimension. The 2D plot simply shows the first two components.
Also known as
TG we-Calculate Editorial Team. (2026). Vector Projection Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/vector-projection-calculator
TG we-Calculate Editorial Team. "Vector Projection Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/vector-projection-calculator.
TG we-Calculate Editorial Team, "Vector Projection Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/vector-projection-calculator
@misc{wecalculate_vector_projection_calculator, title = {Vector Projection Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/vector-projection-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
