A force can be large and still do no mechanical work. Hold a heavy bag while walking across a level floor: the supporting force is mostly vertical while the displacement is horizontal. Push against a wall that never moves and the displacement is zero. Pull a sled at an angle and only part of the pull points along its motion.
The dot product is the operation that separates these cases. Algebraically, it pairs matching components. Geometrically, it measures alignment through a cosine. Physically, it selects the part of a force that acts along a displacement. Those are not three unrelated tricks; they are three views of the same scalar.

a · b = Σ aibi = |a||b| cos θA vector is more than a list of numbers
In an orthonormal Cartesian basis, a vector can be written as
a = axî + ayĵ + azk̂The unit vectors carry direction and are dimensionless. The scalar components carry the vector's physical unit.
For displacement, the components are measured in metres; for force, newtons. A displacement is a change in position, d = rf − ri, not the final position vector by itself. Moving the coordinate origin must not change physical work.
The component formula also carries a hidden contract: both vectors must use the same orthonormal basis, reference frame, and compatible units. Pairing “east, north, up” components with numbers expressed in a rotated body frame has no physical meaning until one vector is transformed. NASA/JPL’s NAIF documentation states this operational requirement directly for vector-rate calculations. In a non-orthonormal basis, a raw sum of component products is generally wrong; a metric or Gram matrix is needed.
Why component multiplication becomes a cosine
For two nonzero vectors, form the triangle whose sides are a, b, and a − b. The law of cosines says
|a − b|² = |a|² + |b|² − 2|a||b| cos θ|a − b|² = (a − b) · (a − b) = |a|² + |b|² − 2a · ba · b = |a||b| cos θThe equality explains the sign:
a · b > 0The vectors mostly point together.
a · b = 0Neither has a component along the other.
a · b < 0The vectors mostly oppose one another.
This sign rule is stated in the official OpenStax treatment of products of vectors. The zero case is called orthogonality, but a zero dot product does not tell you which vector has what magnitude. It reports alignment, not size by itself.
Projection turns alignment into a usable component
Let b̂ = b/|b| be the unit vector along a nonzero b. The signed scalar projection of a onto b is the amount of a in that direction:
compba = a · b̂ = (a · b)/|b|A signed scalar with the units of a.
projba = [(a · b)/(b · b)]bA vector pointing along or opposite b.
a⊥ = a − projbaCheck: a⊥ · b = 0.
The OpenStax Calculus projection formulas make the geometry explicit. Projection onto the zero vector is undefined because there is no target direction and b · b is zero.
The angle can be recovered when both vectors are nonzero:
θ = arccos[(a · b)/(|a||b|)]F∥ = W/dW = Fd cos θF = W/(d cos θ)d = W/(F cos θ)θ = arccos[W/(Fd)]These inverse forms have domains. Do not divide by zero displacement or by cos θ = 0. For angle recovery, reject zero norms and ratios genuinely outside [−1,1]. Software may clamp only a tiny floating-point overshoot such as 1 + ε; clamping a materially invalid ratio hides bad inputs. Label degrees versus radians.

