Vector Projection Calculator
Project vector a onto vector b.
About this tool
Enter vectors a and b to find the part of a that points along b. The projection of (2, 3, 1) onto (1, 1, 0) is (2.5, 2.5, 0).
How to use
How it works
The projection is the shadow of a on the line through b: (a·b ÷ b·b) times b. For (2, 3, 1) and (1, 1, 0), a·b = 5 and b·b = 2, so the scalar is 2.5. Subtracting the projection from a leaves a vector perpendicular to b.
proj_b(a) = (a·b ÷ b·b) b
Worked example
Shadow on a diagonal
- Input
- a = (2, 3, 1), b = (1, 1, 0)
- Output
- (2.5, 2.5, 0)
- Walkthrough
- a·b = 2 + 3 + 0 = 5 and b·b = 1 + 1 = 2, so 5 ÷ 2 = 2.5, and 2.5 × (1, 1, 0) = (2.5, 2.5, 0).
Limitations
- b = (0, 0, 0) has no direction, so the projection is undefined.
- Three components; for 2D leave z as 0.
Questions
What is the projection of (3,4,0) onto (1,0,0)?
What is the projection of (2,3,1) onto (1,1,0)?
How do I get the perpendicular part?
Features
- 3D components
- Shows the formula
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Vectors | Essence of linear algebra
3Blue1Brown
Visual vectors when algebra tools move toward matrices.
Watch on YouTubeVariables on both sides — example
Khan Academy
Worked example to check against solver output.
Watch on YouTube
- Elementary Algebra 2e
OpenStax
Free algebra textbook for equations and polynomials.
- Systems of Linear Equations
Math is Fun
Two-variable systems for simultaneous equation calculators.