Skip to main content

Vector Projection Calculator

Calculate vector projection instantly with our math tool. Shows detailed work, formulas used, and multiple solution methods.

Skip to calculator
Mathematics

Vector Projection Calculator

Calculate the projection of one vector onto another in 2D or 3D space. Find scalar projection, vector projection, rejection, and the angle between vectors.

Last updated: December 2025Reviewed by NovaCalculator Mathematics Team

Calculator

Adjust values & calculate
Vector Projection of A onto B
(3.0000, 0.0000)
Scalar projection: 3.0000
Dot Product (A . B)
3.0000
Angle Between
53.13 deg
|A| Magnitude
5.0000
|B| Magnitude
1.0000
Vector Rejection (Perpendicular Component)
(0.0000, 4.0000)
Magnitude: 4.0000
Unit Vector of B
(1.0000, 0.0000)
Your Result
Projection: (3.0000, 0.0000) | Scalar Projection: 3.0000 | Angle: 53.13 degrees
Share Your Result
Understand the Math

Formula

proj_B(A) = (A . B / B . B) * B

Where A is the vector being projected, B is the vector projected onto, A . B is the dot product of A and B, and B . B is the dot product of B with itself (the magnitude squared). The scalar projection is A . B / |B|.

Last reviewed: December 2025

Worked Examples

Example 1: 2D Force Decomposition

Find the projection of vector A = (3, 4) onto vector B = (1, 0), representing the horizontal component of a force.
Solution:
A dot B = 3(1) + 4(0) = 3 B dot B = 1(1) + 0(0) = 1 Scalar = A dot B / B dot B = 3/1 = 3 Projection = 3 * (1, 0) = (3, 0) The horizontal component of the force is (3, 0) with magnitude 3.
Result: Projection of A onto B = (3, 0) with scalar projection = 3

Example 2: 3D Vector Projection

Project vector A = (2, 3, 1) onto vector B = (1, 1, 1) to find the component along the space diagonal direction.
Solution:
A dot B = 2(1) + 3(1) + 1(1) = 6 B dot B = 1(1) + 1(1) + 1(1) = 3 Scalar = 6/3 = 2 Projection = 2 * (1, 1, 1) = (2, 2, 2) Rejection = (2, 3, 1) - (2, 2, 2) = (0, 1, -1) Angle = arccos(6 / (sqrt(14) * sqrt(3))) = arccos(0.9258) = 22.21 degrees
Result: Projection = (2, 2, 2) | Rejection = (0, 1, -1) | Angle = 22.21 degrees
Expert Insights

Background & Theory

The Vector Projection Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.

History

The history behind the Vector Projection Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.

Share this calculator

Explore More

Frequently Asked Questions

A vector projection is the process of decomposing one vector onto another, producing a component that lies along the direction of the target vector. Mathematically, the projection of vector A onto vector B gives you the portion of A that points in the same direction as B. This concept is foundational in linear algebra, physics, and engineering because it allows you to break complex vector quantities into simpler directional components. For instance, when analyzing forces on an inclined plane, you project the gravity vector onto the plane surface and the normal direction to find the parallel and perpendicular force components.
The scalar projection gives you a single number representing the signed length of the projected component, while the vector projection gives you an actual vector with both magnitude and direction. The scalar projection of A onto B equals the dot product of A and B divided by the magnitude of B, yielding a positive or negative number. The vector projection multiplies this scalar by the unit vector of B to produce a full vector. If the scalar projection is negative, it means vector A has a component pointing opposite to B. Both forms are widely used, but vector projection is more common when you need the actual directional component for further calculations.
The dot product is the mathematical engine behind vector projection calculations. When you compute the dot product of vectors A and B, you get a value equal to the product of their magnitudes times the cosine of the angle between them. This quantity directly measures how much A aligns with B. In the projection formula, the dot product A dot B divided by B dot B gives the scalar multiplier that scales vector B to create the projection. Without the dot product, there would be no efficient way to decompose vectors into parallel and perpendicular components. The dot product also tells you whether vectors are orthogonal (dot product equals zero), meaning the projection would be the zero vector.
Vector rejection is the component of vector A that is perpendicular to vector B, calculated by subtracting the projection from the original vector. Together, the projection and rejection perfectly decompose the original vector into two orthogonal components: one parallel to B and one perpendicular to B. This means A equals its projection onto B plus its rejection from B, and these two components are always at right angles to each other. The magnitude of the rejection tells you how far A deviates from the direction of B. In practical applications like computer graphics, this decomposition is used for reflecting vectors off surfaces, computing shadow directions, and implementing camera controls.
Yes, the vector projection formula works identically in any number of dimensions, including 3D space and beyond. The formula proj_B(A) = (A dot B / B dot B) times B uses the dot product, which naturally extends to any dimension by summing the products of corresponding components. In 3D, the dot product is ax*bx + ay*by + az*bz, and the rest of the calculation proceeds exactly as in 2D. This dimensional generality is one of the great strengths of the projection formula. Whether you are working in 2D game physics, 3D computer graphics, or even higher-dimensional machine learning feature spaces, the same projection formula applies without modification.
When you project vector A onto itself, the result is simply A again, because every component of A is already aligned with A. The scalar multiplier becomes A dot A divided by A dot A, which equals 1, so the projection is 1 times A. Conversely, when you project A onto a vector B that is perpendicular (orthogonal) to it, the dot product A dot B equals zero, making the scalar multiplier zero, and the projection becomes the zero vector. These are the two extreme cases: full alignment gives back the original vector, and complete perpendicularity gives zero. Any other angle produces a projection that is shorter than the original vector, with the scalar between negative one and positive one.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Mathematics Team โ€” Verified against standard mathematical and scientific references. Last reviewed: December 2025. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

proj_B(A) = (A . B / B . B) * B

Where A is the vector being projected, B is the vector projected onto, A . B is the dot product of A and B, and B . B is the dot product of B with itself (the magnitude squared). The scalar projection is A . B / |B|.

Worked Examples

Example 1: 2D Force Decomposition

Problem: Find the projection of vector A = (3, 4) onto vector B = (1, 0), representing the horizontal component of a force.

Solution: A dot B = 3(1) + 4(0) = 3\nB dot B = 1(1) + 0(0) = 1\nScalar = A dot B / B dot B = 3/1 = 3\nProjection = 3 * (1, 0) = (3, 0)\nThe horizontal component of the force is (3, 0) with magnitude 3.

Result: Projection of A onto B = (3, 0) with scalar projection = 3

Example 2: 3D Vector Projection

Problem: Project vector A = (2, 3, 1) onto vector B = (1, 1, 1) to find the component along the space diagonal direction.

Solution: A dot B = 2(1) + 3(1) + 1(1) = 6\nB dot B = 1(1) + 1(1) + 1(1) = 3\nScalar = 6/3 = 2\nProjection = 2 * (1, 1, 1) = (2, 2, 2)\nRejection = (2, 3, 1) - (2, 2, 2) = (0, 1, -1)\nAngle = arccos(6 / (sqrt(14) * sqrt(3))) = arccos(0.9258) = 22.21 degrees

Result: Projection = (2, 2, 2) | Rejection = (0, 1, -1) | Angle = 22.21 degrees

Frequently Asked Questions

What is a vector projection and why is it important in mathematics?

A vector projection is the process of decomposing one vector onto another, producing a component that lies along the direction of the target vector. Mathematically, the projection of vector A onto vector B gives you the portion of A that points in the same direction as B. This concept is foundational in linear algebra, physics, and engineering because it allows you to break complex vector quantities into simpler directional components. For instance, when analyzing forces on an inclined plane, you project the gravity vector onto the plane surface and the normal direction to find the parallel and perpendicular force components.

What is the difference between scalar projection and vector projection?

The scalar projection gives you a single number representing the signed length of the projected component, while the vector projection gives you an actual vector with both magnitude and direction. The scalar projection of A onto B equals the dot product of A and B divided by the magnitude of B, yielding a positive or negative number. The vector projection multiplies this scalar by the unit vector of B to produce a full vector. If the scalar projection is negative, it means vector A has a component pointing opposite to B. Both forms are widely used, but vector projection is more common when you need the actual directional component for further calculations.

How does the dot product relate to vector projection?

The dot product is the mathematical engine behind vector projection calculations. When you compute the dot product of vectors A and B, you get a value equal to the product of their magnitudes times the cosine of the angle between them. This quantity directly measures how much A aligns with B. In the projection formula, the dot product A dot B divided by B dot B gives the scalar multiplier that scales vector B to create the projection. Without the dot product, there would be no efficient way to decompose vectors into parallel and perpendicular components. The dot product also tells you whether vectors are orthogonal (dot product equals zero), meaning the projection would be the zero vector.

What is vector rejection and how does it complement projection?

Vector rejection is the component of vector A that is perpendicular to vector B, calculated by subtracting the projection from the original vector. Together, the projection and rejection perfectly decompose the original vector into two orthogonal components: one parallel to B and one perpendicular to B. This means A equals its projection onto B plus its rejection from B, and these two components are always at right angles to each other. The magnitude of the rejection tells you how far A deviates from the direction of B. In practical applications like computer graphics, this decomposition is used for reflecting vectors off surfaces, computing shadow directions, and implementing camera controls.

Can you project a vector in three-dimensional space using the same formula?

Yes, the vector projection formula works identically in any number of dimensions, including 3D space and beyond. The formula proj_B(A) = (A dot B / B dot B) times B uses the dot product, which naturally extends to any dimension by summing the products of corresponding components. In 3D, the dot product is ax*bx + ay*by + az*bz, and the rest of the calculation proceeds exactly as in 2D. This dimensional generality is one of the great strengths of the projection formula. Whether you are working in 2D game physics, 3D computer graphics, or even higher-dimensional machine learning feature spaces, the same projection formula applies without modification.

What happens when you project a vector onto itself or onto a perpendicular vector?

When you project vector A onto itself, the result is simply A again, because every component of A is already aligned with A. The scalar multiplier becomes A dot A divided by A dot A, which equals 1, so the projection is 1 times A. Conversely, when you project A onto a vector B that is perpendicular (orthogonal) to it, the dot product A dot B equals zero, making the scalar multiplier zero, and the projection becomes the zero vector. These are the two extreme cases: full alignment gives back the original vector, and complete perpendicularity gives zero. Any other angle produces a projection that is shorter than the original vector, with the scalar between negative one and positive one.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy