A transformer is a magnetic device (without moving parts) that converts AC voltage and current, maintaining the product VI. Transformers will not work with DC ... that is why the mains are AC.
Next