Linear Algebra

Vector Projection

The projection of vector a onto vector b is the component of a in the direction of b. The calculator returns the scalar projection comp_b(a), the vector projection proj_b(a) = ((a·b)/|b|²) b, and the perpendicular component a − proj_b(a).

Vector Projection

Projection of a onto b, scalar projection and the perpendicular component.

Try:
Answerproj_b(a) = (3, 0)
  1. Vectorsa = (3, 4), b = (1, 0)
  2. Dot producta · b = 3
  3. Magnitude squared|b|² = 1
  4. Scalar projectioncomp_b(a) = (a · b)/|b| = 3
  5. Coefficient(a · b)/|b|² = 3
  6. Projection onto bproj_b(a) = (3, 0)
  7. Perpendicular componenta − proj_b(a) = (0, 4)

Worked examples

Frequently asked questions

What is the difference between scalar projection and vector projection?

The scalar projection comp_b(a) = (a·b)/|b| is a single number giving how far a extends along b. The vector projection proj_b(a) is the actual vector in the direction of b with that length.

What if b is the zero vector?

The projection is undefined — there is no direction to project onto. The calculator reports an error in that case.

What is the perpendicular component used for?

The decomposition a = proj_b(a) + (a − proj_b(a)) splits a into a part parallel to b and a part perpendicular to b — the basis of Gram-Schmidt orthogonalisation.