Vector Projection Calculator

Calculate the projection of one vector onto another with detailed step-by-step solutions. Visualize vector projections, understand orthogonal components, and explore the geometric interpretation of vector projections in 2D and 3D space.

Vector Input

Vector v (to be projected)
projects onto
Vector u (projection direction)

Vector Projection Theory

What is Vector Projection?

Vector projection is the operation of projecting one vector onto another vector. The projection of vector v onto vector u is the component of v that lies in the direction of u.

Calculation Steps

Step 1: Calculate Dot Product

Compute v · u = v₁u₁ + v₂u₂ + ... + vₙuₙ

Step 2: Calculate u · u

Compute u · u = u₁² + u₂² + ... + uₙ²

Step 3: Find Scalar Factor

Calculate k = (v · u) / (u · u)

Step 4: Multiply by Direction

proj_u(v) = k × u = k(u₁, u₂, ..., uₙ)

Applications & Properties

Physics

Force components, work calculation, motion analysis

Computer Graphics

Lighting calculations, shadow mapping, collision detection

Engineering

Structural analysis, signal processing, optimization

Machine Learning

Principal component analysis, feature extraction

Geometry

Distance calculations, orthogonal decomposition

Statistics

Regression analysis, least squares fitting

Worked Examples

Example 1: 2D Vector Projection

Problem:

Find the projection of v = [3, 4] onto u = [1, 2]

Solution:

Step 1: v · u = (3)(1) + (4)(2) = 3 + 8 = 11

Step 2: u · u = (1)² + (2)² = 1 + 4 = 5

Step 3: k = 11/5 = 2.2

Step 4: proj_u(v) = 2.2 × [1, 2] = [2.2, 4.4]

Result: The projection vector is [2.2, 4.4]

Example 2: 3D Vector Projection

Problem:

Find the projection of v = [2, 1, 3] onto u = [1, 0, 1]

Solution:

Step 1: v · u = (2)(1) + (1)(0) + (3)(1) = 2 + 0 + 3 = 5

Step 2: u · u = (1)² + (0)² + (1)² = 1 + 0 + 1 = 2

Step 3: k = 5/2 = 2.5

Step 4: proj_u(v) = 2.5 × [1, 0, 1] = [2.5, 0, 2.5]

Result: The projection vector is [2.5, 0, 2.5]

Frequently Asked Questions

Vector projection gives you a vector in the direction of u, while scalar projection gives you just the length (magnitude) of that projection. Scalar projection can be negative if the angle between vectors is obtuse.

Projection onto a zero vector is undefined because we would be dividing by zero in the formula. The zero vector has no direction, so projection onto it doesn't make mathematical sense.

The dot product v·u equals ||v|| × ||u|| × cos(θ), where θ is the angle between vectors. The scalar projection is v·u / ||u||, which equals ||v|| × cos(θ) - the "shadow" of v on u.

No, the magnitude of the projection is always less than or equal to the magnitude of the original vector. It equals the original magnitude only when the vectors are parallel (angle = 0°).

Any vector v can be decomposed into two orthogonal components: one parallel to u (the projection) and one perpendicular to u. These components are perpendicular to each other and sum to the original vector.

Check that: (1) The projection is parallel to u (one is a scalar multiple of the other), (2) The perpendicular component is orthogonal to u (their dot product is zero), (3) Projection + perpendicular = original vector.