between subsystems and stored in various ways within the system, the total energy of a system changes only by the amount of energy transferred into and out of the system.
At the macroscopic scale, energy manifests itself in multiple phenomena, such as motion, light, sound, electrical and magnetic fields, and thermal energy. Historically, different units were introduced for the energy present in these different phenomena, and it took some time before the relationships among them were recognized. Energy is best understood at the microscopic scale, at which it can be modeled as either motions of particles or as stored in force fields (electric, magnetic, gravitational) that mediate interactions between particles. This last concept includes electromagnetic radiation, a phenomenon in which energy stored in fields moves across space (light, radio waves) with no supporting matter medium.
Motion energy is also called kinetic energy; defined in a given reference frame, it is proportional to the mass of the moving object and grows with the square of its speed. Matter at any temperature above absolute zero contains thermal energy. Thermal energy is the random motion of particles (whether vibrations in solid matter or molecules or free motion in a gas), this energy is distributed among all the particles in a system through collisions and interactions at a distance. In contrast, a sound wave is a moving pattern of particle vibrations that transmits energy through a medium.
Electric and magnetic fields also contain energy; any change in the relative positions of charged objects (or in the positions or orientations of magnets) changes the fields between them and thus the amount of energy stored in those fields. When a particle in a molecule of solid matter vibrates, energy is continually being transformed back and forth between the energy of motion and the energy stored in the electric and magnetic fields within the matter. Matter in a stable form minimizes the stored energy in the electric and magnetic fields within it; this defines the equilibrium positions and spacing of the atomic nuclei in a molecule or an extended solid and the form of their combined electron charge distributions (e.g., chemical bonds, metals).
Energy stored in fields within a system can also be described as potential energy. For any system where the stored energy depends only on the spatial configuration of the system and not on its history, potential energy is a useful concept (e.g., a massive object above Earth’s surface, a compressed or stretched spring). It is defined as a difference in energy compared to some arbitrary reference configuration of a system. For example, lifting an object increases the stored energy in the gravitational field between that object and Earth (gravitational potential energy)