Let the mass be m. Let the natural length of the spring be L. The defining equation of simple harmonic motion (SHM) is that the acceleration is proportional to, and acts in the opposite direction to, the displacement. To show that this example obeys SHM, we need to derive an equation of motion that is in this form. First we let the mass and spring hang in equilibrium (see diagram). In equilibrium, the mass is not moving, so the vertical forces must balance out. The only forces acting on the mass are its weight, downwards, and the tension in the spring, upwards, which is given by Hooke's Law: F=-kl where l is the distance from the equilibrium position. Therefore the weight and the tension must be equal. Now we displace the mass slightly downwards, by a distance x (see diagram). As the extension of the spring has changed, the tension must also have changed, but the weight of the mass is the same. The new tension is T=-k(l+x). We use the equation F=ma where F is the resultant force acting on the mass, and solve this by subbing in the weight found earlier to get a=-kx/m. We see that the acceleration is proportional to the displacement, and acts in the opposite direction, as given by the minus, so obeys SMH.