In short

A force is conservative if the work it does on an object depends only on the starting and ending positions, not on the path taken between them. Equivalently, the work done around any closed loop is zero. Gravity and the spring force are conservative; friction is not. For every conservative force you can define a potential energy function U such that F = -\dfrac{dU}{dx} — the force points in the direction of decreasing potential energy.

You live at the bottom of a hill. Your school sits at the top. There are two routes: a short, steep staircase straight up the slope, and a long, winding road that loops around the hill. Every morning you pick one — and here is the surprising thing. If you calculate the work done by gravity on you as you climb, the answer is the same for both routes. The steep path and the gentle path, despite being completely different journeys, produce exactly the same gravitational work. The only thing that matters is how high you climbed — not how you got there.

Friction does not behave this way. The longer road means more rubbing between your shoes and the ground, more energy lost to heat. The work done by friction does depend on the path. Take a longer path, and friction steals more energy.

This difference — path-independent versus path-dependent — is one of the deepest divides in all of mechanics. Forces that don't care about the path are called conservative. Forces that do care are called non-conservative. And the conservative forces are the ones for which you can define something called potential energy.

What makes a force conservative

There are two equivalent ways to state the defining property. Both say the same thing in different mathematical clothing.

Test 1: Path independence

Conservative force — path independence

A force \vec{F} is conservative if the work done by \vec{F} on an object moving from point A to point B is the same for every path connecting A and B.

W_{A \to B} = \int_A^B \vec{F} \cdot d\vec{s} \quad \text{depends only on A and B, not on the path}

Think about what this means. You pick any two points in space. You can connect them with a straight line, a spiral, a zigzag, a loop — any continuous path at all. If the work done by the force is always the same number regardless of which path you chose, the force is conservative.

Gravity passes this test. Whether you lift a 2 kg book straight up by 1.5 m or carry it up a winding staircase that covers the same vertical height, gravity does -mgh = -2 \times 9.8 \times 1.5 = -29.4 J of work on the book. The horizontal detours contribute zero gravitational work because gravity is vertical and the horizontal displacement is perpendicular to it — \vec{F} \cdot d\vec{s} = 0 for horizontal segments.

Test 2: The closed-loop test

Conservative force — closed loop

A force \vec{F} is conservative if the work done by \vec{F} around every closed path is zero.

\oint \vec{F} \cdot d\vec{s} = 0 \quad \text{for every closed loop}

A closed path starts and ends at the same point. You go from A to B along one route, then return from B to A along a different route. If the force is conservative, the work on the outbound trip exactly cancels the work on the return trip — the total is zero.

Here is why the two tests are equivalent. Suppose the force is path-independent (Test 1). Take a closed loop: go from A to B along path 1, then from B back to A along path 2. The work along path 1 (A→B) is some value W. The work along path 2 (B→A) is the negative of the work from A→B along path 2 — but by path independence, that is also W. So the return trip does -W. Total: W + (-W) = 0.

Closed-loop work test for a conservative force Two paths connecting point A (bottom-left) to point B (top-right). Path 1 curves upward, Path 2 curves downward. Together they form a closed loop. For a conservative force, the net work around the loop is zero. A B Path 1 Path 2 W₁ = W₂ so loop work = W₁ − W₂ = 0
Two paths from A to B. For a conservative force, the work along Path 1 equals the work along Path 2. Going around the closed loop (Path 1 forward, Path 2 backward) gives zero net work.

The converse works too: if the loop work is always zero, then any two paths from A to B must give the same work (otherwise you could construct a loop with nonzero work by going forward along one and back along the other). So the two tests are logically identical.

Which forces are conservative, and which are not

Gravity — conservative

The gravitational force near Earth's surface is \vec{F}_g = -mg\,\hat{j} (pointing downward). For any displacement d\vec{s} = dx\,\hat{i} + dy\,\hat{j}:

\vec{F}_g \cdot d\vec{s} = (-mg)(dy) = -mg\,dy

The work depends only on the change in y — the vertical displacement. Horizontal motion contributes nothing. So for any path from height y_1 to height y_2:

