Hooke's Law

Hooke's law is 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.

Classroom activity

A ready-to-assign lab using the simulation above. Free to use — nothing to install or sign up for, and no student data leaves the browser.

High school, College10–20 minInteractive simulation

Learning objectives

  • State and apply Hooke’s law.
  • Determine a spring constant from force and extension.
  • Relate stored elastic energy to extension.

Variables to change

  • Applied force
  • Extension
  • Spring constant

Procedure

  1. Apply a known force and record the spring’s extension.
  2. Increase the force in steps and record the extension each time.
  3. Plot or tabulate force versus extension.

Observations

Record force and the resulting extension; look for a proportional relationship.

Questions

  1. State Hooke’s law.
  2. How do you find the spring constant from your data?
  3. What does a larger spring constant mean physically?
  4. Write the elastic potential energy stored in a stretched spring.
  5. What happens if you stretch the spring past its elastic limit?

Explanation

Hooke’s law (F = kx) says spring force is proportional to extension, with k the stiffness read as the slope of force versus extension. Stored elastic energy is ½kx², valid until the spring passes its elastic limit.

Answer key (for instructors)
  • 1. The restoring force is proportional to extension: F = -kx (magnitude F = kx).
  • 2. It is the slope of the force-versus-extension line, k = F/x.
  • 3. A stiffer spring that needs more force for the same extension.
  • 4. E = ½kx².
  • 5. Hooke’s law no longer holds; the spring deforms permanently and the linear relationship breaks down.

Educators: link or embed this simulation freely in your LMS or course guide.

Add This Hooke's Law Simulator to Your Website

Put the Hooke's Law Simulator on your own page — free, no sign-up, no watermark. It runs entirely in your visitors' browsers. Copy the snippet and paste it into your page's HTML.

The credit line under the widget links back to LK Forge — please keep it so others can find it too.