Safeguard
Supply Chain Security•

Hooke's Law Explained With Worked Examples, Springs to Steel Beams

Hooke's law says stretch is proportional to force, F = −kx. Stress, strain and Young's modulus, worked spring, suspension, rod and beam examples, and limits.

Safeguard Security Team
50 min read

Hooke's law says that the force needed to stretch or compress a spring is proportional to how far you move it from its relaxed length: F = kx, where k is the spring constant. The restoring force the spring pushes back with is F = −kx, and the minus sign means it always points back toward equilibrium. Robert Hooke hid the rule in a Latin anagram in 1676 and published the answer, "ut tensio, sic vis" (as the extension, so the force), in 1678.

Written for solid materials instead of coil springs, the same idea becomes σ = Eε: stress equals Young's modulus times strain. That one line sizes steel cables, predicts how far a floor beam sags, sets the bounce frequency of a car and lets a phone's accelerometer turn a nanometre of movement into a reading in metres per second squared. It also has hard limits. Past the proportional limit the line bends, past the elastic limit the part never comes back, and rubber, wood and hot metal break the rule in ways worth knowing.

This post goes one level below our tour of famous equations that changed the world. It leans on Newton's three laws of motion, because every spring problem is a force balance or F = ma in disguise, and it borrows the "one linear law, many circuits" approach from Ohm's law and Kirchhoff's laws. Springs combine in series and parallel almost exactly the way resistors do, just the other way round.

A note on numbers. Definitions and moduli come from the free OpenStax textbooks University Physics Volume 1 and College Physics 2e (published by OpenStax at Rice University) and from Georgia State University's HyperPhysics. The history comes from the Internet Archive's scans of Hooke's own 1676 and 1678 books, test method scopes from ASTM's own pages, and standard gravity from NIST's CODATA tables. Figures we chose ourselves are labelled illustrative, and every calculation was rerun with the Python script in the walkthrough.

Key takeaways

  • The law: for small deformations, force is proportional to displacement. F = kx is the force you apply; F = −kx is the restoring force the spring applies back, pointing toward equilibrium. k is measured in newtons per metre (N/m).
  • The history: Hooke printed a scrambled anagram at the end of A Description of Helioscopes (1676) and gave the solution in Lectures de Potentia Restitutiva, or of Spring (1678): "ut tensio, sic vis". In the same lecture he described a spring "Philosophical Scale" for weighing without weights, the ancestor of every spring balance.
  • For materials: stress σ = F/A, strain ε = ΔL/L₀, and in the linear range σ = Eε. Young's modulus E is about 200 to 210 GPa for steel, 70 GPa for aluminium and 20 GPa for concrete according to OpenStax and HyperPhysics.
  • A rod is a spring: a bar of length L and area A behaves like a spring with k = EA/L. A beam behaves like a spring too, with a stiffness set by E, the shape of its cross section (I) and the cube of its span.
  • Combining springs: in parallel, stiffnesses add (k = k₁ + k₂). In series, compliances add (1/k = 1/k₁ + 1/k₂). That is the reverse of resistors.
  • Energy and motion: a spring stores U = ½kx². A mass on a spring oscillates with period T = 2π√(m/k), independent of amplitude.
  • Limits: linear behaviour ends at the proportional limit; permanent set begins at the elastic limit; ductile metals then yield and flow. Rubber is nonlinear and loses energy to hysteresis, wood and hot metals creep, and moduli change with temperature.
  • Measured, not derived: moduli come from standard tension tests. ASTM E111 covers Young's modulus, E132 covers Poisson's ratio, E8/E8M covers yield and tensile strength of metals and E139 covers creep.

What does Hooke's law say?

In its simplest form Hooke's law is a statement about proportion. Double the stretch, double the force. HyperPhysics puts it plainly: it takes about twice as much force to stretch a spring twice as far, and that linear dependence is Hooke's law.

F = k x          force you must apply to hold the spring at displacement x
F_s = −k x       force the spring exerts on whatever holds it
U = ½ k x²       elastic potential energy stored at displacement x

Here x is the displacement from the spring's relaxed length, measured in metres, and k is the spring constant (also called the force constant or stiffness) in newtons per metre.

What does the minus sign in F = −kx mean?

The minus sign is about direction, not about the size of the force. OpenStax University Physics writes the spring force as F = −kΔx, where Δx is the displacement from the unstretched (equilibrium) position. Pull the end of a spring to the right (positive x) and the spring pulls back to the left. Push it to the left (negative x) and it pushes back to the right. The force always opposes the displacement, which is why it is called a restoring force.

That sign is what makes oscillation possible. A force that always points back toward the middle, and grows the further you go, accelerates a mass back toward equilibrium, carries it through by inertia, and then slows it on the other side. Replace the minus with a plus and you get a force that pushes things further away the further they go, which is an instability, not a spring.

Two cautions are worth keeping. OpenStax notes that the unstretched position is the equilibrium position only if no other forces act; hang a mass on a vertical spring and the equilibrium moves down to where the spring force balances gravity. And F = kx and F = −kx describe the two forces of a Newton's third law pair, the force you exert on the spring and the force it exerts on you. Mixing them up is the most common sign error in spring problems.

Why does almost everything obey Hooke's law for small movements?

OpenStax makes an observation that explains why Hooke's law turns up far beyond springs: forces between molecules, or in any system undergoing small displacements from a stable equilibrium, behave approximately like a spring force. The reason is mathematical. Near the bottom of any smooth energy valley, the curve looks like a parabola, U ≈ ½kx², and the force that comes from a parabolic energy is linear in x. That is why the same law describes a coil spring, a steel rod, a guitar string, a bridge deck under a light truck and the bonds in a crystal, as long as the movement stays small.

When did Robert Hooke publish his law?

Hooke published his law twice: once in code and once in plain words.

At the end of A Description of Helioscopes, and Some Other Instruments, printed in London in 1676, Hooke added a list of inventions he intended to publish. Several were given only as anagrams, strings of letters in alphabetical order that recorded a claim without revealing it. One of them encoded his theory of springs.

