Vector Projection Calculator

Project vector A onto vector B. Shows both scalar and vector projection with step-by-step solutions.

Enter Vector Components

Result

Vector Projection of A onto B
(3, 0)
vector
Scalar Projection3
A . B (Dot Product)3
|B|² (B squared)1
|B| (Magnitude of B)1
Angle Between A and B53.13°

Step-by-Step Solution

proj_B(A) = (A.B / |B|²) B

Understanding Vector Projection

Vector projection is a fundamental operation in linear algebra that finds the component of one vector along the direction of another. It decomposes a vector into two orthogonal parts: one parallel to the target vector and one perpendicular to it.

Projection Formulas

Scalar Projection

The signed length of the projection of A along B.

comp_B(A) = A . B / |B|

Vector Projection

The vector component of A along the direction of B.

proj_B(A) = (A.B / |B|²) B

Rejection (Perpendicular)

The component of A perpendicular to B.

rej_B(A) = A - proj_B(A)

Applications

Vector projection is essential in physics for resolving forces into components, in computer graphics for shadow calculations and reflections, in machine learning for feature extraction and dimensionality reduction, and in engineering for analyzing stress and strain along specific directions.

Key Properties

  • If A and B are perpendicular, the projection is the zero vector.
  • If A and B are parallel, the projection equals A (scaled by the ratio of magnitudes).
  • The scalar projection can be negative if the angle between A and B exceeds 90 degrees.
  • proj_B(A) + rej_B(A) = A (the vector decomposes completely).