W_{\text{gravity}} = \int_{y_1}^{y_2} (-mg)\,dy = -mg(y_2 - y_1) = -mg\Delta h

Why: the dot product \vec{F}_g \cdot d\vec{s} kills the dx component because gravity has no horizontal part. Only vertical changes matter. This is precisely why gravity is path-independent — any path with the same start and end heights gives the same work.

Whether you throw a cricket ball straight up to a height of 20 m or loft it in a parabolic arc that peaks at 20 m, gravity does the same work: -mg \times 20 J on the way up.

The spring force — conservative

A spring exerts a force F = -kx along its axis, where x is the displacement from the natural length. The work done by the spring when the extension changes from x_1 to x_2:

W_{\text{spring}} = \int_{x_1}^{x_2} (-kx)\,dx = -\frac{1}{2}k x_2^2 + \frac{1}{2}k x_1^2 = \frac{1}{2}k x_1^2 - \frac{1}{2}k x_2^2

Why: the integral of -kx with respect to x is -\frac{1}{2}kx^2. The result depends only on the initial and final extensions x_1 and x_2 — not on how the spring was stretched or compressed along the way.

Stretch a spring to 10 cm, let it relax to 5 cm, then stretch it back to 10 cm — the net work by the spring over that round trip is zero. That is the closed-loop test passing.

Friction — NOT conservative

Kinetic friction always opposes the direction of motion: \vec{f}_k = -\mu_k N\,\hat{v}, where \hat{v} is the unit vector along the velocity. This means:

\vec{f}_k \cdot d\vec{s} = -\mu_k N\,|d\vec{s}|

The friction force always does negative work — it always removes energy from the object. The total work done by friction over a path of length L is:

W_{\text{friction}} = -\mu_k N \cdot L

The work depends on L — the total distance travelled along the path, not just the displacement between endpoints.

Push a heavy almirah (cupboard) from one corner of a room to the opposite corner. If you push it along the diagonal (shortest path), friction does less negative work. If you push it along two walls (L-shaped path, longer distance), friction does more negative work. Same endpoints, different work. Friction fails the path-independence test.

Friction is path-dependent: two paths, different work A room shown from above. An almirah moves from corner A to corner B. The diagonal path is shorter (less friction work). The L-shaped path along two walls is longer (more friction work). Room (top view) A B diagonal: 5 m 4 m 3 m L-path: 7 m
Push an almirah from A to B. The diagonal path (5 m) means less friction work. The L-shaped path along two walls (4 + 3 = 7 m) means more friction work. Same start and end — different work. Friction is non-conservative.

Worse still, if you push the almirah from A to B and back to A (a closed loop), the friction work is not zero — it is -\mu_k N \times 2L, always negative. Energy is lost to heat on every leg of the trip. Friction fails the closed-loop test too.

Potential energy — the bookkeeping gift of conservative forces

Here is the key insight: because the work done by a conservative force depends only on the starting and ending positions, you can define a function of position that keeps track of the work the force is ready to do. That function is called potential energy.

Defining potential energy

Pick a reference point x_0 where you declare the potential energy to be zero. For any other position x, define:

