# Why is the restoring force directly proportional to extension?

When deforming any spring the deforming force is always greater than the restoring force until equilibrium is reached. So, if a constant deforming force caused an extension in any spring the restoring force will increase until it becomes equal to the restoring force and equilibrium is reached. However, I do not understand how the restoring force even increases with extension. I imagine it is related to the fact that the more we deform a spring the more potential energy it has, but I do not know how exactly this affects the restoring force. An explanation which includes the behaviour of the bonds and molecules in any spring during the deformation is appreciated.

You can think of two atoms in a solid joined together via a bond.

The graph of potential (pe) energy against separation of the atoms is shown below as is a graph of the force between atoms and their separation.

The equilibrium separation $r_o$ is when the potential energy is a minimum and the force between the atoms is zero. In reality since quantum harmonic oscillators have non-zero amplitude even in ground state due to a finite zero point energy the equilibrium is a bit beyond $r_0$ due to the asymmetry of the potential, but we can ignore that effect here.

Now it so happens that for a lot of bonds the graph of force against separation is a straight line about the equilibrium position as shown in mauve in the lower graph. This is equivalent to saying that a parabola fits quite well to the shape of the upper plot near equilibrium.

So in this region you can think of the atoms being connected by springs which obey Hooke's law with the spring unextended when the separation of the atoms is $r_o$.
Trying to increase the separation (stretching the solid) stretches the bond and results in an attractive force between the atoms which is proportional to the increase in the separation from their equilibrium position.
This attractive force summed over all the bonds will then become equal and opposite to the external force which caused the bonds to stretch.

A similar thing happens when the solid is compressed but now there is a force of repulsion which might be thought of as the negative electron shells between adjacent atoms repelling one another.

In terms of energy the external force stretching a solid does work extending the bond and that energy is stored as potential energy within the bond.
When the external force is removed the atoms move towards the minimum of potential energy, their equilibrium separation.

I will give you a more mathematical answer here. You can obtain Hooke's law for linear springs from the potential energy of a spring. The change in potential energy of the spring is; $$\Delta V=V_f-V_i$$ Therefore; $$dV=\frac12k(x+dx)^2-\frac12kx^2=kxdx+\frac12 kdx^2$$ where $x$ is the initial position of the end of the spring. Since differential value of $x$ is infinitesimal; $$dV=kxdx$$ Due to conservation of mechanical energy; $$dE=dKE+dV=0$$ Therefore; $$dKE=-kxdx=\vec Fd\vec x$$ This leaves out; $$F=-kx$$ Thus, the restoring force is directly proportional to the displacement of the spring since its potential energy does indeed increase.