HuntsvilleEngineers mark
HE Reference Shelf — huntsvilleengineers.com
The Reference Shelf · Geometry & Mechanics

Vector projection and direction cosines

Projection answers "how much of this force acts along that member," and direction cosines are the three numbers that define which way the member points.

Also known as: component of a vector · direction angles

The formula

The scalar projection of vector a onto direction b:

comp_b(a) = a·b / |b| = |a|·cos θ

Reading: dot a against a unit vector along b and you get the signed length of a's shadow on that line — positive means with b, negative means against it.

The vector projection, which puts that shadow back into vector form:

proj_b(a) = (a·b / |b|²) · b

Reading: the scalar component times the unit direction; note the |b|² in the denominator — one factor normalizes the dot product, the other normalizes b itself.

What's left over, the rejection:

a_perp = a − proj_b(a)          |a|² = |proj|² + |a_perp|²

Reading: subtract the along-axis part and the remainder is exactly perpendicular to b — Pythagoras holds between the two pieces.

Direction cosines of a vector v = (v_x, v_y, v_z):

cos α = v_x/|v|    cos β = v_y/|v|    cos γ = v_z/|v|
cos²α + cos²β + cos²γ = 1

Reading: the three cosines are just the components of the unit vector along v, so their squares must sum to 1 — the three direction angles are not independent, and any two fix the third up to a sign.

Projection written with direction cosines, the form statics books use:

F_axial = F_x·cos α + F_y·cos β + F_z·cos γ

Reading: the load carried along a member is each force component weighted by how much the member leans into that axis.

Where you meet it

  • Truss and strut sizing at the design review. A member runs from the origin to (3, 4, 12) ft — length 13 ft, direction cosines (3/13, 4/13, 12/13), and you can check them on the spot because (9 + 16 + 144)/169 = 1. A joint load of F = (300, −200, 600) lbf has an axial component of (900 − 800 + 7200)/13 = 561.5 lbf along that member's line — the member's actual internal force still comes from joint equilibrium with everything else framing into the joint. The full load is 700 lbf; the remaining 417.9 lbf is perpendicular to the member's axis and must be reacted elsewhere, and 561.5² + 417.9² recovers 700² exactly.
  • Load cell alignment on the test stand. A load cell reads the projection of the applied force onto its own axis, whether you meant it to or not. Misalign the line of action by 5° and the cell reads cos 5° = 0.9962 of truth — 0.38 percent low, every pull, in the same direction. That is cosine error, and it does not average out with more samples.
  • Strain-gauge placement on a test article. A gauge bonded at an angle to the load axis reads the strain projected onto its grid direction. Instrumentation drawings call out gauge orientation to the degree because the correction is a cosine of that angle, and nobody wants to argue about it after the test.
  • Lift and drag at the aero desk. The total aerodynamic force on a body is one vector; lift and drag are its projections perpendicular and parallel to the freestream. Rotate the freestream direction (angle of attack changes) and the same physical force decomposes into different lift and drag numbers — the components are properties of the axis choice, not of the airplane alone.

How it works

Everything above is one operation wearing different clothes. The dot product a·b = |a||b|·cos θ mixes two magnitudes with the cosine of the angle between them; divide out one magnitude and you have a projection; set |a| = 1 and the components of the unit vector are the direction cosines. An engineer who is comfortable with F·û never needs to memorize the rest.