Two years later, in Lectures de Potentia Restitutiva, or of Spring, Explaining the Power of Springing Bodies (1678), Hooke solved it. In the Internet Archive's scan of the 1678 book he writes that "about two years since" he printed the theory as an anagram at the end of his book on helioscopes, and that it reads "Ut tensio sic vis; That is, The Power of any Spring is in the same proportion with the Tension thereof". He then spells out the proportion the way a modern textbook would: if one power stretches or bends it one space, two will bend it two, and three will bend it three.

Rearranged alphabetically, the letters of "ut tensio sic vis" run c, e, i, i, i, n, o, s, s, s, t, t, u, v, and printers of the period often set v as u, which is why the anagram is usually quoted as ceiiinosssttuu. The OCR of both scans is too damaged to quote the printed line letter for letter, so treat that string as a reconstruction and the 1678 sentence as the authoritative statement.

Three details from Hooke's own pages are worth knowing:

  1. He described the spring scale. In the 1678 lecture Hooke says that from this rule it will be easy to make a "Philosophical Scale" to examine the weight of any body without putting in weights, and that this was the instrument hidden under a second anagram in the helioscopes book, which he resolves as "ut pondus sic tensio" (as the weight, so the extension). Every spring balance and luggage scale is a descendant of that idea, and it is the subject of the first worked example below.
  2. It grew from clockmaking. In the 1676 book Hooke says he lectured on applying springs to the balance of a watch "in the year 1664" in his Cutlerian Lectures at Gresham College, with many members of the Royal Society present. The law of springs and the balance spring watch grew up together.

How do stress, strain and Young's modulus generalise Hooke's law?

A spring constant belongs to one particular spring. Cut the spring in half and k doubles; make it from thicker wire and k rises again. To talk about the material rather than the object, physics divides out the geometry.

Stress is force per unit area, σ = F/A, measured in pascals, the SI unit NIST's Special Publication 330 lists for both pressure and stress (1 Pa = 1 N/m²). Engineers usually quote megapascals (MPa, which is also N/mm²) or gigapascals (GPa).

Strain is the fractional change in length, ε = ΔL/L₀. It is dimensionless: a strain of 0.001 means the part is 0.1 percent longer.

Young's modulus is the ratio of tensile stress to tensile strain in the linear range:

σ = E ε
E = (F / A) / (ΔL / L₀) = F L₀ / (A ΔL)
ΔL = F L₀ / (A E)

OpenStax states the general relation as stress = (elastic modulus) × strain and notes two consequences. Because strain has no units, the modulus has the same unit as stress. And a large modulus means a small strain for a given stress: OpenStax's example is that the same stress stretches a rubber band far more than a steel band of the same size, because rubber's modulus is about two orders of magnitude smaller.

Rearranging the last line gives the bridge back to springs:

F = (E A / L₀) ΔL      so a uniform rod acts as a spring with k = E A / L₀

That is the whole of Hooke's law in one line, with k unpacked into a material property (E) and two geometric ones (A and L₀). A longer rod is softer, a thicker rod is stiffer, and a stiffer material is stiffer. It is the reason a 12 metre steel tie rod and a 3 millimetre guitar string can be analysed with the same equation.

What are the proportional limit, the elastic limit and the yield point?

Hooke's law is a statement about the start of a material's stress strain curve, not the whole curve. OpenStax describes the typical curve for a ductile metal in three regions, and the vocabulary matters because data sheets and standards use it.

TermWhat it meansWhat happens if you unload
Proportional (linearity) limitThe largest stress for which stress stays proportional to strain. Hooke's law holds up to here.Returns to original length
Elastic limitThe largest stress the material can take and still return to its original shape. Between the proportional and elastic limits the curve is nonlinear but still elastic.Returns to original length
Yield point or yield strengthWhere noticeable plastic flow begins in metals. Because the exact elastic limit is hard to pin down, standards define a practical yield strength by test procedure.Permanent set remains
Ultimate (tensile) strengthThe highest engineering stress on the curve. OpenStax calls the stress at fracture the breaking or ultimate stress.Fracture follows
Fracture pointThe specimen breaks; the diagram ends.Two pieces

OpenStax adds an important caveat: the linear, elastic and plastic limits "denote a range of values rather than one sharp point". ASTM E8/E8M, the tension test for metallic materials, lists its outputs as yield strength, yield point elongation, tensile strength, elongation and reduction of area, measured at a room temperature it defines as 10 °C to 38 °C unless specified otherwise.

For design, the number that matters is usually the yield strength, because a beam or bolt that has yielded has a permanent set. HyperPhysics gives a representative structural steel (ASTM A36) a Young's modulus of 200 GPa, a yield strength of 250 MPa and an ultimate strength of 400 MPa. Divide yield strength by modulus and you get the largest strain for which Hooke's law applies to that steel: 250 MPa ÷ 200 GPa = 0.00125, or 0.125 percent. A steel bar obeys Hooke's law only until it is about one eighth of one percent longer. Everything in this post that uses σ = Eε for steel stays below that line, and the worked examples check it.

Young's modulus for common materials

The table below collects Young's modulus values from three textbook sources. They are rounded, approximate, room temperature values for teaching; for design, use the specific grade's data or test it.

MaterialYoung's modulus E (GPa)Source
Steel200 (OpenStax UP), 210 (OpenStax CP)OpenStax University Physics Table 12.1; OpenStax College Physics Table 5.3
Structural steel, ASTM A36200HyperPhysics, after Halliday, Resnick and Walker
Iron210 (OpenStax UP); cast iron 100 (OpenStax CP)OpenStax tables
Copper110OpenStax University Physics Table 12.1
Brass90OpenStax tables
Aluminium70OpenStax tables; HyperPhysics
Glass60 (crown glass, UP), 70 (CP), 65 (HyperPhysics)OpenStax tables; HyperPhysics
Marble60OpenStax tables
Granite45OpenStax tables
Concrete20 (OpenStax), 30 for high strength concrete (HyperPhysics)OpenStax tables; HyperPhysics
Lead16OpenStax tables
Bone, tension16OpenStax tables
Bone, compression9OpenStax tables; HyperPhysics
Hardwood15OpenStax tables
Douglas fir13HyperPhysics
Polystyrene3OpenStax College Physics Table 5.3; HyperPhysics
Tendon1OpenStax College Physics Table 5.3

Metals cluster between about 16 GPa (lead) and 210 GPa (steel and iron), while polymers and biological tissue sit one to two orders of magnitude lower. The sources disagree in the second significant figure for steel and glass, a reminder that "steel" covers many alloys and that published moduli are approximate. One warning: the University Physics Volume 1 table, as rendered on the OpenStax site when we fetched it, places polystyrene, silk and spider thread on a × 10¹⁰ Pa scale, which would make polystyrene ten times stiffer than College Physics and HyperPhysics report. We used the 3 GPa figure the two sources agree on.

Shear modulus, bulk modulus and Poisson's ratio

Stretching is only one way to deform something. OpenStax names three elastic moduli, one for each kind of stress, and each is a version of Hooke's law.

DeformationStressStrainModulusHooke's law form
Tension or compression along one axisσ = F⊥/AΔL/L₀Young's modulus Eσ = E ε
Shear (layers slide sideways)τ = F∥/AΔx/L₀Shear modulus G (OpenStax uses S)τ = G γ
Uniform squeeze from all sidesΔp (pressure change)−ΔV/V₀Bulk modulus B (often K)Δp = −B ΔV/V₀

Shear modulus

Shear stress acts parallel to a surface, the way you push the top of a book sideways while the bottom stays on the table. OpenStax's example is a tall bookcase that leans slightly when pushed along its top shelf and springs back when released. The shear modulus for steel is 75 GPa in the University Physics table and 80 GPa in the College Physics table. Shear modulus is the property that matters for coil springs: when a helical spring stretches, the wire itself twists, so a coil spring's stiffness depends on G, not E.

The standard result for a close coiled helical spring, which follows from the torsion of the wire, is:

k = G d⁴ / (8 D³ n)
d = wire diameter, D = mean coil diameter, n = number of active coils

Note the fourth power on the wire diameter: a 10 percent thicker wire makes the spring about 46 percent stiffer. The worked suspension example below uses this formula.

Bulk modulus

Bulk stress is a uniform pressure from all sides. The bulk modulus B is the pressure change divided by the fractional volume change, and its reciprocal is the compressibility. HyperPhysics uses it to make a point about water: at the bottom of the Pacific, about 4,000 m down, the pressure is about 4 × 10⁷ N/m² and water's volume shrinks by only about 1.8 percent, while steel under the same pressure would shrink about 0.025 percent. OpenStax College Physics gets a similar 2.3 percent for seawater at 5 km using B = 2.2 GPa. Liquids have bulk moduli but no Young's or shear modulus, which is why the material tables leave those columns blank for water and mercury.

Poisson's ratio

When you stretch a rod it also gets thinner. Poisson's ratio ν is the ratio of that sideways contraction strain to the lengthwise extension strain, taken as a positive number:

ν = − ε_lateral / ε_axial

For most metals ν is roughly 0.3. For an isotropic material only two of E, G, B and ν are independent, linked by E = 2G(1 + ν) and E = 3B(1 − 2ν). Plug in the OpenStax University Physics values for steel (E = 200 GPa, G = 75 GPa) and you get ν ≈ 0.33; the College Physics values (E = 210 GPa, G = 80 GPa) give ν ≈ 0.31. The bulk modulus columns give a lower answer still, which tells you these teaching tables were compiled from different sources and should not be mixed in one design calculation. ASTM E132 is the standard method for measuring Poisson's ratio from a tension test at room temperature, and its scope limits it to rectangular specimens and to stresses at which creep is negligible.

How are elastic moduli measured?

Moduli are measured, not derived. OpenStax says so directly: the stress strain relation is an observed relation, measured in the laboratory under various conditions such as temperature, and collected in reference tables. The common route is a tension test: grip a carefully machined specimen, pull it in a testing machine, record force from a load cell and extension from an extensometer clipped to a marked gauge length, and plot stress against strain.

Four ASTM standards cover the pieces most often asked about. Their scopes, as ASTM states them on its own pages:

StandardWhat it measures (per its scope)Key limits in the scope
ASTM E8/E8M-24, tension testing of metallic materialsYield strength, yield point elongation, tensile strength, elongation and reduction of areaMetallic materials at room temperature (10 °C to 38 °C unless specified); round specimen gauge length 4D for E8 and 5D for E8M
ASTM E111-17, Young's modulus, tangent modulus and chord modulusYoung's modulus, tangent modulus and chord modulus of structural materialsOnly where creep is negligible and behaviour is elastic; initial tangent and secant modulus are outside its scope
ASTM E132-17, Poisson's ratio at room temperaturePoisson's ratio from tension tests of structural materialsRectangular section specimens; creep negligible
ASTM E139, creep, creep rupture and stress rupture testsDeformation as a function of time under constant tensile force at constant temperature, and time to fractureMetallic materials; includes requirements for test equipment

Notice that E111 defines three moduli. Young's modulus is the slope of the straight part of the curve; tangent and chord modulus are slopes at a point or between two points, used when the curve is not straight, which is to say when Hooke's law does not quite hold. E111 even leaves the initial tangent modulus out of scope because the origin of the curve is hard to establish experimentally.

How do springs combine in series and in parallel?

Two springs can share a load side by side (parallel) or one after the other (series). The rules follow from two facts: springs in parallel have the same stretch, and springs in series carry the same force.

Parallel. Both springs stretch by the same x, so the total force is k₁x + k₂x and the effective stiffness is the sum:

k_parallel = k₁ + k₂ + k₃ + ...

Series. Both springs carry the same force F, so their stretches F/k₁ and F/k₂ add:

1 / k_series = 1/k₁ + 1/k₂ + 1/k₃ + ...
k_series = k₁ k₂ / (k₁ + k₂)      for two springs
ArrangementWhat is sharedEffective stiffnessTwo springs, 300 N/m and 600 N/mCircuit analogy
ParallelSame stretchSum of stiffnesses900 N/mLike resistors in series (resistances add)
SeriesSame forceReciprocals add200 N/mLike resistors in parallel
One spring cut in halfEach half carries the full force over half the lengthEach half is 2kA 400 N/m spring gives two 800 N/m halvesHalving a resistor's length halves R

If you know your circuits, the pattern is the mirror image: stiffness behaves like electrical conductance, not resistance. The cut spring row is the series rule run backwards. A spring is a series chain of its own coils, so half as many coils carry the same force with half the stretch.

