what is the relationship between displacement and the spring constant k
In contrast to the ball, moving a spring a distance, x (measured from its unstretched position) requires a non-constant force: the more you stretch/compress a spring, the more force it requires. For elastic springs, the relationship between the applied force and the distance the spring moves is called Hooke's Law. F = -kx (1). The negative sign is used because F is the restoring force of the spring, which is in the opposite direction from the applied force of the hanging mass. The restoring force is therefore in the opposite direction from the displacement of the spring. This relationship between restoring force and displacement depends on the physical properties of the spring. The more stiff a spring is, the more difficult it is to stretch or compress it.