Vector Projection Calculator
Project one vector onto another, exactly. Get the shadow it casts, how long that shadow is, and the perpendicular part left over.
Vectors
Enter the vector a and the vector b to project it onto, or start from an example.
Projection
Updates as you type.
- Vector projection
- Scalar projection
- Orthogonal remainder
- Check
The shadow points the same way as b, and it's a positive multiple of b.
What a projection is
The projection of onto is the shadow casts on the line through , with light falling straight down at a right angle to that line. The shadow is a multiple of , and the Dot Product and Angle Calculator gives the multiple:
The scalar projection is the shadow's signed length. It's negative when the shadow points against :
The perpendicular part
Whatever isn't in the shadow is left over, and it's always perpendicular to :
So any vector splits into a part along and a part at a right angle to it. You can confirm that the second part is perpendicular by checking that its dot product with is 0, which is the check shown with the result.
Two special cases are worth knowing. If is perpendicular to , its shadow is the zero vector. If is already along , it's its own shadow and nothing is left over. Projecting onto the zero vector isn't defined, since it has no direction.
Where it comes up
- Physics. Splitting a force along a ramp and against it is a projection.
- Closest point. The tip of the shadow is the closest point on the line to the tip of . That idea is the basis of least squares.
- Building perpendicular vectors. Subtracting projections one at a time is how Gram-Schmidt turns any basis into an orthogonal one.
- As a matrix. Projection onto a line is a linear transformation that flattens the plane, and it has rank 1. Try the projection preset in the Linear Transformation Visualizer, then check it with the Matrix Rank Calculator.
Related calculators
Keep working with vectors and matrices.
Dot Product and Angle Calculator
Find the dot product, magnitudes, unit vectors, and the angle between two vectors, with exact roots like √14. Drag vectors and watch the sign change at 90°.
Linear Transformation Visualizer
Drag basis vectors to see a 2×2 or 3×3 matrix move the plane or space, with live determinant, rank, and eigen-directions, and a match-the-target game.
Matrix Rank Calculator
Find rank and nullity with exact fractions, get bases for the column, row, null, and left null spaces, and see what a matrix collapses.