Loading…

Orthogonal Projection Calculator

Math Linear Algebra • Applications and Advanced Linear Algebra (capstone)

View all topics

Project a vector \(v\) onto a line or a subspace. For a line spanned by \(u\), \(\mathrm{proj}(v)=\dfrac{v\cdot u}{\lVert u\rVert^2}u\). For a subspace with basis columns \(U\), \(\mathrm{proj}(v)=U(U^{\mathsf T}U)^{-1}U^{\mathsf T}v\). The orthogonal component is \(r=v-\mathrm{proj}(v)\).

Vector \(v\)
The vector you want to project.
Line direction \(u\)
Projection onto the line through the origin spanned by \(u\).
Ready
Results
Projection
Orthogonal component
Lengths
Orthogonality check
Key matrices / scalars
Graph
2D only. Shows the “shadow” projection: \(v\), \(\mathrm{proj}(v)\), and \(r=v-\mathrm{proj}(v)\). Zoom with wheel/trackpad, drag to pan, double-click to reset. Play animates the drop to the subspace.
Step-by-step
Enter inputs and click “Calculate”.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What does orthogonal projection mean?

It is the closest point in the target line/subspace to the vector v, measured by Euclidean distance. The difference r=v-proj(v) is perpendicular to the target.

Why does subspace projection use (U^T U)α=U^T v?

Writing proj(v)=Uα and minimizing ||v-Uα||^2 yields the normal equations. The residual must be orthogonal to every column of U.

What if U^T U is singular?

That indicates the basis vectors are linearly dependent or nearly dependent. The calculator may use a tiny stabilization to compute a least-squares style projection.