On the definition of elastic restoring force in a spring How is the elastic restoring force defined exactly for a spring? We know by Hooke's law that
$$F_\text{restoring} = -kx$$
but what does $F_\text{restoring}$ really mean? I thought up till now that it was the force the spring pulled with at both ends if you stretched it by a distance $x$. This definition worked pretty well until I encountered some problems when I was doing problems a little above my usual level. 
I have stripped down the problem I encountered to its core (where I think my confusion arises from):
Consider a spring attached to a wall (massless, ideal) in its relaxed. If we pull it with a force $F$, clearly the spring exerts a pulls with a force $F$. However, initially the spring is unstretched. The definition fails in this case. 
What is the precise definition of a restoring force in a spring in the most general case?
 A: The word 'restoring' is synonymous with 'opposing' in that it matches the applied force, but in the opposite direction. But more so 'restoring' implies that energy is being stored - potential energy - which can subsequently be retrieved. The potential energy is the integral of force over the path of deflection:
$$E_p=(1/2)kx^2$$
The energy imparted by the pulling force is stored in the spring which is able to do work.
In it's relaxed state (position) one can arbitrarily assign 'zero' potential energy by defining 'x' as zero at that position. Any deflection relative to zero stores energy.
Another interpretation is the fact that springs tend to 'restore' position to the relaxed state once the net external forces are removed.
A: One of the most important of all dynamical problems is that of a mass attracted toward a given point by a force proportional to its distance from that point.
Let a spring be in its relaxed state- neither compressed nor extended. One end is fixed & on the other end, a point-like object - a block,say - is attached. If we stretch the spring by pulling the block to the right, a force gets emanated & that force pulls on the block toward the left. Because the spring force acts to restore the relaxed state, it is called restoring force.
Actually, the restoring force exerted on the block at a displacement $x$ from equilibrium may be written $$\mathbf{F(x)} = -(k_1 . x + k_2 . x^2 + k_3 . x^3 + \cdots) $$ where $k_1 , k_2 , k_3$ etc. are a set of constants. But we can always find a range of values of $x$ within which the sum of the terms in $x^2 , x^3$ , etc. , is negligible compared to the term  $- k_1 . x$, unless $k_1$ itself is zero. Thus to a good approximation for many springs, the restoring force is given by $$\vec{\mathbf{F(x)}} \approx - k_1. \vec{x}$$. $k$ is called the spring constant & is a measure of stiffness of the spring.   Now you have to work against it to move the block. In order to spend minimum energy, you ought to work against the  position-varying force & the energy will be stored as potential energy.
A: The restoring force due to a  spring is defined to be the force for a unit displacement.The force acts in a direction that tries to restore the mass back to its equilibrium position. (Note since the spring is mass-less you have to have a mass in place since you don't apply forces on mass-less objects)
