Skip to content
ENExplore Calculators

Vector Projection Calculator

Project one vector onto another and compute the scalar and vector projections.

About Vector Projection Calculator

The vector projection of A onto B is the component of A in the direction of B: proj_B(A) = (A·B / ||B||²) × B. The scalar projection is A·B / ||B|| (the signed length of the shadow). The orthogonal component A − proj_B(A) is perpendicular to B.

Formulas

Vector Projection

proj_B(A) = (A·B / ||B||²) × B

A
Vector to project
B
Direction vector

Scalar Projection

comp_B(A) = A·B / ||B||

A
Vector to project
B
Direction vector

Worked example

With the default values below, Vector Projection Calculator returns proj_B(A) (vector projection) of [3, 0]. Change any input above and every figure here is recalculated in your browser.

Inputs used

Vector A (to project)
3, 4
Vector B (onto)
1, 0

Results

proj_B(A) (vector projection)
[3, 0]
Scalar projection
3.000000
Orthogonal component
[0, 4]

Step by step

  1. 1A= [3, 4]
  2. 2B= [1, 0]
  3. 3A·B= 3
  4. 4||B||²= 1
  5. 5proj_B(A) = (A·B/||B||²) × B= [3, 0]
  6. 6Orthogonal remainder A − proj= [0, 4]

Assumptions and limits

  • The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

What is the difference between scalar and vector projection?

Scalar projection is the signed magnitude (a number). Vector projection is the actual vector in the direction of B whose length equals the scalar projection.

What is the orthogonal component?

It is A minus the projection: the part of A perpendicular to B. Together, the projection and orthogonal component reconstruct A.

Vector Projection Calculator | Calcrivo