Skip to content
Calcipedia

Vector Projection Calculator

Use the vector projection calculator to project one vector onto another, showing the projection vector, scalar projection, perpendicular component, angle.

Last updated

Vector projection calculator Project one vector onto another. Compute the projection vector, scalar projection, perpendicular remainder, angle, and step-by-step decomposition.

Quick examples

A 2D vector projected onto the x-axis, leaving a clean vertical remainder.

Dimension

Vector 1 (the source vector a)

Vector 2 (the target direction b)

What is vector projection?

The vector projection of v₁ onto v₂ gives the component of v₁ that lies along v₂. It is the shadow of the source vector on the target direction.

Scalar vs vector projection

The scalar projection is a signed length, while the vector projection is the actual vector in the direction of v₂. This page also shows the perpendicular remainder so you can see what part of v₁ does not lie along v₂.

Result

[3, 0]

The projection of [3, 4] onto [1, 0] is [3, 0].

Projection vector
[3, 0]
Perpendicular component
[0, 4]
Scalar projection
3
Dot product
3
Projection factor
3
Alignment
Along the same direction
Angle between vectors
53.130102°
Target unit vector
[1, 0]
Magnitude of v₁
5
Magnitude of v₂
1

How to read the decomposition

The projection vector is the part of a that runs along b. The perpendicular component is the leftover part of a after that shadow is removed.

A positive scalar projection means the shadow points with the target direction. A negative scalar projection means it points against the target direction. A zero scalar projection means the vectors are perpendicular.

Steps

v₁ = [3, 4], v₂ = [1, 0]

v₁ · v₂ = (3)(1) + (4)(0) = 3

v₂ · v₂ = x²=1 + y²=0 = 1

|v₂| = √1 = 1

|v₁| = √25 = 5

Scalar projection = (v₁ · v₂) / |v₂| = 3 / 1 = 3

Scale factor = (v₁ · v₂) / (v₂ · v₂) = 3 / 1 = 3

proj = 3 × [1, 0] = [3, 0]

perpendicular component = v₁ - proj = [3, 4] - [3, 0] = [0, 4]

Angle between vectors = arccos((v₁ · v₂) / (|v₁||v₂|)) = 53.13010235415599°

← All Linear Algebra calculators

Linear Algebra

Vector projection calculator: project one vector onto another

A vector projection calculator finds the component of one vector that lies along the direction of another. This version computes the vector projection, scalar projection, perpendicular remainder, alignment, and angle so you can see both the shadow along the target direction and the leftover sideways component.

The projection formula

The vector projection of v₁ onto v₂ is proj = ((v₁·v₂)/(v₂·v₂)) × v₂. The scalar projection (component) is comp = (v₁·v₂)/|v₂|.

The scalar projection tells you how much of v₁ lies along v₂. If negative, v₁ points partly opposite to v₂.

proj_v₂(v₁) = ((v₁·v₂)/(v₂·v₂)) × v₂

Vector projection formula. This is the specific relationship the calculator applies when building the result.

Projection vector, scalar projection, and rejection

Students often mix up the projection vector and the scalar projection. The scalar projection is only a signed length. The projection vector is the actual vector shadow in the direction of the target vector.

This page also shows the perpendicular component, sometimes called the rejection. That is the part of the source vector left over after its shadow on the target direction is removed.

How to interpret the sign

A positive scalar projection means the source vector points at least partly with the target direction. A negative scalar projection means it points back against that direction. A zero scalar projection means the source has no component along the target at all.

That sign check is useful in physics and engineering problems where you care whether a force, velocity, or signal component helps the target direction, opposes it, or contributes nothing along that line.

Worked 2D and 3D examples

For a = (3, 4) and b = (1, 0), the projection vector is (3, 0), the scalar projection is 3, and the perpendicular component is (0, 4). This is the cleanest example because the target direction is the x-axis.

For a = (2, 3, 6) and b = (1, 2, 2), the projection vector is a scaled copy of b, while the rejection shows the part of a that does not lie along that 3D direction. This is the more realistic pattern in linear algebra and mechanics problems.

Angle and alignment

Projection and angle are linked by the dot product identity a·b = |a||b|cos(θ). A small angle produces a large positive shadow. A right angle produces no shadow. An obtuse angle produces a negative scalar projection.

That is why this calculator reports both the angle and an alignment label. It helps you move from the raw formula to a usable interpretation of the vector relationship.

Zero-vector and target-direction limits

Projection onto the zero vector is undefined because the zero vector has no direction. This calculator blocks that case explicitly instead of returning a misleading zero result.

If the source vector itself is zero, the projection vector and perpendicular component are both zero, but the angle is undefined because there is no source direction to compare.

When to use this instead of nearby vector tools

Use the dot product calculator when the scalar product itself is your main output. Use the angle-between-vectors calculator when the angle is the primary answer. Use this vector projection calculator when you want the decomposition of one vector into a part parallel to the target direction and a part perpendicular to it.

That makes this page especially useful for force resolution, graphics lighting, signal decomposition, and linear-algebra homework where the parallel and perpendicular pieces both matter.

Frequently asked questions

What is a vector projection calculator used for?

It is used to find how much of one vector lies along another vector, both as a signed length and as an actual projection vector in the target direction.

What if the vectors are perpendicular?

The projection is the zero vector because there is no component of v₁ in the direction of v₂.

Can I project onto the zero vector?

No — projection onto the zero vector is undefined because the zero vector has no direction.

What is the difference between scalar projection and vector projection?

Scalar projection is a signed length. Vector projection is the actual vector shadow that points in the direction of the target vector.

What does a negative scalar projection mean?

It means the source vector points partly opposite to the target direction, so the shadow runs backward along the target vector.

What is the perpendicular component or rejection?

It is the leftover part of the source vector after the projection vector is removed. In formula form, rejection = source vector − projection vector.

Can I use this for 3D vectors?

Yes. The calculator supports both 2D and 3D vectors as long as both vectors use the same dimension.

Why does the page show the angle too?

Because projection, dot product, and angle are tied together by cos(θ). Seeing the angle helps explain why the projection is positive, zero, or negative.

When is the angle undefined?

The angle is undefined when one of the vectors has zero magnitude, because a zero vector has no direction to compare.

Also in Linear Algebra

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.