Projection of A onto B Calculator

Published on: March 22, 2026

This Projection of A onto B Calculator helps you find the vector projection of one 3D vector onto another. First find the dot product of A and B, then divide by the magnitude squared of B to get the scalar factor. Multiply vector B by that factor to get the final projection vector. It is a simple way to check answers, understand the method clearly, and practise vector operations step by step.

Step-by-step method

  1. Identify the vector components.
  2. Compute the dot product A · B.
  3. Compute |B|².
  4. Use proj_B(A) = ((A · B) / |B|²) B and simplify.

Formula:

projB( A )=(
A·B
|B|2
)B
k=
A·B
|B|2

Example 1: (1,2,3),(4,5,6)

Step 1 - Identify the components.

In this problem: From the given vectors A = (1, 2, 3) and B = (4, 5, 6), the components are:

a1=1, a2=2, a3=3
b1=4, b2=5, b3=6

Step 2a - Write the dot product formula.

In this problem: Use A · B = a₁b₁ + a₂b₂ + a₃b₃.

A·B=a1b1+a2b2+a3b3

Step 2b - Substitute values.

In this problem: Replace aᵢ and bᵢ with your values.

A·B=( 1 )·( 4 )+( 2 )·( 5 )+( 3 )·( 6 )

Step 2c - Multiply and add.

In this problem: Compute the dot product.

A·B=4+10+18=32

Step 3a - Write the |B|² formula.

In this problem: Use |B|² = b₁² + b₂² + b₃².

|B|2=b12+b22+b32

Step 3b - Substitute values.

In this problem: Replace bᵢ with your values.

|B|2=( 4 )2+( 5 )2+( 6 )2

Step 3c - Simplify |B|².

In this problem: Compute the squares and add.

|B|2=77

Step 4a - Write the scalar factor formula.

In this problem: Use k = (A · B) / |B|².

k=
A·B
|B|2

Step 4b - Substitute values.

In this problem: Substitute A · B and |B|².

k=
32
77

Step 5a - Write the projection formula.

In this problem: Use proj_B(A) = kB.

projB( A )=(
A·B
|B|2
)B

Step 5b - Substitute k and B.

In this problem: Substitute the scalar k and the vector B.

projB( A )=
32
77
·( 4, 5, 6 )

Step 5c - Multiply to get the projection.

In this problem: Multiply k into each component of B.

projB( A )=(
128,160,192
777777
)

Final answer: proj_B(A) = (128/77, 160/77, 192/77)

Example 2: (1/2,0,0),(2,0,0)

Step 1 - Identify the components.

In this problem: From the given vectors A = (1/2, 0, 0) and B = (2, 0, 0), the components are:

a1=
1
2
, a2=0, a3=0
b1=2, b2=0, b3=0

Step 2a - Write the dot product formula.

In this problem: Use A · B = a₁b₁ + a₂b₂ + a₃b₃.

A·B=a1b1+a2b2+a3b3

Step 2b - Substitute values.

In this problem: Replace aᵢ and bᵢ with your values.

A·B=(
1
2
)·( 2 )+( 0 )·( 0 )+( 0 )·( 0 )

Step 2c - Multiply and add.

In this problem: Compute the dot product.

A·B=1+0+0=1

Step 3a - Write the |B|² formula.

In this problem: Use |B|² = b₁² + b₂² + b₃².

|B|2=b12+b22+b32

Step 3b - Substitute values.

In this problem: Replace bᵢ with your values.

|B|2=( 2 )2+( 0 )2+( 0 )2

Step 3c - Simplify |B|².

In this problem: Compute the squares and add.

|B|2=4

Step 4a - Write the scalar factor formula.

In this problem: Use k = (A · B) / |B|².

k=
A·B
|B|2

Step 4b - Substitute values.

In this problem: Substitute A · B and |B|².

k=
1
4

Step 5a - Write the projection formula.

In this problem: Use proj_B(A) = kB.

projB( A )=(
A·B
|B|2
)B

Step 5b - Substitute k and B.

In this problem: Substitute the scalar k and the vector B.

projB( A )=
1
4
·( 2, 0, 0 )

Step 5c - Multiply to get the projection.

In this problem: Multiply k into each component of B.

projB( A )=(
1
2
, 0, 0 )

Final answer: proj_B(A) = (1/2, 0, 0)