Home/Mathematics/Vector Projection (Scalar Projection)

Formula & Calculator

Vector Projection (Scalar Projection)

Calculates the scalar projection of vector a onto vector b, representing how much of a points in the direction of b.

MathematicsLinear AlgebraResearch

Scalar Projection CalculatorComponent of a onto b

compb(a) = (a · b) / |b|
a · b = dot product  ·  |b| = magnitude of b
⟹ Computea = (a₁, a₂, a₃), b = (b₁, b₂, b₃)
Vector a
Vector b
Please fix the errors above.
Solve for:
Presets:
Scalar Projection
a: b: |b|:
✓ Copied!
Projection Value
Positive Zero Negative
compb(a) = (a · b) / |b|  ·  Gives the signed length of a's projection onto b. Vector projection = comp · (b / |b|)

Variables

SymbolQuantityUnit
comp_b(a)Scalar projection of a onto b
a . bDot product of a and b
|b|Magnitude of vector b

What it means

The scalar projection (or component) of vector a onto vector b is the length of the shadow of a in the direction of b. It is computed as (a·b)/|b|. This gives a scalar that can be positive, negative, or zero depending on the angle. The vector projection is then (comp_b(a)) times the unit vector in the direction of b. This concept is used in physics to resolve forces into components, in mechanics for work (projection of force along displacement), and in geometry to find distances from a point to a line. It is also used in machine learning for feature extraction and in computer graphics. Understanding projection is essential for vector analysis and its practical applications.

Worked example

Scalar Projection – Two Examples

Real‑World
Scenario: A physicist projects force vector a=(10,0) onto direction b=(4,0) – comp = a·b/|b|.
ParameterValue
a·b40
|b|4
1comp = 40/4 = 10
Result 10 ✓ Projection magnitude
Scenario: A student projects (2,3) onto (1,0) – the x‑component.
ParameterValue
a·b2
|b|1
1comp = 2/1 = 2
Result 2 ✓ X‑component
Insight: Scalar projection gives the signed length of a projected onto b.

Common mistakes

  • Scalar projection: comp_b(a) = (a·b) / |b| – the signed length of the projection of a onto b.
  • Result: A scalar (can be negative if the angle is obtuse).
  • Vector projection: Different from scalar projection – the vector projection is ((a·b)/|b|²)·b.
  • Units: The scalar projection has the same units as |a| (since a·b has units of |a||b|, divided by |b| gives |a|).
  • Applications: Used in physics (work = component of force along displacement).

Applications

The scalar projection of vector a onto vector b, comp_b(a) = (a·b)/|b|, gives the signed length of the projection of a along the direction of b. This is used to resolve forces into components, to find the component of a vector in a given direction, and to perform vector decomposition. Engineers use it in statics to determine the effect of forces along specific axes, in robotics for joint space to task space transformations, and in computer graphics for shadow projections. By applying scalar projection, professionals can break down complex vector interactions into simpler components, enabling efficient analysis and design.

  • Resolution of forces and moments into components
  • Vector decomposition along basis vectors in mechanics
  • Coordinate transformations and rotations
  • Shadow and lighting calculations in computer graphics
  • Structural analysis – determining load components on members