Library / Foundations: Maths / FMA-62
Foundations: Maths
Scalar projection of one vector onto another
Signed length of the shadow of vector a along the direction of vector b.
- Ref
- FMA-62
- Rev
- v1
- Field
- Foundations: Maths
- Result
- a_∥
The scalar projection a·b/|b| is the signed length of the part of a that lies along the direction of b, the shadow of a on b. It is negative when the vectors point in opposite senses. The vector projection is (a·b/b·b) b, which points along b and has length |a·b|/|b|. Vector b must be nonzero.
Signed length of the shadow of vector a along the direction of vector b. It is negative when the vectors point in opposite senses, and b must be nonzero.
Calculator
- Dot product a·b8
- Length |b|4.583
- Vector projection, x component1.524
- Vector projection, y component−0.381
- Vector projection, z component0.7619
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- The part of a = (1, 2, 3) along b = (4, −1, 2) is 1.746, against a total length of 3.742. The rest, 3.309, is perpendicular to b.
- For a force a and a member along b, this is the axial component of the force; the perpendicular part acts as shear or bending.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| ax x component of a | −10 to 10 | −7.856 | 9.602 | 17.46 | +0.4 | +20 % |
| az z component of a | −10 to 10 | −3.928 | 4.801 | 8.729 | +0.4 | +10 % |
| bz z component of b | −10 to 10 | −2.589 | 2.958 | 5.547 | +0.4 | +10.5 % |
| ay y component of a | −10 to 10 | 0 | 4.364 | 4.364 | +0.4 | −5 % |
| by y component of b | −10 to 10 | −0.9129 | 3 | 3.913 | +0.4 | +11.7 % |
| bx x component of b | −10 to 10 | −0.5855 | 2.049 | 2.634 | +0.4 | −2.51 % |
Sweep of x component of a
| x component of a | Component of a along b |
|---|---|
| −10 | −7.856 |
| −7.5 | −5.674 |
| −5 | −3.491 |
| −2.5 | −1.309 |
| 0 | 0.8729 |
| 2.5 | 3.055 |
| 5 | 5.237 |
| 7.5 | 7.419 |
| 10 | 9.602 |
Sweep one variable
Variables and how each one contributes
Component of a along b
What the equation gives you. Everything else feeds it.
x component of a
The x component of vector a, in the same units as the other components. Changes the projection by turning and stretching vector a: it adds bx to the dot product and also lengthens a, so the net effect depends on the directions. Raising it by 0.5 (to 1.5) moves the result by +25 %, from 1.746 to 2.182.
y component of a
The y component of vector a, in the same units as the other components. Changes the projection by turning and stretching vector a: it adds by to the dot product and also lengthens a, so the net effect depends on the directions. Raising it by 0.5 (to 2.5) moves the result by −6.25 %, from 1.746 to 1.637.
z component of a
The z component of vector a, in the same units as the other components. Changes the projection by turning and stretching vector a: it adds bz to the dot product and also lengthens a, so the net effect depends on the directions. Raising it by 0.5 (to 3.5) moves the result by +12.5 %, from 1.746 to 1.964.
x component of b
The x component of vector b, in the same units as the other components. Changes the projection by turning and stretching vector b: it adds ax to the dot product and also lengthens b, so the net effect depends on the directions. Raising it by 0.5 (to 4.5) moves the result by −3.1 %, from 1.746 to 1.692.
y component of b
The y component of vector b, in the same units as the other components. Changes the projection by turning and stretching vector b: it adds ay to the dot product and also lengthens b, so the net effect depends on the directions. Raising it by 0.5 (to −0.5) moves the result by +14.6 %, from 1.746 to 2.
z component of b
The z component of vector b, in the same units as the other components. Changes the projection by turning and stretching vector b: it adds az to the dot product and also lengthens b, so the net effect depends on the directions. Raising it by 0.5 (to 2.5) moves the result by +12.9 %, from 1.746 to 1.97.
Worked example with the values above
- Dot product: 1×4 + 2×−1 + 3×2 = 8.
- Length of b: |b| = 4.583.
- Component of a along b = 8 / 4.583 = 1.746.
Assumptions and limits
- Both vectors are in the same coordinate system and units.
- Vector b is nonzero.
Common mistakes
- Dividing by |b|² and forgetting to multiply by b when the vector projection is wanted.
- Treating the scalar projection as always positive: it is negative when the angle exceeds 90°.
Statistics and uncertainty
The projection is a product of a length and the cosine of the angle, so it is largest when a is parallel to b and zero when they are perpendicular. A small error in direction matters little when the vectors are almost parallel and a lot when they are nearly perpendicular.
Where it is used
- The component of a force along a member, or of a velocity along a path.
- Resolving a vector into parts along and across a direction.
Maths you need
- Dot product: sum of products of matching components
- Vector length: square root of the sum of squared components