AlgebraFree

Vector Projection Calculator

Use this free vector projection calculator to project one 2D vector onto another. Get the projection vector, scalar projection, projection coefficient, and the rejection (orthogonal component) with step-by-step dot product calculations.

Enter Values

The x component of the vector being projected

The y component of the vector being projected

The x component of the vector being projected onto

The y component of the vector being projected onto

Result

Enter values above and click Calculate to see your result.

AI Assistant

Ask about this calculator

I can help you understand the vector projection calculator formula, interpret your results, and answer follow-up questions.

Try asking

Formula

proj_b(a) = ((a dot b) / (b dot b)) b

Compute the dot product of a and b (a dot b = ax bx + ay by), divide by the dot product of b with itself (b dot b = bx squared + by squared), then multiply vector b by this scalar. The result is the component of a that lies along b.

Worked Example

a = [3, 4], b = [1, 0] Step 1: a dot b = (3)(1) + (4)(0) = 3 Step 2: b dot b = (1)(1) + (0)(0) = 1 Step 3: Scalar coefficient = 3 / 1 = 3 Step 4: Projection = 3 x [1, 0] = [3, 0] Step 5: Rejection = a - proj = [3, 4] - [3, 0] = [0, 4] Result: proj_b(a) = [3, 0], meaning the component of a along the x-axis is [3, 0].

What Is Vector Projection?

Vector projection finds the component of one vector that lies along the direction of another vector. It answers the question: "How much of vector a points in the direction of vector b?" The projection is itself a vector, while the scalar projection is just the length of that component (with sign).
  • The projection of a onto b gives the "shadow" of a cast along the direction of b
  • The scalar projection (comp_b a = a dot b / |b|) gives the signed length of the projection
  • The rejection (a minus the projection) is the component of a perpendicular to b
  • Projection plus rejection always equals the original vector: a = proj + rej
  • Vector projection is the foundation of orthogonal decomposition, least squares, and the Gram-Schmidt process

Vector projection appears in physics (work = force projected onto displacement), computer graphics (lighting calculations), and statistics (regression as projection onto column space). Understanding projection is key to mastering orthogonality in linear algebra.

You can also calculate changes using our Linear Transformation Calculator, Null Space Calculator or Column Space Calculator.

Frequently Asked Questions

What is the difference between vector projection and scalar projection?

Vector projection gives a vector (direction and magnitude) that represents the component of a along b. Scalar projection gives just a number: the signed length of that component. Scalar projection = a dot b divided by the magnitude of b. Vector projection = (scalar projection / |b|) times b.

Can I project onto the zero vector?

No. Projection onto the zero vector is undefined because b dot b = 0, which causes division by zero. The zero vector has no direction, so "the component along zero" is meaningless.

What is the rejection vector?

The rejection is the component of a perpendicular to b. It equals a minus the projection: rej = a - proj_b(a). The rejection is always orthogonal to b (their dot product is zero).

How is projection used in physics?

Work is defined as force projected onto displacement: W = F dot d = |F| |d| cos(theta). The projection of the force vector onto the displacement direction gives the effective force doing the work.

What is the Gram-Schmidt process?

Gram-Schmidt turns a set of linearly independent vectors into an orthogonal (or orthonormal) set by repeatedly subtracting projections. For each new vector, subtract its projections onto all previously processed vectors to get the orthogonal component.

Is projection the same as dot product?

No. The dot product is a scalar (number). Projection is a vector. They are related: the dot product a dot b appears in the projection formula, but the projection also involves dividing by b dot b and multiplying by vector b.

Accurate and Reliable

All calculations run locally. Solve equations with confidence using AI-verified methods.

Precise Algebraic Calculations Powered by Calculory AI