Skip to main content

Vector Projection Calculator

Calculate vector projection instantly with our math tool. Shows detailed work, formulas used, and multiple solution methods.

Reviewed by Manoj Kumar, Mathematics Educator

Reviewed by Manoj Kumar, Mathematics Educator

Formula

proj_B(A) = (A . B / B . B) * B

Where A is the vector being projected, B is the vector projected onto, A . B is the dot product of A and B, and B . B is the dot product of B with itself (the magnitude squared). The scalar projection is A . B / |B|.

Worked Examples

Example 1: 2D Force Decomposition

Problem:Find the projection of vector A = (3, 4) onto vector B = (1, 0), representing the horizontal component of a force.

Solution:A dot B = 3(1) + 4(0) = 3\nB dot B = 1(1) + 0(0) = 1\nScalar = A dot B / B dot B = 3/1 = 3\nProjection = 3 * (1, 0) = (3, 0)\nThe horizontal component of the force is (3, 0) with magnitude 3.

Result:Projection of A onto B = (3, 0) with scalar projection = 3

Example 2: 3D Vector Projection

Problem:Project vector A = (2, 3, 1) onto vector B = (1, 1, 1) to find the component along the space diagonal direction.

Solution:A dot B = 2(1) + 3(1) + 1(1) = 6\nB dot B = 1(1) + 1(1) + 1(1) = 3\nScalar = 6/3 = 2\nProjection = 2 * (1, 1, 1) = (2, 2, 2)\nRejection = (2, 3, 1) - (2, 2, 2) = (0, 1, -1)\nAngle = arccos(6 / (sqrt(14) * sqrt(3))) = arccos(0.9258) = 22.21 degrees

Result:Projection = (2, 2, 2) | Rejection = (0, 1, -1) | Angle = 22.21 degrees

Frequently Asked Questions

What is a vector projection and why is it important in mathematics?

A vector projection is the process of decomposing one vector onto another, producing a component that lies along the direction of the target vector. Mathematically, the projection of vector A onto vector B gives you the portion of A that points in the same direction as B. This concept is foundational in linear algebra, physics, and engineering because it allows you to break complex vector quantities into simpler directional components. For instance, when analyzing forces on an inclined plane, you project the gravity vector onto the plane surface and the normal direction to find the parallel and perpendicular force components.

What is the difference between scalar projection and vector projection?

The scalar projection gives you a single number representing the signed length of the projected component, while the vector projection gives you an actual vector with both magnitude and direction. The scalar projection of A onto B equals the dot product of A and B divided by the magnitude of B, yielding a positive or negative number. The vector projection multiplies this scalar by the unit vector of B to produce a full vector. If the scalar projection is negative, it means vector A has a component pointing opposite to B. Both forms are widely used, but vector projection is more common when you need the actual directional component for further calculations.

How does the dot product relate to vector projection?

The dot product is the mathematical engine behind vector projection calculations. When you compute the dot product of vectors A and B, you get a value equal to the product of their magnitudes times the cosine of the angle between them. This quantity directly measures how much A aligns with B. In the projection formula, the dot product A dot B divided by B dot B gives the scalar multiplier that scales vector B to create the projection. Without the dot product, there would be no efficient way to decompose vectors into parallel and perpendicular components. The dot product also tells you whether vectors are orthogonal (dot product equals zero), meaning the projection would be the zero vector.

What is vector rejection and how does it complement projection?

Vector rejection is the component of vector A that is perpendicular to vector B, calculated by subtracting the projection from the original vector. Together, the projection and rejection perfectly decompose the original vector into two orthogonal components: one parallel to B and one perpendicular to B. This means A equals its projection onto B plus its rejection from B, and these two components are always at right angles to each other. The magnitude of the rejection tells you how far A deviates from the direction of B. In practical applications like computer graphics, this decomposition is used for reflecting vectors off surfaces, computing shadow directions, and implementing camera controls.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy