Vector Projection Calculator

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.

(3, 0, 0)
vector projection of a onto b
Scalar projection3
Dot product3
Magnitude of b1

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

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

© 2019 to 2026 Calculate.co.nz. All rights reserved.