Linear Algebra
Advanced

Vector Projection

Projection of vector a onto vector b.

Formula

projba=abb2b\text{proj}_{\vec{b}}\vec{a} = \frac{\vec{a}\cdot\vec{b}}{|\vec{b}|^2}\vec{b}

Variables

\vec{a},\vec{b}Vectors

Example

Projecting (3, 3) onto the x-axis (1, 0) gives (3, 0).

Did You Know?

Vector projection is how you find the "shadow" of one vector onto another — key to least-squares fitting.