The projection of onto is the shadow of on the line through . It is a multiple of , and the multiplier is divided by .
| Step | On onto | |
|---|---|---|
| 1 | Identify the vector you project onto. The answer is a multiple of that vector. Swapping the roles gives a different answer. | project onto |
| 2 | Compute the dot product u · v. See the dot product. | |
| 3 | Compute v · v. This is , the squared length. | |
| 4 | Divide and scale v. The ratio is the multiplier of .Scalar multiplication ↗ | |
| 5 | Check: the leftover is perpendicular to v. Subtract the projection from ; the result must have dot product with (the orthogonal decomposition).Component-wise addition ↗ | ; ✓ |