Mechanical work is a force–displacement dot product
For a constant force acting while its point of application undergoes displacement d,
W = F · d = Fd cos θ = F∥dThis is work done by that force, not necessarily net work. During one motion, gravity, friction, a normal force, tension, and an applied force can make separate positive, negative, or zero contributions. Their sum is net work.
The unit check is direct:
1 N = 1 kg·m·s−21 m1 J = 1 N·m = 1 kg·m²·s−2The BIPM/CIPM definition describes one joule as the work done when a one-newton force moves its point of application one metre in the force direction. Torque has the same base dimensions but is a different quantity: it comes from a cross product and is conventionally written in N·m, never joules. Both the current BIPM SI Brochure and NIST’s SI guide preserve that distinction.
Worked example 1: an angled pull across level ground
A constant force of 120 N acts 25° above the horizontal while its point of application moves 18.0 m horizontally to the right. Treat the values as supporting three significant figures.
+x right, +y upF = (120 cos25°, 120 sin25°) = (108.7569, 50.7142) Nd = (18.0, 0) mW = Fxdx + Fydy = (108.7569)(18.0) + (50.7142)(0)W = 1957.6248 J ≈ 1.96 kJFd cosθ = (120)(18.0)cos25° = 1957.6248 JThe magnitude check √(108.7569² + 50.7142²) = 120.0000 N confirms the component split. The vertical force component does zero work because vertical displacement is zero. The result is positive and less than the aligned maximum Fd = 2160 J, consistent with an acute nonzero angle.
Worked example 2: negative work in three dimensions
Let a constant force and displacement be
F = (4, −2, 5) Nd = (3, 6, −1) mW = 4(3) + (−2)(6) + 5(−1) = 12 − 12 − 5 = −5 J|F| = √45 = 6.70820 N; |d| = √46 = 6.78233 mcosθ = −5/(√45√46) = −0.1098967θ = arccos(−0.1098967) = 96.3094°compdF = −5/√46 = −0.737210 NprojdF = (−5/46)(3,6,−1) ≈ (−0.326087, −0.652174, 0.108696) NThe obtuse angle agrees with negative work: the force’s parallel component points opposite the displacement. A forward check gives |F||d|cosθ = −5 J. Subtracting the vector projection from F leaves a perpendicular remainder whose dot product with d is zero apart from floating-point roundoff.
Negative work does not mean “negative energy exists.” It means this force transfers energy out of the chosen object or system under the stated sign convention.
A curved path turns one dot product into a line integral
The compact formula F · Δr is exact when the force vector is constant over the motion. If magnitude or direction changes with position, divide the path into infinitesimal displacements:
dW = F(r) · drWA→B = ∫C F(r) · dr = ∫C(Fxdx + Fydy + Fzdz)P = dW/dt = F · vPavg = ΔW/ΔtThe OpenStax work chapter identifies this as a line integral. The curve matters for a general force because the local force is projected onto each local path direction. Average power is not generally Favg · vavg; the instantaneous relation and time averaging must be kept distinct, as shown in the OpenStax power treatment.

Path independence belongs only to conservative forces
For a conservative force, work between two endpoints is independent of the path and work around a closed loop is zero. Its potential energy satisfies
WA→B, cons = −ΔU = UA − UBThis relation applies to the work of the conservative force whose potential energy is being used. It does not turn friction or an arbitrary applied force into an endpoint-only calculation.
A curved path can still give path-independent work for a conservative force. A straight path does not make a nonconservative force path independent. Geometry alone is not the test; the force field is. OpenStax gives the endpoint and closed-loop criteria in its treatment of conservative and nonconservative forces.
Common failures and what they change
| Failure | Why it fails | Repair |
|---|---|---|
| Use final position instead of displacement | Work would change when the coordinate origin moves. | Compute rf − ri. |
| Multiply mismatched component lists | Different frames or bases pair different physical directions. | Transform both vectors into one common orthonormal basis. |
| Mix component units | The terms cannot represent one scalar sum. | Convert compatible units before multiplying. |
| Ignore angle mode | cos25° and cos25 rad are different numbers. | State and verify degrees or radians. |
| Find an angle with a zero vector | The norm product is zero and the vector has no direction. | Return undefined; do not invent an angle. |
| Assume motion means positive work | Each force has its own signed alignment with displacement. | Compute each force's dot product separately. |
Use F · Δr for a varying force | One vector cannot represent changing magnitude or direction. | Evaluate the path line integral. |
| Write torque in joules | Torque and work share dimensions but are different quantities. | Use N·m for torque and J for work. |
The dot product is compact because it carries so much structure at once: basis, units, direction, sign, and projection. A reliable calculation keeps that structure visible. It asks not merely “how large is the force?” but “how much of this force acts along this displacement, in this frame, over this path?”