Your Equation

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

Solve for
−1010
−1010
−1010
−1010
−1010
−1010
  • 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.

Component of a along b () current value 1.746
axx component of aKey driver
−7.869.6
azz component of a
−3.934.8
bzz component of b
−2.592.96
ayy component of a
04.36
byy component of b
−0.9133
bxx component of b
−0.5862.05
  • 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

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
ax x component of a−10 to 10 −7.8569.60217.46+0.4 +20 %
az z component of a−10 to 10 −3.9284.8018.729+0.4 +10 %
bz z component of b−10 to 10 −2.5892.9585.547+0.4 +10.5 %
ay y component of a−10 to 10 04.3644.364+0.4 −5 %
by y component of b−10 to 10 −0.912933.913+0.4 +11.7 %
bx x component of b−10 to 10 −0.58552.0492.634+0.4 −2.51 %

Sweep of x component of a

x component of aComponent of a along b
−10−7.856
−7.5−5.674
−5−3.491
−2.5−1.309
00.8729
2.53.055
55.237
7.57.419
109.602

Sweep one variable

Component of a along b ()Hover, touch, or use the arrow keys on the chart
−50510 −10−50510 x component of a now 1.746

Variables and how each one contributes

a_∥

Component of a along b

Result ·

What the equation gives you. Everything else feeds it.

ax

x component of a

· typical −10 to 10

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.

ay

y component of a

· typical −10 to 10

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.

az

z component of a

· typical −10 to 10

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.

bx

x component of b

· typical −10 to 10

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.

by

y component of b

· typical −10 to 10

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.

bz

z component of b

· typical −10 to 10

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

  1. Dot product: 1×4 + 2×−1 + 3×2 = 8.
  2. Length of b: |b| = 4.583.
  3. 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

Related formulas

Practise this formula