Real structures are full of these combinations: a car's four corners act in parallel, while a tyre and a suspension spring act in series, so the softer of the two dominates.

How much energy does a spring store?

The force grows linearly from zero to kx as you stretch the spring, so the work you do is the area of a triangle: half the base times the height, ½ × x × kx. OpenStax derives the same result by integrating the spring force and then defines the elastic potential energy as U(x) = ½kx², choosing the zero at the unstretched length.

U = ½ k x²

Two consequences matter in practice. Energy grows with the square of displacement, so stretching a spring twice as far stores four times the energy. And for a fixed force F, the stored energy is U = F²/(2k), so a softer spring stores more energy at the same load. That is why shock absorbing parts are soft, and why a stiff steel rod stores very little energy even when it carries a large force.

For a uniform rod the energy per unit volume is ½σε = σ²/(2E). For the A36 steel in the HyperPhysics table at its 250 MPa yield strength that is about 156 kJ/m³, roughly 20 J per kilogram: steel is strong but, because it barely stretches, a poor energy store.

How does Hooke's law give simple harmonic motion?

Put a mass on a spring, pull it aside and let go. Newton's second law says ma = −kx, so the acceleration is always proportional to displacement and directed back toward equilibrium. That is the definition of simple harmonic motion, and OpenStax gives its solution as x(t) = A cos(ωt + φ) with

ω = √(k / m)
T = 2π √(m / k)
f = 1 / T = (1 / 2π) √(k / m)

OpenStax draws the key lesson from the period formula: it depends only on the mass and the force constant, not the amplitude. The greater the mass, the longer the period; the stiffer the spring, the shorter the period. A gently plucked guitar string and a hard plucked one sound the same note for exactly this reason.

The energy bookkeeping is a clean check. OpenStax's energy section shows that at the turning points, x = ±A, all the energy sits in the spring as ½kA² and the mass is momentarily still; at x = 0 the spring is relaxed and all the energy is kinetic, ½mv²_max. With no friction, ½kA² = ½mv²_max, which gives v_max = Aω.

For a vertical spring, gravity simply moves the equilibrium point down by mg/k and leaves the period unchanged. OpenStax notes that when a spring hangs vertically with a block attached, the block still oscillates in SHM; the net effect of gravity is to shift the equilibrium position. This gives a neat shortcut for anything sitting on springs, such as a car: if the static sag under its own weight is δ = mg/k, then k/m = g/δ and the natural frequency is f = (1/2π)√(g/δ). You can estimate how fast a car body bounces just by measuring how far it settles on its springs.

A quick numerical case: a 0.50 kg mass on a 200 N/m spring, pulled 3.0 cm from equilibrium and released.

ω = √(k/m) = √(200/0.50) = 20 rad/s
T = 2π / ω = 0.314 s,   f = 3.18 Hz
v_max = A ω = 0.030 × 20 = 0.60 m/s
E = ½ k A² = ½ × 200 × 0.030² = 0.090 J   (check: ½ m v_max² = ½ × 0.50 × 0.60² = 0.090 J)

Double the amplitude to 6 cm and the period stays 0.314 s while the energy quadruples to 0.36 J. OpenStax's own Example 15.2, a 2.00 kg block on a 32.00 N/m spring, gives a period of 1.57 s, which matches 2π√(2/32) = 1.571 s.

Worked example 1: a spring luggage scale

Hooke's own "Philosophical Scale" is the simplest application: hang a weight, read the stretch.

Setup (illustrative). A hanging luggage scale stretches 4.0 cm when a 10 kg calibration mass hangs from it. Use standard gravity, g = 9.80665 m/s², which NIST's CODATA table lists as exact.

Step 1: find the spring constant. The spring holds the mass still, so the spring force balances the weight: kx = mg.

k = m g / x = (10 kg × 9.80665 m/s²) / 0.040 m = 2,452 N/m

Step 2: weigh a suitcase. A suitcase stretches the spring 9.2 cm. Then

F = k x = 2,452 N/m × 0.092 m = 225.6 N
m = F / g = 225.6 / 9.80665 = 23.0 kg

Because the scale is linear, the dial can have evenly spaced markings. That is the practical gift of Hooke's law: a scale calibrated at one point (and zero) is calibrated everywhere in its range.

Step 3: energy stored. U = ½kx² = ½ × 2,452 × 0.092² = 10.4 J. That is about the energy needed to lift the 23 kg suitcase 4.6 cm, and it is why a heavily loaded spring scale snaps back hard if the hook slips.

What the scale actually measures. A spring scale measures force, not mass, and converts to kilograms using whatever value of g was assumed at calibration. Where local gravity differs from that value, a spring scale reads slightly differently, while a balance that compares the load against reference masses does not.

Worked example 2: a car suspension spring under load

Setup (illustrative). One corner of a car carries 350 kg of sprung mass (the body and everything on it, not the wheel). Its coil spring has a rate of 30 N/mm, which is 30,000 N/m. For simplicity, assume the spring acts directly over the wheel; we deal with the lever ratio afterwards.

Step 1: static sag. At rest the spring carries the corner's weight:

F = m g = 350 × 9.80665 = 3,432 N
x = F / k = 3,432 / 30,000 = 0.1144 m ≈ 114 mm

Step 2: natural frequency. Treat the corner as a mass on a spring:

f = (1 / 2π) √(k / m) = (1 / 2π) √(30,000 / 350) = 1.47 Hz

Check it with the sag shortcut: f = (1/2π)√(g/δ) = (1/2π)√(9.80665/0.1144) = 1.47 Hz. The two agree, as they must, because both come from the same Hooke's law balance.

Step 3: add a passenger. An 80 kg passenger sitting over that corner adds 785 N, compressing the spring a further 26.2 mm. The natural frequency drops to (1/2π)√(30,000/430) = 1.33 Hz. A loaded car rides lower and bounces more slowly.

Step 4: where the stiffness comes from. Using the coil spring formula with steel's shear modulus G = 80 GPa (OpenStax College Physics), a spring wound from 12 mm wire with a 100 mm mean coil diameter and 7 active coils has

