Hooke's Law

The straight line at the heart of every spring — and the doorway to oscillation. Hang a mass and watch the spring stretch by exactly x = mg/k, with the balanced weight and spring-force arrows drawn on it, because the force to stretch a spring is proportional to how far it stretches: F = k·x. Read the extension, force, stored energy ½kx² and period live; the F–x graph shows the line whose slope is k and whose shaded area is that energy. Then hit Release to oscillate to see simple harmonic motion, T = 2π√(m/k), and energy trading between elastic PE and kinetic KE. It all runs on your device.

You are in the Physics lab.

Heavier mass or softer spring → more extension. Hit “Release to oscillate” to watch simple harmonic motion and the PE↔KE energy trade.
Extension x
Force F = mg
Spring constant k
Elastic PE = ½kx²
Period T = 2π√(m/k)
Force and stretch rise together — in a straight line. That proportionality, F = k·x, is Hooke's law, and its constant k is the spring's stiffness in newtons per metre. Hang a weight and the spring settles where the pull equals the weight, at x = mg/k: a stiffer spring (bigger k) stretches less, a softer one more. Plot force against extension and you get a line straight through the origin whose gradient is k — which is exactly how you measure a spring constant in the lab.

Reading the simulation

What the two vectors, the F–x line and the energy meter are telling you.

1

The two balancing arrows

On the mass, the red arrow pointing down is its weight, W = m·g, and the blue arrow pointing up is the spring force, F = k·x. When the mass hangs still they are exactly equal and opposite — that balance is what fixes the extension at x = m·g/k, marked in centimetres on the ruler against the dashed natural length. Make the spring softer or the mass heavier and watch the stretch grow to keep the arrows matched.

2

The F–x line and its shaded area

The lower graph plots force against extension. Hooke's law makes it a straight line through the origin, and its slope is the spring constant k — a stiffer spring gives a steeper line. The green dot is your current operating point, and the shaded blue triangle beneath it is its area, ½·k·x², which is exactly the elastic potential energy stored in the spring. Because it is a triangle, doubling x quadruples the energy.

3

The PE ↔ KE exchange

Press Release to oscillate and the mass bounces in simple harmonic motion about equilibrium with period T = 2π·√(m/k). The two-bar meter on the spring tracks the oscillation energy measured from equilibrium: at the top and bottom of each bounce it is all elastic PE, and as it flies through equilibrium it is all KE — but the two bars always add to the same total. That trade is what turns Hooke's law into a wave.

How It Works

Proportional force, a stiffness constant, stored energy, and the leap to oscillation.

1

F = k·x

Stretch a spring and it pulls back with a force proportional to the extension: F = k·x. Pull twice as far and it resists twice as hard. The constant k — the spring constant — sets how stiff it is, in newtons per metre. Hooke's law holds until the spring is stretched past its elastic limit and stops springing back.

2

Hanging a mass: x = m·g/k

Hang a mass m and the downward weight is m·g. The spring stretches until its pull matches that weight, k·x = m·g, so the extension settles at x = m·g/k. A heavier mass or a softer spring gives more stretch; a stiffer spring gives less. Switching gravity between Earth, Moon and Jupiter changes m·g, so the same spring and mass rest at a different extension on each world.

3

Stored energy: E = ½·k·x²

Doing work to stretch the spring stores elastic potential energy E = ½·k·x² — the triangular area under the F–x line. It is the energy the spring gives back when it snaps home, and the reservoir that powers the bounce. Because of the x² it grows fast: stretch three times as far and you store nine times the energy.

4

From F = k·x to SHM

Release the mass and the unbalanced spring force always points back toward equilibrium in proportion to the displacement — the exact recipe for simple harmonic motion. The mass oscillates with period T = 2π·√(m/k), independent of gravity: heavier is slower, stiffer is faster. Energy sloshes between elastic PE and kinetic KE while their sum stays fixed, which is why a mass on a spring keeps perfect time.

What is Hooke's law?
Hooke's law states that the force needed to stretch or compress a spring is proportional to the extension: F = k·x, where k is the spring constant and x the extension from the natural length. It holds until the elastic limit. Hanging a mass gives a force F = m·g, so the spring settles at x = m·g/k.
What is the spring constant k?
The spring constant k measures stiffness — the force needed per metre of extension, in N/m. A large k is a stiff spring that barely stretches; a small k is a soft spring that stretches a lot for the same force. On a force-versus-extension graph, k is the slope of the line, which is why plotting F against x and measuring the gradient is the standard way to find it.
What is the elastic potential energy stored in a spring?
A stretched spring stores elastic potential energy E = ½·k·x², the shaded triangular area under the force-extension line up to x. Because it depends on x squared, doubling the extension stores four times the energy. Release the mass and this energy trades with kinetic energy — the two-bar meter shows elastic PE and KE swap back and forth but always add to the same total.
What is the period of a mass on a spring?
Let go and the mass oscillates in simple harmonic motion about equilibrium with period T = 2π·√(m/k) — the time for one full bounce. A heavier mass swings slower, a stiffer spring faster. Gravity only sets where equilibrium sits, not the period: Earth, Moon or Jupiter change the extension x = m·g/k but leave T unchanged. This is the bridge from F = k·x to SHM.

Teaching Hooke's law or springs? You can embed this simulator on your own site free — one line of code, no sign-up.