Springs are a special instance of a device that can store elastic potential energy due to either compression or stretching. A force is required to compress a spring; the more compression there is, the more force that is required to compress it further. For certain springs, the amount of force is directly proportional to the amount of stretch or compression (x); the constant of proportionality is known as the spring constant (k).
springs are said to follow Hooke's Law
There is a special equation for springs that relates the amount of elastic potential energy to the amount of stretch (or compression) and the spring constant. The equation is
potential energy is the energy that is stored in an object due to its position relative to some equilibrium position. hence potential energy increases with compression.