Skip to content
CalculatorAtlas

Vector Projection Calculator

Tested

Projection of vector a onto vector b.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

The projection of a onto b is proj_b a = ((a · b) ÷ (b · b)) b, and the scalar projection is (a · b) ÷ |b|. Projecting (3, 4) onto (1, 0) gives (3, 0), with a scalar projection of 3.

Enter vectors A and B. The calculator returns the projection vector and the scalar projection.

Related tools: Vector Magnitude Calculator: Length (Euclidean norm) of a vector. Unit Vector Calculator: Unit vector in the direction of a vector. Vector Subtraction Calculator: Subtract one vector from another.

How to use the Vector Projection Calculator

  1. Type vector A, for example 1, 2, 3.
  2. Type vector B, for example 1, 2, 3.
  3. Press Calculate to see the result, and use Reset to start again.
Inputs of the Vector Projection Calculator
InputWhat to enterAllowed values
Vector AText, such as 1, 2, 3—
Vector BText, such as 1, 2, 3—

Formula and method

Formula

proj_b a = ((a · b) ÷ (b · b)) b

IEEE-754 double precision; shown to at most 6 decimal places.

b must be non-zero.

Worked examples

This example is verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Vector A = 3, 4; Vector B = 1, 0.

Results of example 1
ResultValue
Projection(3, 0)
Scalar projection3

The first line is the headline result (projection). Below it the vector Projection Calculator lists scalar projection, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.

Geometric meaning

The projection is the 'shadow' of a along the direction of b. Here b points along the x-axis, so the shadow of (3, 4) is its x-part, (3, 0). The perpendicular part, (0, 4), is a − proj.

Uses

Work done by a force along a displacement, resolving forces along a ramp and least-squares fitting. The vector b must be non-zero.

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Vector B: entering "0, 0" shows "Vector b must not be zero." beside that field and no result.

Choosing between the Vector Projection Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Vector Projection Calculator and similar calculators
CalculatorYou enterIt returns
[Vector Magnitude Calculator](/math/vector-magnitude/)componentsMagnitude
[Unit Vector Calculator](/math/unit-vector-calculator/)vectorUnit vector
[Vector Subtraction Calculator](/math/vector-subtraction-calculator/)vector A and vector Ba − b
[Vector Calculator](/math/vector/)vector a and vector bSum (a + b)
[Slope Calculator](/math/slope-calculator/)x₁, y₁ and x₂Slope

Background: algebra

Many algebra calculators rest on the same ideas: write the problem in a standard form, identify the coefficients, apply the formula and check the answer by substituting it back. For a quadratic ax² + bx + c = 0 the roots are (−b ± √(b² − 4ac)) ÷ 2a, and the discriminant b² − 4ac decides the kind of roots: positive gives two real roots, zero gives one repeated root and negative gives two complex conjugate roots.

If a = 0 the equation is linear, not quadratic. A sign slip on the −b term shifts both roots by the same amount, so substitute your roots back to check.

Assumptions and limitations

  • Non-zero b

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for vector B to confirm this.

Frequently asked questions

What is the projection of a on itself?

Projecting a vector onto itself returns the vector, since its component along its own direction is the whole vector.

What if a and b are perpendicular?

The projection is zero.

What is the scalar projection?

The signed length of the shadow.

What does the Vector Projection Calculator calculate?

Projection of vector a onto vector b. It returns Projection and Scalar projection.

What formula does the Vector Projection Calculator use?

proj_b a = ((a · b) ÷ (b · b)) b. b must be non-zero.

What do I need to enter in the vector Projection Calculator?

You enter Vector A and Vector B.

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. Non-zero b.

What is an example of a vector Projection result?

With vector A 3, 4 and vector B 1, 0, the projection is (3, 0).

Sources

  • OpenStax, Precalculus 2e (Rice University): vectors, polar coordinates and trigonometry

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.