k = G d⁴ / (8 D³ n) = 80×10⁹ × (0.012)⁴ / (8 × 0.100³ × 7) = 29,600 N/m ≈ 29.6 N/mm

which is close to the 30 N/mm assumed above. The fourth power on d is why spring makers change wire diameter in small steps.

Step 5: the lever ratio. In many suspensions the spring sits partway along a control arm, not over the wheel. If the spring moves a fraction r of the wheel's travel (r is often called the motion ratio), then the spring force at the wheel is r times smaller and the spring moves r times less, so the stiffness felt at the wheel is k × r². With r = 0.8, a 30 N/mm spring acts like 19.2 N/mm at the wheel. This follows from Hooke's law plus the lever rule, and it is why spring rates alone do not tell you how a car rides.

Worked example 3: a steel tie rod under tension

Setup (illustrative geometry, sourced material values). A 12 m long, 20 mm diameter structural steel tie rod carries a tension of 40 kN. Use E = 200 GPa and a yield strength of 250 MPa for A36 steel from HyperPhysics.

Step 1: area and stress.

A = π d² / 4 = π × 0.020² / 4 = 3.142×10⁻⁴ m²
σ = F / A = 40,000 / 3.142×10⁻⁴ = 127.3 MPa

Step 2: is Hooke's law valid? 127.3 MPa is about half of the 250 MPa yield strength, so the rod is well inside the elastic range. The ratio, 250 ÷ 127.3 = 1.96, is the margin against yield before any design code factors.

Step 3: strain and elongation.

ε = σ / E = 127.3×10⁶ / 200×10⁹ = 6.37×10⁻⁴
ΔL = ε L = 6.37×10⁻⁴ × 12 m = 7.6 mm

Step 4: the rod as a spring. k = EA/L = 200×10⁹ × 3.142×10⁻⁴ / 12 = 5.24×10⁶ N/m, or 5.24 kN/mm. Divide 40 kN by that and you get the same 7.6 mm. A 12 m steel rod is about 175 times stiffer than the car spring in example 2.

Compare with the textbook. OpenStax's Example 12.8 runs the same calculation for a 2.0 m steel rod with a 0.30 cm² cross section holding a 550 kg platform. The stress is about 1.8 × 10⁸ Pa (180 MPa), and the rod stretches about 1.8 mm. Note that 180 MPa is closer to the yield strength of mild steel than our tie rod, so in practice that support would be made from a stronger grade or a thicker bar.

A word on cables. A wire rope is not a solid rod. Its strands are twisted, so under load they straighten and pack together, and the rope stretches more than a solid bar of the same metal area would. For cables, use the manufacturer's stated effective modulus or measured elongation, not 200 GPa.

Worked example 4: how far does a steel beam sag?

Beams are where Hooke's law meets the building. When a beam bends, its top fibres shorten and its bottom fibres lengthen, each obeying σ = Eε, and summing those fibres over the cross section gives the beam's bending stiffness EI, where I is the second moment of area of the section (a geometric property measured in m⁴ that grows rapidly with depth). MIT's Mechanics and Materials I course (2.001) builds this up over its lectures on pure bending, the moment curvature relationship and beam deflection.

The results for two classic cases of a simply supported beam of span L are:

Point load P at midspan:        δ_max = P L³ / (48 E I)
Uniform load w (N/m) along it:   δ_max = 5 w L⁴ / (384 E I)

Setup (illustrative). A 6.0 m simply supported steel floor beam with I = 8.0 × 10⁻⁵ m⁴ (8,000 cm⁴, typical of a medium rolled I section) and E = 200 GPa.

Case A: a 50 kN point load at midspan.

δ = 50,000 × 6.0³ / (48 × 200×10⁹ × 8.0×10⁻⁵) = 0.0141 m = 14.1 mm

That is span ÷ 427. The beam acts as a spring with k = 48EI/L³ = 3.56 × 10⁶ N/m at midspan.

Case B: a uniform 10 kN/m along the whole span (60 kN total).

δ = 5 × 10,000 × 6.0⁴ / (384 × 200×10⁹ × 8.0×10⁻⁵) = 0.0105 m = 10.5 mm

Spreading the load out reduces the sag even though the total load is higher.

Why the cube matters. Sag grows with the cube of span for a point load and the fourth power for a uniform load: double the span to 12 m and Case B's sag becomes 16 times larger, 169 mm. That is why long spans need deeper sections, since I for a rectangle grows with the cube of its depth.

What Hooke's law does not tell you here. The formulas assume the steel stays linear, the beam does not buckle sideways, the supports do not move and the deflections are small. Checking those is what structural design codes and qualified engineers do. Treat this example as physics, not as a design.

Where does Hooke's law fail?

Hooke's law is an approximation that is excellent for small strains in many solids and poor or useless outside them. Knowing where it breaks is as useful as knowing the formula.

Plastic deformation

Above the elastic limit, metals deform permanently. OpenStax's stress strain diagram shows that if you unload from a point beyond the elastic limit, the material relaxes along a new line and keeps a permanent strain where that line meets the axis. Bend a paper clip past its elastic limit and it stays bent. For the A36 steel above, that begins at about 0.125 percent strain. A part designed to work elastically must keep its peak stress below yield with a margin.

Nonlinear elastic materials, including tendons and rubber

Some materials return to their original shape but never follow a straight line. OpenStax College Physics shows a human tendon's stress strain curve: it stretches easily at first, in what it calls the toe region, as fibres align, then stiffens sharply. OpenStax University Physics notes that rubber-like materials become harder to stretch as strain increases until they fracture. For these materials, k is not a constant. Engineers use a tangent modulus (the slope at the working point) or a full nonlinear model.

Hysteresis

Load a rubber band and unload it, and the unloading curve sits below the loading curve. The area between them is energy turned into heat in each cycle. That loss is what makes rubber useful as a vibration damper and why a bouncing rubber ball does not return to its drop height. Hooke's law has no term for it: an ideal Hookean spring returns every joule. HyperPhysics makes the contrast with metal: piano wire is harder to stretch than a rubber band but more elastic, because it returns to its original length more precisely, and a real piano string can be struck hundreds of times without going noticeably out of tune.

Creep and stress relaxation

