Vector Projection Calculator
Enter the vector components (R2 or R3) to calculate the orthogonal projection of vector a onto vector b and see the step-by-step resolution with a graph.
Quick Examples
How to Use the Calculator
This online vector projection solver is an analytic geometry tool designed to find the geometric shadow that one vector casts onto the line of action of another. In addition to providing you with the direct result, the system generates the step-by-step mathematical resolution and, for two-dimensional problems, an interactive graph.
Configuration and data entry:
- Select the dimension: Use the initial selector to tell the tool whether your vectors are in the two-dimensional plane (2D, with x, y axes) or in three-dimensional space (3D, with x, y, z axes).
- Enter the components: You have two independent blocks to enter the data. In the first one, you will place the components of vector a (the vector to be projected), and in the second one, those of the base vector b (the vector being projected onto). You can use integers, decimals, and exact fractions.
Once the values are entered, the math engine will process the information and present the results structured in three sections:
1. Quick answer
In the first highlighted block, you will find the direct solution to your exercise. The system will show you the exact components of the orthogonal projection of a onto b (which is a new vector). Additionally, it will provide the scalar component of the projection, a numerical value equivalent to a · b / |b|, which represents the signed length of this geometric shadow.
2. Step-by-step resolution
Next, the complete analytic development will be displayed so you can understand the procedure. The algorithm will guide you through the following logical method:
- Dot product: First, the system will calculate the dot product between both vectors by multiplying and adding their respective components (ax·bx + ay·by + az·bz).
- Square of the magnitude: Then, the square of the magnitude of the base vector b, denoted as |b|2, will be calculated by adding the squares of each of its components.
- Substitution in the formula: With both values found, the calculator will substitute the data into the general formula for the projection vector: projba = ((a · b) / |b|2) · b. You will see how the resulting scalar is multiplied by each component of the direction vector until the final simplified result is obtained.
3. Interactive graph
If your exercise is in two dimensions, the bottom part of the report will include an interactive Cartesian plane. In this visual representation, you will be able to observe the origin of coordinates, the line defining the direction of the base vector b, the original vectors a and b, and finally, the projection vector. This will allow you to geometrically verify how the tip of vector a drops perpendicularly (forming a 90° angle) onto the line of direction.
Solved Exercises
The following are examples of problems solved by the calculator.
Calculate the projection of vector a = ⟨-2, 5⟩ onto vector b = ⟨4, -3⟩.
Result
The orthogonal projection of vector a onto the direction of vector b is:
Scalar component: \( \displaystyle \text{comp}_{\vec{b}}~ \vec{a} = \frac{\vec{a} \cdot \vec{b}}{|\vec{b}|} = -\frac{23}{5} \approx -4.6 \)
Step-by-step resolution
1. Identify the vector components.
The vectors we are working with are:
We extract their respective components to use them in subsequent calculations:
2. Calculate the dot product.
We obtain the dot product by multiplying the corresponding components of both vectors and adding the results:
3. Calculate the square of the magnitude of the base vector.
The vector being projected onto is b. We square its components and add them to get the square of its magnitude:
4. Obtain the projection vector.
The projection of vector a onto the direction of b can be obtained using the following formula:
We substitute the previously calculated values:
Determine the orthogonal projection of vector ⟨1, 2⟩ onto the direction of vector ⟨2, 1⟩.
Result
The orthogonal projection of vector a onto the direction of vector b is:
Scalar component: \( \displaystyle \text{comp}_{\vec{b}}~ \vec{a} = \frac{\vec{a} \cdot \vec{b}}{|\vec{b}|} = \frac{4}{\sqrt{5}} \approx 1.79 \)
Step-by-step resolution
1. Identify the vector components.
The vectors we are working with are:
We extract their respective components to use them in subsequent calculations:
2. Calculate the dot product.
We obtain the dot product by multiplying the corresponding components of both vectors and adding the results:
3. Calculate the square of the magnitude of the base vector.
The vector being projected onto is b. We square its components and add them to get the square of its magnitude:
4. Obtain the projection vector.
The projection of vector a onto the direction of b can be obtained using the following formula:
We substitute the previously calculated values:
Find the projection and scalar component of vector ⟨3, 2⟩ onto vector ⟨5, 1⟩.
Result
The orthogonal projection of vector a onto the direction of vector b is:
Scalar projection: \( \displaystyle \text{comp}_{\vec{b}}~ \vec{a} = \frac{\vec{a} \cdot \vec{b}}{|\vec{b}|} = \frac{17}{\sqrt{26}} \approx 3.33 \)
Step-by-step resolution
1. Identify the vector components.
The vectors we are working with are:
We extract their respective components to use them in subsequent calculations:
2. Calculate the dot product.
We obtain the dot product by multiplying the corresponding components of both vectors and adding the results:
3. Calculate the square of the magnitude of the base vector.
The vector being projected onto is b. We square its components and add them to get the square of its magnitude:
4. Obtain the projection vector.
The projection of vector a onto the direction of b can be obtained using the following formula:
We substitute the previously calculated values:
Find the projection vector of a = ⟨3/2, 1/2⟩ onto the direction of vector b = ⟨2, -1⟩.
Result
The orthogonal projection of vector a on the direction of vector b is:
Scalar projection: \( \displaystyle \text{comp}_{\vec{b}}~ \vec{a} = \frac{\vec{a} \cdot \vec{b}}{|\vec{b}|} = \frac{5}{2 \sqrt{5}} \approx 1.12 \)
Step-by-step resolution
1. Identify the vector components.
The vectors we are working with are:
We extract their respective components to use them in subsequent calculations:
2. Calculate the dot product.
We obtain the dot product by multiplying the corresponding components of both vectors and adding the results:
3. Calculate the square of the magnitude of the base vector.
The vector being projected onto is b. We square its components and add them to get the square of its magnitude:
4. Obtain the projection vector.
The projection of vector a onto the direction of b can be obtained using the following formula:
We substitute the previously calculated values:
Calculate the orthogonal projection and scalar component of vector ⟨1, 1, 1⟩ onto vector ⟨2, -1, 3⟩.
Result
The orthogonal projection of vector a onto the direction of vector b is:
Scalar projection: \( \displaystyle \text{comp}_{\vec{b}}~ \vec{a} = \frac{\vec{a} \cdot \vec{b}}{|\vec{b}|} = \frac{4}{\sqrt{14}} \approx 1.07 \)
Step-by-step resolution
1. Identify the vector components.
The vectors we are working with are:
We extract their respective components to use them in subsequent calculations:
2. Calculate the dot product.
We obtain the dot product by multiplying the corresponding components of both vectors and adding the results:
3. Calculate the square of the magnitude of the base vector.
The vector being projected onto is b. We square its components and add them to get the square of its magnitude:
4. Obtain the projection vector.
The projection of vector a onto the direction of b can be obtained using the following formula:
We substitute the previously calculated values:




