In mechanical systems, resonance is a phenomenon that only occurs when the frequency at which a force is periodically applied is equal or nearly equal to one of the natural frequencies of the system on which it acts. This causes the system to oscillate with larger amplitude than when the force is applied at other frequencies.
Frequencies at which the response amplitude is a relative maximum are also known as resonant frequencies or resonance frequencies of the system. Near resonant frequencies, small periodic forces have the ability to produce large amplitude oscillations, due to the storage of vibrational energy.
In other systems, such as electrical or optical, phenomena occur which are described as resonance but depend on the interaction between different aspects of the system, not on an external driver.
For example, electrical resonance occurs in a circuit with capacitors and inductors because the collapsing magnetic field of the inductor generates an electric current in its windings that charges the capacitor, and then the discharging capacitor provides an electric current that builds the magnetic field in the inductor. Once the circuit is charged, the oscillation is self-sustaining, and there is no external periodic driving action. This is analogous to a mechanical pendulum, where mechanical energy is converted back and forth between kinetic and potential, and both systems are forms of simple harmonic oscillators.
In optical cavities, light confined in the cavity reflects back and forth multiple times. This produces standing waves, and only certain patterns and frequencies of radiation are sustained, due to the effects of interference, while the others are suppressed by destructive interference. Once the light enters the cavity, the oscillation is self-sustaining, and there is no external periodic driving action.
Some behavior is mistaken for resonance but instead is a form of self-oscillation, such as aeroelastic flutter, speed wobble, or Hunting oscillation. In these cases, the external energy source does not oscillate, but the components of the system interact with each other in a periodic fashion.