Vector Projection Calculator NZ
This calculator finds the projection of one vector onto another, giving both the vector projection and the scalar projection. Projecting a vector onto another answers a fundamental geometric question: how much of one vector points along the direction of a second? The result, the projection, is the shadow that the first vector casts onto the line of the second. This idea is essential across physics, engineering and computer graphics. In physics it splits a force into components along and perpendicular to a direction, such as finding the part of gravity acting down a slope. In graphics and data science it is the basis of resolving vectors into components, of the Gram-Schmidt process, and of measuring how much one direction contributes to another. This tool computes it. You enter the components of the vector you want to project, called a, and the vector you are projecting onto, called b, and the calculator returns the vector projection of a onto b, a vector pointing along b, the scalar projection, which is its signed length, the dot product of the two, and the magnitude of b. The results update as you type. Use it for physics problems involving components of force or motion, for graphics and geometry, or for linear algebra study. The scalar projection is the dot product of a and b divided by the magnitude of b, the signed length of the shadow. The vector projection multiplies the unit vector in the direction of b by that scalar, or equivalently scales b by the dot product over b's magnitude squared. A positive scalar projection means a points generally along b; a negative one means it points the opposite way. Set the z components to zero to work in two dimensions. The calculations are exact for your inputs, rounded for display.
Scalar projection = a . b / |b|. Vector projection = (a . b / |b|²) b. Positive scalar means a points along b; negative means opposite. Set z to 0 for 2D.
How it works
The dot product of a and b is found by multiplying matching components and adding. The scalar projection is that dot product divided by the magnitude of b, the signed length of a's shadow on b. The vector projection scales b by the dot product divided by b's magnitude squared, giving a vector along b with that length.
Worked example
Projecting a = (3, 4, 0) onto b = (1, 0, 0), the dot product is 3 times 1, which is 3, and the magnitude of b is 1. The scalar projection is 3 over 1, which is 3. The vector projection scales b by 3 over 1 squared, giving (3, 0, 0): the part of a that lies along the x-axis direction of b.
Related calculators
- Dot Product: scalar product.
- Vector Calculator: magnitude and angle.
- Cross Product: vector product.
- Force Calculator: force components.