Under a constant load held for a long time, some materials keep stretching. That is creep, and ASTM E139 exists to measure it: deformation as a function of time under constant tensile force at constant temperature, plus time to rupture. Creep is significant for polymers, wood and concrete at room temperature and for metals at high temperature, such as turbine blades and boiler tubes. ASTM E111 and E132 both restrict themselves to conditions where creep is negligible compared to the immediate elastic strain, which is a polite admission that time dependent behaviour is outside Hooke's law.

Temperature

Moduli change with temperature, generally falling as a material heats up, and the temperature itself produces strain through thermal expansion. MIT's 2.001 course gives stress strain temperature relationships their own lecture for this reason. In a fully restrained steel member, even a modest temperature rise produces a stress that you then feed into σ = Eε, and a published modulus taken at room temperature is not the right number for a part that runs hot. ASTM E8 even defines room temperature (10 °C to 38 °C) so that test results are comparable.

Anisotropic materials

Wood, fibre composites and rolled metals have different stiffnesses in different directions. A single E describes them only along one axis. HyperPhysics lists Douglas fir at 13 GPa, which is a value along the grain; across the grain it is far lower.

Where does software apply Hooke's law?

Much of modern engineering is Hooke's law solved by a computer at a scale no hand calculation could manage.

Finite element analysis

Finite element analysis (FEA) chops a structure into small elements, writes Hooke's law for each one and assembles them into one large matrix equation:

K u = f
K = global stiffness matrix (N/m), assembled from every element's stiffness
u = vector of node displacements
f = vector of applied forces

It is F = kx with k replaced by a matrix that may have millions of rows. Each element's stiffness comes from its material's E and ν (or a full elasticity tensor for anisotropic materials) and its geometry. Open source finite element frameworks publish linear elasticity examples in their documentation; the DOLFINx project's demo gallery, for example, includes linear elasticity solved with algebraic multigrid. The walkthrough below builds the simplest possible version: a bar made of springs.

MEMS accelerometers in phones

A phone's accelerometer is a microscopic mass on microscopic springs etched from silicon. When the phone accelerates, the mass lags behind until the springs push it along, and it settles at the displacement where kx = ma:

x = m a / k = a / ω₀²       where ω₀ = √(k/m) is the sensor's natural frequency

With an illustrative natural frequency of 5 kHz, ω₀ = 2π × 5,000 = 31,416 rad/s, and an acceleration of one standard gravity moves the mass by 9.80665 / 31,416² ≈ 9.9 × 10⁻⁹ m, about 10 nanometres. The sensor's electronics measure that tiny movement, for example as a change in capacitance, and convert it to acceleration. The choice of natural frequency is a trade: a stiffer, higher frequency sensor responds faster but moves less per g, so it needs more sensitive electronics.

The platforms' own docs describe what reaches an app. Android's motion sensor documentation lists TYPE_ACCELEROMETER with readings along x, y and z in m/s², including gravity, and says the accelerometer and gyroscope sensors are always hardware based. Apple's Core Motion documentation describes CMAccelerometerData as a data sample from the device's three accelerometers. A phone lying still on a table therefore reports about 9.8 m/s² on the axis pointing up, which is the spring holding the proof mass against gravity.

Walkthrough: reproduce every number in Python

You can check every result in this post with a short script. Treat scientific scripts like any other software: pin the environment so the same script gives the same answer next year on another machine.

Step 1: create a clean, pinned environment

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install numpy scipy
python -m pip freeze > requirements.txt

On the next machine, install exactly those versions:

python -m pip install -r requirements.txt

SciPy's constants module includes standard gravity as scipy.constants.g, and its documentation says the module also carries the 2022 CODATA recommended values.

Step 2: write the calculations

Save this as hooke.py:

from math import pi, sqrt
from scipy.constants import g   # standard gravity, 9.80665 m/s^2

# Example 1: luggage scale
k_scale = 10 * g / 0.040
F = k_scale * 0.092
print(f"Ex1 k={k_scale:,.0f} N/m  F={F:.1f} N  m={F/g:.1f} kg  U={0.5*k_scale*0.092**2:.1f} J")

# Example 2: car corner
m, k = 350.0, 30_000.0
sag = m * g / k
f_n = sqrt(k / m) / (2 * pi)
print(f"Ex2 sag={sag*1000:.1f} mm  f={f_n:.2f} Hz  f(sag)={sqrt(g/sag)/(2*pi):.2f} Hz")
print(f"Ex2 +80 kg: extra={80*g/k*1000:.1f} mm  f={sqrt(k/430)/(2*pi):.2f} Hz")
G, d, D, n = 80e9, 0.012, 0.100, 7
print(f"Ex2 coil k={G*d**4/(8*D**3*n):,.0f} N/m  wheel rate r=0.8: {k*0.8**2/1000:.1f} N/mm")

# Example 3: steel tie rod
E, fy = 200e9, 250e6
L, dia, P = 12.0, 0.020, 40e3
A = pi * dia**2 / 4
s = P / A
eps = s / E
print(f"Ex3 A={A:.4e} m2  stress={s/1e6:.1f} MPa  margin={fy/s:.2f}")
print(f"Ex3 strain={eps:.3e}  dL={eps*L*1000:.2f} mm  k={E*A/L:.3e} N/m")

# Example 4: steel beam
I, Lb = 8.0e-5, 6.0
print(f"Ex4 point: {50e3*Lb**3/(48*E*I)*1000:.1f} mm  k={48*E*I/Lb**3:.3e} N/m")
print(f"Ex4 uniform: {5*10e3*Lb**4/(384*E*I)*1000:.1f} mm  at 12 m: {5*10e3*12**4/(384*E*I)*1000:.0f} mm")

# Simple harmonic motion example
m5, k5, A5 = 0.50, 200.0, 0.030
w = sqrt(k5 / m5)
print(f"Ex5 T={2*pi/w:.3f} s  f={w/(2*pi):.2f} Hz  vmax={A5*w:.2f} m/s  E={0.5*k5*A5**2:.3f} J")

# Energy density of A36 at yield, and MEMS proof mass
u = fy**2 / (2 * E)
print(f"Energy density at yield={u/1e3:.0f} kJ/m3  ={u/7860:.1f} J/kg")
w0 = 2 * pi * 5000
print(f"MEMS 1 g displacement={g/w0**2*1e9:.1f} nm")

