If we were to compare the numbers, the efficiency factor of a typical linear regulator would be 25-50 percent whereas that of a typical switch-mode regulator may exceed 90 percent.
Besides, if we put the switch of a switch-mode voltage regulator before the step-down transformer (as you understand, it doesn’t really matter if we control the input or the output voltage of the transformer, since they are both closely interrelated), we will get an opportunity to set up the frequency of the transformer irrespective of the frequency of electric current in the power grid. What for? The dimensions of a power transformer are inversely proportional to its operational frequency, and thus switch-mode regulators can use step-down transformers of just tiny dimensions (if we compare them to their linear analogs). Here are some numbers for you: the ratio of the PSU’s output power to its volume is about 4-5 watts per sq. inch with switch-mode power supplies working at 50kHz and only 0.3-1 watts per sq. inch with linear regulators. Moreover, the power density of a switch-mode power supply can be up to 75 watts per sq. inch which linear power sources cannot achieve even with water-based cooling (the numbers quoted are taken from the book by Irving M. Gottlieb titled “Power Supplies, Switching Regulators, Inverters and Converters”).
Besides that, this realization of a switching regulator is less dependent on the value and frequency of the input voltage – the step-down transformer is more sensitive to these factors, but we can control the voltage and the frequency in any way we like by attaching a switch in line before the transformer. That’s why switch-mode regulators are absolutely indifferent to how many hertz you have in your wall power outlet (50 or 60 in various countries) and can usually tolerate a deviation of 20 percent from the standard voltage in the power grid. And that’s also why switch-mode power supplies suppress noise from the power grid well enough, while linear supplies can let some noise seep through into the load.
Besides the transformer, the use of high frequencies enables a considerable (tenfold) reduction of the capacitance and, accordingly, of the dimensions of the smoothing capacitors (C1 and C2 in the schematic above). This reduction is, however, accompanied with two problems: not all electrolytic capacitors are capable of working normally at such a frequency, and, whatever you do, it is technically hard to get a pulsation swing of less than 20 millivolts on the output of a switch-mode PSU. With linear power supplies, the level of pulsation on the output can be reduced to 5 millivolts and lower.
Evidently, a transformer working at a frequency of several kilohertz is a source of noise not only in its own load, but also in the power grid and in the radio-frequency range. That’s why the PSU should be well screened (a steel case is necessary for high-watt units) and the output filter should be paid much attention to (against the common opinion, this filter not so much protects the PSU from external noise as protects other devices from the noise generated by the PSU itself). Linear power supplies, as I mentioned above, are more sensitive to external interference, but don’t generate any noise themselves, so they don’t call for any special measures to protect the neighboring devices.
Talking about the pros and cons of the two types of power supplies, I should acknowledge that the switching variety needs much more complex (and more expensive!) electronics than the linear type. Switch-mode power supplies only have a price advantage when they are high-powered, so that the price is mostly determined by the cost of the power transformer and the necessary heatsinks. In this case linear power supplies with their large dimensions and low efficiency are at a disadvantage. Well, the components becoming cheaper, switch-mode power supplies are intruding on the domain of low-powered linear power supplies. For example, 10-15W switch-mode power supplies are no rarity today, but a few years ago the advantages of linear power sources were conspicuous at such small wattages.
In applications that demand small dimensions, however, switching power sources are beyond competition. It is simply impossible to get the same power density from a linear power source as from a switching one.