Mechanics

Springs and Hooke's Law

Force proportional to displacement — F = -kx, the linear approximation that drives SHM

Hooke's law (Robert Hooke, 1660s) says the force from a spring is proportional to its displacement from equilibrium — F = -kx, where k is the spring constant. The linear restoring force is what makes springs into perfect harmonic oscillators. Real springs deviate at large displacements (non-linear). The same linear law approximates ANY restoring force near equilibrium — molecular bonds, taut strings, materials under stress.

  • Hooke's lawF = -k·x
  • Spring constantk (units N/m) — stiffness
  • PE storedU = ½·k·x² (parabolic in displacement)
  • Period (mass on spring)T = 2π·√(m/k)
  • Linear rangeValid for small x; fails near elastic limit
  • Material originAtomic bonds; bulk modulus, Young's modulus

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Hooke's law

The force exerted by a spring on an object attached to it is proportional to the displacement from equilibrium:

F = -k·x

where:

  • x is displacement from equilibrium (positive = stretched, negative = compressed).
  • k is the spring constant (always positive, units N/m).
  • The negative sign means the force opposes displacement (restoring).

Stretch the spring → it pulls back. Compress it → it pushes back. Always toward equilibrium.

Spring constant — what determines k?

FactorEffect on k
Wire material (Young's modulus E)Higher E → stiffer (more rigid wire)
Wire diameter dk ∝ d⁴ (very strong dependence)
Coil radius Rk ∝ 1/R³ (smaller coils → stiffer)
Number of coils Nk ∝ 1/N (fewer coils → stiffer)

Combined formula for a coil spring: k = G·d⁴/(8·D³·N) where G is shear modulus, D is mean coil diameter, N is number of coils.

Elastic potential energy

The work to stretch a spring from 0 to x:

U(x) = ∫₀ˣ k·x' dx' = ½·k·x²

This is the potential energy stored in the spring. It's quadratic in displacement — a parabola.

For x = ±A, U = ½kA² (max). At x = 0, U = 0. Total mechanical energy in undamped SHM:

E = ½kA² (constant)
KE + PE = E (oscillates between forms)

Series and parallel combinations

Configurationk_effNotes
Single spring, kk
Two in series, k₁ and k₂1/(1/k₁ + 1/k₂)Same force, displacements add
Two in parallel, k₁ and k₂k₁ + k₂Same displacement, forces add
Two equal springs, k each, seriesk/2Half stiffness
Two equal springs, k each, parallel2kDouble stiffness
n in seriesk/n (if all equal)Long springs are softer
n in paralleln·kMultiple springs share load

Mass-spring oscillation

For a mass m on a spring of constant k, the equation of motion:

m·ẍ = -k·x  →  ẍ = -(k/m)·x = -ω²·x

This is SHM with ω = √(k/m). Period:

T = 2π · √(m/k)

Doubling mass: T increases by √2 (~1.41×). Quadrupling stiffness: T halves.

Real springs — beyond Hooke

Hooke's law works only in the elastic region. For larger displacements:

RegionBehavior
Elastic (small x)F = -kx (Hooke); spring fully recovers
Yield regionPermanent deformation begins (plastic flow)
Plastic deformationReturns to "set" shape with offset
Breaking pointSpring snaps (fractures)
Compressed beyond limitCoils touch (further compression impossible)

Spring designers build in safety margins — operating range is 30-50% of yield.

JavaScript — spring problems

// Force from spring at displacement x
function springForce(k, x) {
  return -k * x;
}

// Elastic PE
function elasticPE(k, x) {
  return 0.5 * k * x * x;
}

// Period of mass-spring oscillator
function springPeriod(m, k) {
  return 2 * Math.PI * Math.sqrt(m / k);
}

// Series and parallel combinations
function seriesK(k_array) {
  return 1 / k_array.reduce((s, k) => s + 1/k, 0);
}

function parallelK(k_array) {
  return k_array.reduce((s, k) => s + k, 0);
}

console.log(`2 springs of 100 N/m series: ${seriesK([100, 100])} N/m`);  // 50
console.log(`2 springs of 100 N/m parallel: ${parallelK([100, 100])} N/m`); // 200

// Spring launches a ball — find launch velocity
function springLaunch(k, x_compressed, mass) {
  // ½kx² → ½mv² (energy conservation)
  const PE = elasticPE(k, x_compressed);
  return Math.sqrt(2 * PE / mass);
}

// 100 N/m spring compressed 10 cm, ball mass 0.05 kg
const launch_v = springLaunch(100, 0.1, 0.05);
console.log(`Launch velocity: ${launch_v.toFixed(2)} m/s`); // 4.47 m/s

// Range from spring launch (horizontal projectile from height h)
function rangeFromSpring(k, x_compressed, mass, height_above_ground) {
  const v = springLaunch(k, x_compressed, mass);
  const t_fall = Math.sqrt(2 * height_above_ground / 9.81);
  return v * t_fall;
}

console.log(`Range (1 m up): ${rangeFromSpring(100, 0.1, 0.05, 1).toFixed(2)} m`); // 2.02 m

// Pendulum-like time from spring constant equivalent
// (Spring energy of mass-on-string acts like restoring constant k = mg/L)
function springConstantOfPendulum(m, L, g = 9.81) {
  return m * g / L;  // effective k for small oscillations
}

console.log(`1m pendulum equivalent k: ${springConstantOfPendulum(1, 1).toFixed(2)} N/m`);  // 9.81

Where Hooke's law shows up

  • Mechanical engineering. Vehicle suspension, vibration isolation, watch escapements, valve springs, locks.
  • Material science. Young's modulus, bulk modulus, shear modulus — all derive from Hooke's law applied to bulk materials.
  • Molecular physics. Bond stretching/compression near equilibrium follows F = -kx; bond force constants from IR spectroscopy.
  • Acoustics. Air pressure waves — local pressure deviation acts like spring restoring force; sound waves are Hooke-like oscillations.
  • Microelectromechanical (MEMS). Silicon springs in accelerometers (smartphone gyros), pressure sensors, micromirrors.
  • Architecture. Tuned mass dampers (large pendulums) in skyscrapers act as springs; building structural elements treated as composite springs.
  • Toys and sports. Trampolines, pogo sticks, archery bows, gymnastics floor springs.

Common mistakes

  • Forgetting the negative sign. F = -kx, not +kx. Force is restoring (toward equilibrium).
  • Applying Hooke beyond elastic limit. Overstretching a spring permanently deforms it; F = -kx no longer holds.
  • Confusing series and parallel. Springs in series → softer (1/k_eff = sum of 1/k). Springs in parallel → stiffer (k_eff = sum of k). Opposite of intuition for some.
  • Wrong PE formula. Spring PE is ½kx², NOT kx². The factor of ½ comes from integrating force over distance.
  • Mixing pendulum and spring formulas. Pendulum: T = 2π√(L/g). Spring: T = 2π√(m/k). Both look like SHM but have different physical sources.
  • Treating real springs as ideal. Real springs have mass, internal damping, non-linearity, and fatigue. Hooke's law is the linear approximation.

Frequently asked questions

Why is Hooke's law linear?

For small displacements, the leading term of any restoring force is linear (Taylor expansion: F(x) ≈ F(0) + F'(0)·x + ...; at equilibrium F(0) = 0, so F ≈ F'(0)·x). For springs, F'(0) = -k. Beyond small displacements, higher-order terms (cubic, etc.) become important. So Hooke's law is the SMALL-DISPLACEMENT approximation that works for nearly any spring/elastic system.

What's the spring constant k physically?

k measures stiffness. Stiff spring (large k) requires more force per unit stretch. Soft spring (small k) stretches easily. Units N/m. For a coil spring made of wire diameter d, coil radius R, with N coils — k ∝ d⁴/(R³·N). Increasing wire thickness by 2× makes spring 16× stiffer (d⁴ scaling).

What's the elastic potential energy stored?

U = ½·k·x² — quadratic in displacement. At equilibrium (x=0), U=0. Stretched or compressed by x, U = ½kx². This is converted to kinetic energy on release. Same form (½ × stiffness × displacement²) appears in many physics contexts — elastic deformation, capacitor energy ½CV², inductor ½LI².

What's the elastic limit?

The max stretch beyond which the spring no longer returns to its original length (permanent deformation). Below this, behavior is elastic (recovers); beyond it, plastic (deforms). Past the breaking point, the spring snaps. Real materials have ranges: