Transformers work only with AC (alternating current) and not with DC (direct current) because of how they operate:
How Transformers Work
A transformer uses electromagnetic induction.
An AC current in the primary coil creates a changing magnetic field.
This changing magnetic field induces a voltage in the secondary coil.
Why DC Doesn't Work:
DC is constant (it doesn't change direction or magnitude).
A constant magnetic field from DC doesn't induce a changing magnetic field.
Without a changing field, no voltage is induced in the secondary coil.
So, no energy transfer happens.
What Happens if You Use DC:
If you apply pure DC to a transformer:
It will only induce a voltage for a brief moment (when switching it on or off).
Then, nothing happens.
Worse, the transformer can overheat or burn out because DC causes a constant current, which creates heat in the coil but no useful induction.
So in short:
Transformers need changing magnetic fields → AC provides that → DC doesn't