Step 3: run it and compare

python hooke.py

Expected output:

Ex1 k=2,452 N/m  F=225.6 N  m=23.0 kg  U=10.4 J
Ex2 sag=114.4 mm  f=1.47 Hz  f(sag)=1.47 Hz
Ex2 +80 kg: extra=26.2 mm  f=1.33 Hz
Ex2 coil k=29,623 N/m  wheel rate r=0.8: 19.2 N/mm
Ex3 A=3.1416e-04 m2  stress=127.3 MPa  margin=1.96
Ex3 strain=6.366e-04  dL=7.64 mm  k=5.236e+06 N/m
Ex4 point: 14.1 mm  k=3.556e+06 N/m
Ex4 uniform: 10.5 mm  at 12 m: 169 mm
Ex5 T=0.314 s  f=3.18 Hz  vmax=0.60 m/s  E=0.090 J
Energy density at yield=156 kJ/m3  =19.9 J/kg
MEMS 1 g displacement=9.9 nm

Step 4: measure a real spring constant

Hang known masses from a spring, measure the stretch with a ruler and fit a straight line. The slope is k, and the quality of the fit tells you whether Hooke's law holds over the range you tested.

import numpy as np
from scipy.constants import g

mass_kg = np.array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5])
stretch_m = np.array([0.000, 0.0098, 0.0197, 0.0293, 0.0392, 0.0491])  # your readings

force_N = mass_kg * g
k, offset = np.polyfit(stretch_m, force_N, 1)
residuals = force_N - (k * stretch_m + offset)
print(f"k = {k:.1f} N/m, offset = {offset:.3f} N, max residual = {abs(residuals).max():.3f} N")

If the residuals grow at the heavy end, you have passed the proportional limit or the spring's coils have started to touch. Fit only the straight part, the same judgement ASTM E111 formalises when it separates Young's modulus from tangent and chord modulus.

Step 5: a one dimensional finite element model

This builds the global stiffness matrix for a bar split into equal elements, each a spring with k = EA/Lₑ, fixes one end and pulls the other. It reproduces the 7.64 mm from example 3, and it is the same assembly loop, scaled down, that full FEA programs run.

import numpy as np
from math import pi

E, L, dia, P, n_el = 200e9, 12.0, 0.020, 40e3, 6
A = pi * dia**2 / 4
ke = E * A / (L / n_el)
K = np.zeros((n_el + 1, n_el + 1))
for e in range(n_el):
    K[e:e+2, e:e+2] += ke * np.array([[1, -1], [-1, 1]])
f = np.zeros(n_el + 1); f[-1] = P
u = np.zeros(n_el + 1)
u[1:] = np.linalg.solve(K[1:, 1:], f[1:])   # node 0 is fixed
print(f"tip displacement = {u[-1]*1000:.2f} mm")

The element loop is Hooke's law; the matrix is the series rule written for many springs at once.

Step 6: keep the script's dependencies healthy

A calculation script is software with a dependency tree. If it lives in a repository next to a monitoring service or a test rig's data pipeline, scan it like the rest of your code. With the Safeguard CLI installed, this scans the project directory, including requirements.txt, and writes JSON results under ./output:

safeguard scan --dir .

Common mistakes

  • Mixing up F = kx and F = −kx. One is the force on the spring, the other the force from it. Pick one convention per problem and draw the force arrows before you write numbers.
  • Measuring x from the wrong place. x is the displacement from the relaxed length (or from the equilibrium position, if you have absorbed gravity into the new equilibrium). Measuring from the floor or the top of the stand gives nonsense.
  • Using Hooke's law past the proportional limit. Check the stress against the yield strength before trusting σ = Eε. For structural steel the linear range ends near 0.125 percent strain.
  • Adding series springs like parallel ones. Parallel stiffnesses add; series compliances add. Two equal springs in series give half the stiffness, not double.
  • Mixing units. GPa, MPa and N/mm² appear in the same data sheets. 1 MPa = 1 N/mm² = 10⁶ Pa, and 200 GPa = 200,000 MPa. A factor of 1,000 slips in easily.
  • Assuming amplitude changes the period. For an ideal spring it does not. If your measured period changes with amplitude, the spring is nonlinear or something is rubbing.
  • Copying moduli across tables. Different textbooks round differently, and the University Physics table on the OpenStax site shows at least one value on the wrong power of ten. Use one consistent source per calculation, and test data for design.
  • Ignoring time and temperature. Plastics, wood and concrete creep under sustained load, and hot metals soften. A room temperature, short term modulus is not the right input for a long term or high temperature part.

FAQ

What is Hooke's law in simple terms?

Hooke's law says that how far something stretches or compresses is proportional to the force on it, as long as the stretch is small. Double the force and you double the stretch. For a spring it is written F = kx, where k is the spring's stiffness in newtons per metre.

What is the formula for Hooke's law?

The force formula is F = −kx for the restoring force a spring exerts, or F = kx for the force you apply. For materials it becomes σ = Eε, stress equals Young's modulus times strain. The energy stored is U = ½kx².

Why is there a negative sign in Hooke's law?

The negative sign shows that the spring's force points opposite to its displacement. Stretch it and it pulls back; compress it and it pushes out. It is a direction, not a smaller force. That restoring direction is what makes springs oscillate.

What is the difference between Hooke's law and Young's modulus?

Hooke's law is the general rule that deformation is proportional to load. Young's modulus is the constant of proportionality for a material in tension or compression, E = stress ÷ strain. A spring constant describes one object; Young's modulus describes the material it is made of. For a rod, k = EA/L.

What is the spring constant k and what are its units?

k is the force needed per unit of stretch, measured in newtons per metre (N/m), or N/mm in engineering data. A higher k means a stiffer spring. You can measure it by hanging known masses and dividing the weight by the stretch.

When does Hooke's law not apply?

It stops applying past the proportional limit, where stress is no longer proportional to strain, and fails completely past the elastic limit, where the material is permanently deformed. It is also a poor model for rubber and tendons (nonlinear, with hysteresis), for materials that creep under sustained load, and for large deflections.

How do you calculate springs in series and parallel?

