If the applied voltage is constant, capacitors act like insulators and inductors act like conductors; the impedance is then due to resistors alone and is a real number equal to the component's resistance R.
If the applied voltage is changing over time (as in an AC circuit), then the component may affect both the phase and the amplitude of the current, due to inductors and capacitors inside the component. In this case, the impedance is a complex number (this is a mathematically convenient way of describing the amplitude ratio and the phase difference together in a single number). It is composed of the resistance R, the inductive reactance XL and the capacitive reactance XC according to the formula
If the applied voltage is periodically changing with a fixed frequency f, according to a sine curve, it is represented as the real part of a function of the form
If the voltage is not a sine curve of fixed frequency, then one first has to perform Fourier analysis to find the signal components at the various frequencies. Each one is then represented as the real part of a complex function as above and divided by the impedance at the respective frequency. Adding the resulting current components yields a function i(t) whose real part is the current.
The notion of impedance can be useful even when the voltage/current is normally constant (as in many DC circuits), in order to study what happens at the instant when the constant voltage is switched on or off: generally, inductors cause the change in current to be gradual, while capacitors can cause large peaks in current.
If the internal structure of a component is known, its impedance can be computed using the same laws that are used for resistances: the total impedance of subcomponents connected in series is the sum of the subcomponents' impedances; the reciprocal of the total impedance of subcomponents connected in parallel is the sum of the reciprocals of the subcomponents' impedances. These simple rules are the main reason for using the formalism of complex numbers.
Often it is enough to know only the magnitude of the impedance:
When fitting components together to carry electromagnetic signals, it is important to match impedance, which can be achieved with various matching devices. Failing to do so is known as impedance mismatch and results in signal loss.
For example, a conventional radio frequency antenna for carrying broadcast television in North America was standardized to 300 ohms, using balanced, unshielded, flat wiring. However cable television systems introduced the use of 75 ohm unbalanced, shielded, circular wiring, which could not be plugged into most TV sets of the era. To use the newer wiring on an older TV, small devices known as baluns were widely available. Today most TVs simply standardize on 75-ohm feeds instead.