U(x) = -\int_{x_0}^{x} F(x')\,dx'

Why the negative sign: the work done by the conservative force in moving from x_0 to x is W = \int_{x_0}^{x} F\,dx'. If the force does positive work (it helps the motion), the object gains kinetic energy and loses potential energy. The negative sign ensures U decreases when F does positive work, and increases when F does negative work. Potential energy is stored work — energy held in reserve.

This definition only makes sense for conservative forces. If the force were path-dependent (like friction), the integral would give a different answer depending on which path you took from x_0 to x, and U(x) would not be a well-defined function of position. Conservative forces — and only conservative forces — have potential energy functions.

The master relation: F = -dU/dx

The definition above says U(x) = -\int_{x_0}^{x} F\,dx'. By the fundamental theorem of calculus, taking the derivative of both sides with respect to x:

\frac{dU}{dx} = -F(x)

Rearranging:

\boxed{F = -\frac{dU}{dx}}

Why this is profound: the force is the negative slope of the potential energy function. Where U slopes steeply downward, the force is large and positive (pushing you in the +x direction). Where U is flat, the force is zero. Where U slopes upward, the force pushes you back. The entire force field is encoded in one scalar function.

This is an enormous simplification. Instead of tracking a vector force at every point in space, you track a single number — the potential energy — and recover the force by differentiation. One function replaces an entire force field.

Deriving gravitational potential energy

Apply U(x) = -\int_{x_0}^{x} F\,dx' to gravity near Earth's surface, with upward as the positive y-direction. The gravitational force is F_y = -mg (downward). Choose the ground as the reference: U(0) = 0.

U(h) = -\int_0^h (-mg)\,dy = mg\int_0^h dy = mgh
\boxed{U_{\text{gravity}} = mgh}

Why: the gravitational force is constant at -mg, so the integral is straightforward. The result says: the higher you go, the more gravitational potential energy you store. Climb 10 m, and gravity is holding mg \times 10 joules of energy in reserve, ready to turn back into kinetic energy if you fall.

Verify: F = -dU/dh = -d(mgh)/dh = -mg. That is indeed the gravitational force (downward), confirming the consistency.

A cricket ball of mass 0.16 kg at the top of a 20 m tall sight screen has gravitational PE of 0.16 \times 9.8 \times 20 = 31.4 J relative to the ground. That 31.4 J is real — it will convert entirely to kinetic energy if the ball falls.

Deriving spring potential energy

The spring force is F = -kx, where x is the extension from the natural length. Choose the natural length as the reference: U(0) = 0.

U(x) = -\int_0^x (-kx')\,dx' = k\int_0^x x'\,dx' = k \cdot \frac{x^2}{2}
\boxed{U_{\text{spring}} = \frac{1}{2}kx^2}

Why: the spring force is linear in x, so the integral gives a quadratic function. The potential energy is a parabola — symmetric about x = 0, minimum at the natural length. Stretching or compressing the spring both store energy.

Verify: F = -dU/dx = -d(\frac{1}{2}kx^2)/dx = -kx. That is Hooke's law, confirming the derivation.

The potential energy curve and force

The relationship F = -dU/dx means you can read the force directly from a graph of U vs x. The force at any point is the negative of the slope of the PE curve at that point. Steep downhill slope means a large force pushing you forward. Flat region means no force. Uphill slope means a force pushing you backward.

Interactive: reading force from the potential energy curve A parabolic potential energy curve U = ½kx² with k = 2 N/m, centered at x = 5. A draggable point moves along the x-axis, and a readout shows the force F = −dU/dx at that point. The tangent line at the point shows the slope visually. displacement x (m) potential energy U (J) 0 16 32 48 1 3 5 7 9 U(x) = 2(x−5)² drag the red point along the x-axis
Drag the red point to explore how force relates to the PE curve. The tangent line (red) shows the slope of $U$ at your chosen position. The force $F = -dU/dx$ is the negative of that slope — when the curve slopes downward to the right, the force points right (positive). At the bottom of the well ($x = 5$), the slope is zero and the force vanishes.

Notice the pattern: the force always pushes you toward the bottom of the potential energy well. If you are to the left of the minimum, dU/dx < 0, so F > 0 — the force pushes you to the right, toward the minimum. If you are to the right, dU/dx > 0, so F < 0 — the force pushes you to the left, again toward the minimum. A conservative force always drives you toward lower potential energy.

Worked examples

Example 1: Two paths up a hill — same gravitational work

A porter at a hill station carries a 25 kg load from the base of a hill (elevation 0) to a temple at the top (elevation 80 m). Route 1 is a direct staircase. Route 2 is a winding road, 3 km long, that spirals around the hill. Show that gravity does the same work on both routes.

Two routes up a hill: staircase and winding road A hill with a temple at the top (80 m). Route 1 is a steep staircase going straight up. Route 2 is a winding road that spirals around the hill. Both start at the base and end at the temple. Base (0 m) Temple (80 m) Route 1: stairs Route 2: road 80 m
Two routes from base to temple. The staircase (solid red) is steep and direct. The winding road (dashed) is 3 km long. Gravity does the same work on both.

Step 1. Write the expression for gravitational work.

W_{\text{gravity}} = -mg\Delta h = -mg(h_f - h_i)

Why: gravity near Earth's surface is \vec{F} = -mg\,\hat{j}. Only the vertical component of displacement contributes to the dot product. So the work depends only on the change in height \Delta h, regardless of any horizontal motion.

Step 2. Compute the work for Route 1 (staircase).

W_1 = -mg(80 - 0) = -25 \times 9.8 \times 80 = -19{,}600 \text{ J}

Why: the porter climbs 80 m vertically. Gravity acts downward while the porter moves upward, so gravity does negative work — it opposes the motion.

Step 3. Compute the work for Route 2 (winding road, 3 km).

W_2 = -mg(80 - 0) = -25 \times 9.8 \times 80 = -19{,}600 \text{ J}

Why: the road is 3 km long, but the net vertical gain is still 80 m. Every horizontal segment contributes zero gravitational work. The extra 2.9 km of winding adds no gravitational work — only the 80 m of vertical climb matters.

Step 4. Compare.

W_1 = W_2 = -19{,}600 \text{ J} = -19.6 \text{ kJ}

Result: Both routes give exactly the same gravitational work: -19.6 kJ. The path does not matter — only the height difference does.

What this shows: Gravity is conservative. You can carry a load up a mountain by any route you like, and gravity's contribution to the energy budget depends only on how high you climb. The winding road is gentler (less force needed at each instant) but longer — the trade-off is in the effort you exert against gravity, not in the work gravity does.

Example 2: Potential energy of a stretched spring

A spring with spring constant k = 400 N/m is attached to a wall. You stretch it from its natural length by 0.15 m. Find the potential energy stored, then verify that differentiating U(x) gives back Hooke's law.

Spring stretched from natural length A spring attached to a wall on the left. The natural length position is marked at the centre. The spring is shown stretched 0.15 m to the right, with a block at the end. m x = 0 x = 0.15 m extension
A spring (natural length at $x = 0$) is stretched by 0.15 m. The block at the end stores elastic potential energy.

Step 1. Write the spring PE formula.

U = \frac{1}{2}kx^2

Why: this was derived earlier from U(x) = -\int_0^x (-kx')\,dx'. The potential energy is quadratic in the displacement — stretching or compressing by the same amount stores the same energy.

Step 2. Substitute the values.

U = \frac{1}{2} \times 400 \times (0.15)^2 = 200 \times 0.0225 = 4.5 \text{ J}

Why: a displacement of 0.15 m with a stiff spring (k = 400 N/m) stores 4.5 J. That is enough energy to lift a 46 g ball (about the mass of a golf ball) to a height of 10 m — all from a 15 cm stretch.

Step 3. Verify by differentiating.

F = -\frac{dU}{dx} = -\frac{d}{dx}\left(\frac{1}{2} \times 400 \times x^2\right) = -400x

At x = 0.15 m: F = -400 \times 0.15 = -60 N.

Why: the negative sign means the spring force pulls the block back toward x = 0. At an extension of 15 cm, the restoring force is 60 N — directed inward, opposing the stretch. This is exactly Hooke's law: F = -kx.

Step 4. Interpret the energy.

The 4.5 J is stored in the spring as elastic potential energy. If you release the block, this energy converts to kinetic energy. On a frictionless surface, the block would reach maximum speed at x = 0 (the natural length) where all 4.5 J has become \frac{1}{2}mv^2.

Result: The spring stores U = 4.5 J of elastic potential energy. Differentiating U gives F = -400x — Hooke's law — confirming the force-potential relationship.

What this shows: The potential energy function encodes the force. You can go from U to F by differentiation, and from F to U by integration. They are two descriptions of the same physics.

Common confusions

If you came here to understand what conservative forces are, how to test for them, and how F = -dU/dx works, you have everything you need. What follows is for readers preparing for JEE Advanced who want the three-dimensional generalisation and the curl test.

The three-dimensional case: \vec{F} = -\nabla U

In one dimension, F = -dU/dx. In three dimensions, the force has three components and the potential energy is a function of three coordinates: U(x, y, z). The relation generalises to:

\vec{F} = -\nabla U = -\left(\frac{\partial U}{\partial x}\,\hat{i} + \frac{\partial U}{\partial y}\,\hat{j} + \frac{\partial U}{\partial z}\,\hat{k}\right)

Why: in each direction, the component of the force is the negative rate of change of U in that direction. The symbol \nabla U (read "gradient of U") is the vector whose components are the partial derivatives. The force points in the direction of steepest descent of U — like water flowing downhill on a landscape where U is the elevation.

For gravitational PE U = mgy:

F_x = -\frac{\partial(mgy)}{\partial x} = 0, \quad F_y = -\frac{\partial(mgy)}{\partial y} = -mg, \quad F_z = -\frac{\partial(mgy)}{\partial z} = 0

So \vec{F} = -mg\,\hat{j} — gravity points downward, as expected.

The curl test: is a given force conservative?

In one dimension, every force F(x) that depends only on position (not on velocity or time) is conservative — you can always integrate it to get U(x). The interesting question arises in two or three dimensions: given a force \vec{F}(x, y, z), how do you test whether it is conservative?

The test is: a force is conservative if and only if its curl is zero.

\nabla \times \vec{F} = \vec{0}

For a two-dimensional force \vec{F} = F_x(x,y)\,\hat{i} + F_y(x,y)\,\hat{j}, this reduces to:

\frac{\partial F_y}{\partial x} = \frac{\partial F_x}{\partial y}

Why: if \vec{F} = -\nabla U, then F_x = -\partial U/\partial x and F_y = -\partial U/\partial y. Taking the cross-partial derivatives: \partial F_y/\partial x = -\partial^2 U/\partial x \partial y and \partial F_x/\partial y = -\partial^2 U/\partial y \partial x. If U has continuous second partial derivatives (which physical potential energy functions always do), these mixed partials are equal. So the condition \partial F_y/\partial x = \partial F_x/\partial y is automatically satisfied. Conversely, if this condition holds, a potential energy function exists.

Quick example. Is the force \vec{F} = (2xy + 3)\,\hat{i} + (x^2 - 4y)\,\hat{j} conservative?

Check: F_x = 2xy + 3, F_y = x^2 - 4y.

\frac{\partial F_y}{\partial x} = 2x, \qquad \frac{\partial F_x}{\partial y} = 2x

They are equal, so \nabla \times \vec{F} = 0 and the force is conservative. You can find U by integrating:

U = -\int F_x\,dx = -\int (2xy + 3)\,dx = -(x^2 y + 3x) + g(y)

Differentiate with respect to y: -\partial U/\partial y = x^2 - g'(y). This must equal F_y = x^2 - 4y, so g'(y) = 4y, giving g(y) = 2y^2. Therefore:

U(x,y) = -x^2 y - 3x + 2y^2 + C

where C is an arbitrary constant (the reference point choice).

Why friction fails the curl test

Kinetic friction has the form \vec{f}_k = -\mu_k N\,\hat{v}, where \hat{v} is the unit vector along the velocity. This force depends on the direction of motion, not just on position. It does not even qualify as a function of (x, y, z) alone — it depends on which way you are moving. The curl test applies to forces that are functions of position only, and friction is not such a force. This is the deep mathematical reason friction cannot have a potential energy function.

Connection to conservation of mechanical energy

If all forces acting on a system are conservative, then total mechanical energy is conserved:

K + U = \text{constant}

This follows directly from the work-energy theorem. The net work equals the change in kinetic energy: W_{\text{net}} = \Delta K. But for conservative forces, W = -\Delta U. So:

-\Delta U = \Delta K \implies \Delta K + \Delta U = 0 \implies K + U = \text{constant}

This is the bridge from conservative forces to the conservation of mechanical energy — the subject of the previous article. The entire framework of energy conservation in mechanics rests on forces being conservative.

Where this leads next