The behavior worth internalizing:

  • Projection is signed. comp_b(a) < 0 means the component points against the reference direction. In a truss that is the difference between tension and compression in your sign convention; in a load-cell hookup it is the difference between reading a pull as a pull or as a push. Do not take absolute values until the physics says to.
  • Projection is insensitive near alignment and vicious near 90°. For small misalignment θ (in radians), cos θ ≈ 1 − θ²/2, so a 2° error costs only 0.06 percent — this forgiveness is why bench setups work at all. But the transverse component grows like sin θ ≈ θ: that same 2° puts 3.5 percent of the load sideways into a cell that may only tolerate a few percent side load. The axial reading barely notices the misalignment that is quietly damaging the sensor.
  • Projection is idempotent. Project a vector onto a line, then project the result onto the same line, and nothing changes. That sounds like trivia until you build a projection matrix P = ûûᵀ in code; P·P = P is the unit test that catches a missing normalization.
  • The mistake people actually make: projection is not resolution. Projecting a force onto two directions gives its components only if the directions are perpendicular. Resolve a load along two members that meet at 60° by projecting onto each, and the two "components" do not add back to the original force — you have double-counted the overlap. Resolving along non-orthogonal directions is a parallelogram problem: write F = c₁·û₁ + c₂·û₂ and solve the 2×2 system. Skew-legged fixtures, A-frames, and bipods punish anyone who forgets this.
  • The other mistake: treating direction angles as independent. You cannot specify α = 30°, β = 40°, γ = 60° and expect a direction to exist; cos²30° + cos²40° + cos²60° = 1.587 ≠ 1. Two angles constrain the third. The same constraint scaled up is why a 3×3 direction cosine matrix has nine entries but only three degrees of freedom — six orthonormality conditions eat the rest, which is exactly what an IMU's attitude algorithm re-enforces every cycle when it renormalizes the DCM.
  • Limits of validity. All of this assumes a Euclidean space with a fixed orthonormal frame. Direction cosines taken between non-orthogonal axes lose the sum-of-squares identity, and projections of anything but the geometric vector (projecting a stress "vector" of Mohr's-circle components, say) require the tensor transformation rules, not a single cosine.

History

Direction cosines are older than vectors — engineers were weighting things by cosines of axis angles long before anyone drew an arrow with a dot in the middle. The orientation problem they solve was framed by Leonhard Euler, whose 1775 paper on rigid-body motion (published 1776) proved that any reorientation of a rigid body is a single rotation about some axis; Euler argued by spherical geometry, and the array-of-nine-cosines description of attitude that navigators now call the DCM grew out of that line of work [1][2]. In the 1820s Augustin-Louis Cauchy made direction cosines load-bearing for mechanics: his stress theory — including the 1827 memoir "De la pression ou tension dans un corps solide" — showed the traction on any internal plane is a linear function of the plane's unit normal, i.e., of its direction cosines, which is the tetrahedron argument every strength-of-materials course still teaches [3][4].

The projection operation got its modern packaging from two men working independently within a year of each other. William Rowan Hamilton carved the quaternion relations i² = j² = k² = ijk = −1 into Dublin's Broome Bridge on 16 October 1843; the product of two of his "pure" quaternions splits into a scalar part and a vector part, and that scalar part is the negative of what we now call the dot product [5][6]. Hermann Grassmann's 1844 Ausdehnungslehre, drafted 1842–43, built explicit projections onto subspaces in arbitrary dimension (his inner product followed in an 1847 essay and the rewritten 1862 edition) — and was so far ahead of its audience that it went essentially unread for decades [7][8]. The notation engineers actually use came later: Josiah Willard Gibbs printed private notes, Elements of Vector Analysis, for his Yale students in 1881 and 1884, stripping the quaternion down to separate dot and cross products; his student Edwin Bidwell Wilson expanded the lectures into the 1901 textbook Vector Analysis, which standardized a·b for the century that followed [9][10].

Related tools

Sources

  1. https://en.wikipedia.org/wiki/Euler%27s_rotation_theorem
  2. https://scholarlycommons.pacific.edu/euler-works/478/
  3. https://en.wikipedia.org/wiki/Cauchy_stress_tensor
  4. https://en.wikipedia.org/wiki/Augustin-Louis_Cauchy
  5. https://mathshistory.st-andrews.ac.uk/Biographies/Hamilton/
  6. https://en.wikipedia.org/wiki/Cross_product
  7. https://mathshistory.st-andrews.ac.uk/Biographies/Grassmann/
  8. https://en.wikipedia.org/wiki/Hermann_Grassmann
  9. https://mathshistory.st-andrews.ac.uk/Biographies/Gibbs/
  10. https://en.wikipedia.org/wiki/Vector_Analysis

Written by HE in our own words from the cited sources — engineering judgment included, your stamp still required. All entries →

★ The Reference Shelf

Reading is free. The shelf is for cardholders.

Your library card is an email address: pin it to your shelf, print the card, take the FE/PE quick-reference pack, read the Huntsville history. The shelf remembers what you reach for.

Already on the list? Enter with your subscribed email →