*Note: Assuming, by the term “Transformer” the OP meant “A power transformer” that is used by distribution companies. The answer is different for Low power high-frequency transformers used in SMPS. See another note at the end of this answer for more on that.
I believe you wish to do the following experiment.
Go ahead and do it! Nothing will happen! (Just don’t get closer to the power terminals for your own safety, and also do not damage any part of the transformer).
Now, here’s the WHY part: Your magnet will get stuck to either the radiator fins or the tank of the transformer. Its magnetic flux linkage will complete its path from the iron surface in immediate contact. However, this flux linkage will not have any effect on the functionality of the transformer as-
- The “core” of the transformer is nowhere near-by these tank walls or radiator fins. The working flux of the transformer is intended to be linked with the core and very little part of it (called leakage flux) flows around – which in my view never reaches the tank walls given the low permeability of oil/air by which the core is usually surrounded.
- Even if the magnet has higher pull, the flux linkage to the core is negligible & transient. (On a side note, Transformers operate on “rate of change of flux” and not the constant flux from permanent magnets).
Now, the exception part: Transformers used in SMPS (Say, your mobile charger).
These transformers are for low power transfer and are designed to have smaller volumes with not much surrounding cooling arrangements.
Hence, the core is exposed due to “Compactness” of the design.
Here, if you try playing around with a rare-earth magnet, there is a teeny-tiny** possibility that the core might get saturated and the transformer may lose its functionality.
Why the possibility is “teeny-tiny”? :
Well, it depends on what company adapter you’re using. Good engineering designs, like the above one from Apple, are tested for “Electro-Magnetic Influence” & are designed to have “Electro-Magnetic Compatibility” for external magnetic fields. (See those certification marks above “CE”, “UL”, etc? This is one of the reasons why original adapters are expensive than cheap alternatives.
An EMC compliant product does not likely have any disturbance by such an experiment, but we do not know how a non-certified product will behave.
Anyway, coming back to the original experiment, request you to not conduct such an experiment for two reasons: One – It may be unsafe for you and can damage the equipment mechanically. Two – It’d look stupid.
Still, if someone conducts such an experiment and finds out different results do let me know your discoveries in the comments section below.