Answer:
In a horizontal mass spring system, the energy changes between potential energy and kinetic energy. When the spring is at its equilibrium position, the mass has potential energy stored in the spring, and no kinetic energy. As the mass is displaced from its equilibrium position and begins to move, potential energy is converted into kinetic energy. The maximum kinetic energy occurs when the mass is at the maximum displacement.
As the mass moves back towards the equilibrium position, the kinetic energy is converted back into potential energy stored in the spring. The maximum potential energy is reached when the mass reaches the equilibrium position. The energy then changes back to kinetic energy as the mass moves past the equilibrium position again.
If the same mass spring system is vibrating vertically instead of horizontally, gravitational potential energy also comes into play. When the mass is at its highest point, it has maximum gravitational potential energy and minimum kinetic energy. As it falls towards the equilibrium position, the potential energy is converted into kinetic energy. At the equilibrium position, the kinetic energy is maximum and potential energy is minimum. As the mass moves back up towards the maximum point, the kinetic energy is converted back into gravitational potential energy. This process continues as the system oscillates vertically.