In parallel, add the stiffnesses: k = k₁ + k₂. In series, add the reciprocals: 1/k = 1/k₁ + 1/k₂. A 300 N/m and a 600 N/m spring give 900 N/m in parallel and 200 N/m in series.

What is the Young's modulus of steel?

About 200 to 210 GPa. OpenStax University Physics and HyperPhysics give 200 GPa (HyperPhysics for ASTM A36 structural steel); OpenStax College Physics gives 210 GPa. Aluminium is about 70 GPa, roughly a third of steel.

The software that runs the machines: an honest bridge

Hooke's law is physics, and Safeguard does not do physics. Its models are single purpose security models for software; they do not calculate stresses, design springs or beams, analyse structures or inspect hardware, and nothing in this post was computed by them. The connection is narrower and real. Finite element packages, load cell firmware, sensor drivers, structural monitoring dashboards and calculation scripts like the one in the walkthrough are software, and much of that code is built from open source dependencies. Where Safeguard helps is there: scanning those repositories, container images and SBOM files for known vulnerable open source components, showing which projects carry a given version and, when a fixed version exists, opening an upgrade pull request for review.

Calculation scripts, finite element tools, load cell firmware and structural monitoring services all pull open source dependencies every time they are rebuilt, and sensor stacks in phones and test rigs ship open source components of their own. The physics is not a software problem, so the fit here is indirect, but for the code your team builds around these systems the same dependency hygiene applies, whether or not upstream has a fix yet.

Fix it without waiting for upstream

Whatever the vulnerability, most of the risk sits in two gaps. The first is the time between a fix being published and that fix actually running in your production builds. The second, and worse, is the time before any fix exists at all, while a maintainer works out a patch and a release schedule. Waiting through both gaps is a habit, not a requirement. Safeguard gives teams three ways to close them.

1. Autonomous remediation: pull requests, not tickets

When a fixed version exists, Safeguard's Griffin models open a tested, policy gated pull request that moves the affected dependency to the safe version. You can run it on one repository or in bulk across every project that carries the vulnerable version. Remediation covers eight categories, including dependencies, licenses, security posture and findings. Reachability analysis ranks the vulnerable code paths your application actually calls first, so the first pull requests you merge are the ones that matter most. Autonomous remediation ships switched off, with every category set to Manual, so your team decides how much runs on its own and what still needs a human approval.

2. Gold Open Source: the safe version in seconds, free

gold.safeguard.sh is free and needs no login. Search any CVE or package to see affected and fixed versions, CVSS, EPSS, CISA KEV status and a recommended safe version, or use the "Am I affected?" checker. The same data is available through a free read API, README status badges and RSS threat feeds. The safeguard-sh/gold-scan-action GitHub Action can fail a build on a known exploited vulnerability, on any known vulnerability, or never, so a version you have just removed cannot quietly come back in next week's merge.

3. Gold Registry: start from components that are already fixed

registry.safeguard.sh provides hardened, drop in replacements for upstream packages and container images. Every Gold artifact is held continuously to zero exploitable critical or high CVEs, zero malware and a completed license check, with SLSA L3 or higher provenance, a Sigstore signature and a public evidence page you can hand to an auditor. An artifact loses its Gold badge if it regresses. Teams can point their own package directory at the registry so hardened equivalents resolve without changing how developers install anything.

When upstream has no fix yet, or will not ship one, Safeguard first works to get the fix accepted upstream. If the issue is severe or upstream will not move, Safeguard builds a fork, fixes the vulnerability there and publishes a hardened Gold build, so you are not stuck on a maintainer's release schedule. You can also request a hardened, compatibility tested build of a specific package. This fork and patch flow is in early access today, so ask which packages it covers before you plan around it.

Your situationWhat to use
A fixed version existsAutonomous remediation opens the upgrade pull request; Gold Open Source confirms the safe version
You need to know today whether you are affectedGold Open Source lookup and "Am I affected?" checker, free and without login
You want vulnerable versions to stop shippingThe Gold scan GitHub Action in CI, plus Safeguard policies and gates
Upstream has no fix yet, or will not ship oneA custom Gold request; fork and patch (early access)
You want to start clean on new projectsPull hardened components and images from Gold Registry

One honest limit: when the vulnerable code lives in a vendor appliance, a hosted service or an operating system runtime you do not build yourself, the fix still has to come from that vendor or distribution. The steps above apply to the open source dependencies and container images you build and ship, which is where most teams carry the largest and least tracked share of their exposure.

See how Safeguard would help

None of these demos involve stress or spring calculations; they show the software side described in the bridge above.

The first demo is a real Safeguard CLI session: it installs the CLI, opens the interactive terminal and asks it to fix a lodash CVE in a repository. It reads the finding and advisory, asks before each command, edits package.json to lodash 4.17.21, runs npm install and npm test with approval, prints a summary and pushes nothing. The same flow applies to a structural monitoring dashboard or a test rig web app your team maintains: scan the repository, then let the assistant propose the dependency upgrade under your approval.

Click through it at your own pace, or open it full screen.

The second demo sets up the Safeguard runner on your own machine, approves it with its device code and then scans from the terminal. That suits engineering teams who keep calculation scripts, sensor integration code or lab tooling on their own hardware and want the scan to run where the code lives.

Click through it at your own pace, or open it full screen.

The third demo connects Claude to the Safeguard MCP server with OAuth and lets you choose which tools Claude can use. For an engineer who already works with Claude while writing a data pipeline for strain gauges or accelerometers, it brings dependency findings into the same conversation, limited to the tools you allow.

Click through it at your own pace, or open it full screen.

To try it on your own repositories, download Safeguard and follow the CLI documentation.

Quick check

A 500 N/m spring and a 500 N/m spring are joined end to end. What is the combined spring constant?

They are in series, so 1/k = 1/500 + 1/500 = 2/500, giving k = 250 N/m. Two equal springs in series are half as stiff as one.

A 3.0 m aluminium rod (E = 70 GPa) with a 2.0 cm² cross section carries 14 kN of tension. How much does it stretch?

Stress is 14,000 ÷ 2.0×10⁻⁴ = 70 MPa. Strain is 70×10⁶ ÷ 70×10⁹ = 0.001. The rod stretches 0.001 × 3.0 m = 3.0 mm.

Sources

Last reviewed: 24 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.