LC circuits are made up of an inductor and a capacitor, and energy is exchanged between the electric and magnetic fields. The behavior of an LC circuit can be compared to a mass oscillating on a spring, and resonance occurs when the frequency of the current matches the natural frequency of the circuit. The energy stored in the magnetic field of an inductor is given by E=0.5LI^2, and LC circuits are used in many applications.