An electromagnet works by sending electric current through a coil of wire, which generates a magnetic field that can be switched on and off at will. Its strength depends on three main factors: the amount of current flowing through the wire, the number of times the wire is coiled, and the type of core material sitting inside the coil. That basic recipe is behind everything from a junkyard crane lifting crushed cars to the superconducting magnets inside an MRI scanner, but the physics that makes it all work starts with a single straight wire.
How Electric Current Creates a Magnetic Field
Every wire carrying electric current produces a magnetic field around it. This is not an engineering trick or a design feature of special wires. It is a fundamental property of moving electric charge, first observed in 1820 when a Danish physicist noticed a compass needle swinging sideways near a wire connected to a battery. The field wraps around the wire in concentric circles, and its strength at any point depends on how much current is flowing and how far away you are from the wire.1The Physics Teacher. A Microcontroller-Based Experiment to Determine the Magnetic Field Near a Straight Current-Carrying Wire Increase the current and the field gets stronger. Move farther from the wire and the field drops off.
A single straight wire, though, creates a field that is weak and spread out in all directions. You can detect it with sensitive instruments, but it is not going to pick up a paperclip. To turn this feeble effect into something powerful enough to be useful, you need a way to concentrate the field. That is where coiling the wire comes in.
Coiling the Wire to Concentrate the Field
When you bend a current-carrying wire into a loop, the magnetic field lines from each part of the loop converge in the center. Instead of spreading outward in every direction, much of the field funnels through the middle of the loop, creating a stronger concentration there. Now stack many loops side by side into a tight coil, and each loop’s field reinforces the ones next to it. The result is a magnetic field running through the center of the coil that behaves much like the field of a bar magnet, with a clear north pole at one end and a south pole at the other.
This stacking effect is roughly proportional: doubling the number of wire turns, while keeping the same current, roughly doubles the strength of the field inside the coil. That is why practical electromagnets are wound with hundreds or even thousands of turns of thin wire rather than a few loops of thick cable. Each additional turn is another contribution adding to the total. The coil structure is what transforms the weak circular field around a single wire into a directional, concentrated force you can aim and control.
The Core Multiplier
A coil of wire wrapped around nothing but air is already, technically, an electromagnet. But it is a weak one. The transformative leap in strength comes from sliding a core of ferromagnetic material into the center of the coil. Soft iron is the classic choice, though modern electromagnets use various alloys tuned to specific jobs.
Ferromagnetic materials contain tiny regions called magnetic domains. Normally, these domains point in random directions and their magnetic contributions cancel each other out. But when you place that material inside an energized coil, the coil’s field nudges the domains into alignment. Each aligned domain adds its own magnetic contribution on top of the coil’s field, and the effect is dramatic. A soft iron core can amplify the magnetic field inside the coil by a factor of several hundred to several thousand compared to an air core. This is the difference between a classroom demonstration with a nail and a battery and an industrial crane magnet capable of hoisting tons of steel scrap.
The choice of core material also determines how the electromagnet behaves when the current switches off. Soft iron demagnetizes almost instantly once the current stops, which is essential in applications like relays and electric bells where the magnet needs to cycle on and off rapidly. Harder steel alloys retain some magnetism after the power is cut, which is a liability in most electromagnet designs but useful for manufacturing permanent magnets. Engineers select core compositions based on how quickly the magnet needs to respond, how strong it needs to be, and how much residual magnetism is acceptable.
When Strength Hits a Ceiling
You might assume that simply cranking up the current or adding more wire turns will keep making an electromagnet stronger indefinitely. In practice, every electromagnet runs into limits, and understanding those limits is as important as understanding the factors that build strength in the first place.
The first ceiling is magnetic saturation. As the current through the coil increases, the magnetic domains in the core progressively line up with the field. Eventually, nearly all of them are aligned, and there are no more domains left to recruit. At that point, pumping in more current produces only a tiny increase in the magnetic field. The core is said to be saturated. The exact saturation point depends on the core material. Research on industrial lifting electromagnets, for example, treats the nonlinear relationship between the applied magnetic field and the resulting magnetization of the core as a critical design consideration, because pushing past saturation wastes energy without meaningfully increasing lifting force.2Advanced Electromagnetics. A Novel Method for Field Analysis and Design of Electromagnet Used in Lifting Applications
The second ceiling is heat. Current flowing through wire generates heat due to the wire’s electrical resistance. The more current you push, the hotter the wire gets, and at some point the insulation on the wire melts, the wire itself fails, or the surrounding structure is damaged. This is not a minor nuisance; in large research electromagnets, cooling systems can be as complex as the magnet itself. Water-cooled copper coils are common in high-field laboratory magnets, and even those have upper limits set by how fast heat can be carried away.
How Temperature Affects Performance
Temperature interacts with electromagnet performance in ways that can surprise people. You might expect that cooling an electromagnet would help it work better, since cold wire has less electrical resistance and can carry more current. But the core’s magnetic behavior also changes with temperature, and not always in the direction you want.
One set of experiments measured the magnetic field of a simple electromagnet at different temperatures. At room temperature, the electromagnet produced a field of about one tesla. As the temperature dropped from room temperature to freezing, the field strength fell to roughly half. Cooling the magnet further using dry ice, to around minus 60 degrees Celsius, reduced the output to about 3,000 gauss, or less than a third of the original value.3International Journal of Advancements in Technology. Effect of Temperature on Electric Current, Magnets and Electromagnet The drop is related to changes in the magnetic properties of the core material and the behavior of the current source at low temperatures. This is a useful reminder that “bigger current equals stronger magnet” is not the whole story; the operating environment matters too.
At the opposite extreme, heating a ferromagnetic core past a threshold called its Curie temperature destroys its ferromagnetic properties entirely. For iron, that temperature is around 770 degrees Celsius. Above the Curie point, the core behaves as if it were not there, and the electromagnet reverts to being just a coil of wire with no field amplification. This is not a concern for most everyday electromagnets, but it is relevant in industrial settings where magnets operate near furnaces, molten metal, or other heat sources.
Electromagnets Versus Permanent Magnets
The obvious advantage of an electromagnet over a permanent magnet is the off switch. Cut the current, and the magnetic field disappears (assuming a soft core). This makes electromagnets indispensable in situations where you need to pick something up and then release it, or where you need to vary the field strength on the fly. A junkyard crane magnet is useless if it cannot drop the car once it has been moved. A permanent magnet strong enough for that job would be a nightmare to work with.
Permanent magnets, on the other hand, require no power supply and never overheat from continuous use. They are lighter, simpler, and completely self-contained. For applications like refrigerator magnets, electric guitar pickups, and small motors, a permanent magnet is almost always the better choice. But permanent magnets are limited by the material they are made from. The strongest commercially available permanent magnets, made of neodymium-iron-boron alloys, top out at a little over one tesla at their surface. Electromagnets can go far beyond that.
The two technologies also combine in interesting ways. Many electric motors use permanent magnets on the rotor and electromagnets in the stator, or vice versa. Hard disk drives use a permanent magnet in the voice coil actuator but rely on an electromagnetic write head to store data. And in particle accelerators, the magnets that bend and focus the beam are electromagnets precisely because their strength needs to be adjustable in real time as the beam energy changes.
Superconducting Electromagnets
The heat problem with conventional electromagnets is fundamentally about electrical resistance. Current flowing through copper or aluminum wire always encounters resistance, always generates heat, and always wastes energy. Superconducting materials bypass this entirely. Below a critical temperature, certain materials lose all electrical resistance. Current flows through them without generating any heat at all.
A superconducting electromagnet can carry enormous currents through its coils without the cooling burden that limits copper-wound magnets. This allows it to produce magnetic fields far stronger than any conventional electromagnet of comparable size. The catch is that the coils must be kept extremely cold, typically using liquid helium at around minus 269 degrees Celsius. That cryogenic infrastructure is expensive and complex, but for applications that demand very strong and very stable fields, superconducting magnets are the only practical option.
The most familiar example is the MRI scanner. The powerful magnet at the heart of an MRI machine is a superconducting electromagnet, typically producing a field between 1.5 and 3 tesla for clinical imaging, with research systems going higher. These magnets operate in what is called persistent current mode: once the current is established, the superconducting loop sustains it without any external power supply, maintaining a stable magnetic field for as long as the coils stay cold.4Superconductor Science and Technology. Review of the temporal stability of the magnetic field for ultra-high field superconducting magnets with a particular focus on superconducting joints between HTS conductors The field stability required for medical imaging is extraordinary. Even tiny drifts in the field strength would blur the images, so the superconducting joints connecting sections of the coil must have effectively zero resistance. Building and maintaining those joints is one of the main engineering challenges in MRI magnet design.
Nuclear magnetic resonance spectrometers, used in chemistry and biochemistry labs to determine molecular structures, push this even further. NMR magnets routinely operate at fields above 10 tesla, and the newest systems exceed 20 tesla. At those field strengths, conventional copper-wound magnets would require megawatts of power and swimming-pool-sized cooling systems. A superconducting magnet does the same job while sipping liquid helium.
Leakage Flux and the Air Gap Problem
When engineers design electromagnets for practical applications like lifting heavy steel objects or actuating mechanical parts, they care intensely about something that textbook descriptions of electromagnets often skip over: leakage flux. Not all of the magnetic field produced by the coil and core follows the neat path through the core and out through the poles. Some of it leaks out through the sides, through the air around the coil, or through gaps in the magnetic circuit. Every bit of leakage flux is wasted energy that does not contribute to the magnet’s useful force.
The air gap between the magnet’s poles and whatever it is attracting is especially critical. Magnetic field strength drops off sharply across an air gap, and for lifting magnets, even a thin layer of paint, rust, or debris between the magnet face and the load reduces the effective pulling force. Research on lifting electromagnets accounts for both leakage fluxes and the fringing effects around the edges of the poles, where the field spreads outward rather than passing straight across the gap.2Advanced Electromagnetics. A Novel Method for Field Analysis and Design of Electromagnet Used in Lifting Applications Designing the magnet’s pole geometry to minimize these losses is a significant part of the engineering process. A poorly shaped pole face on a magnet with a powerful coil and excellent core can still underperform because too much of its field is leaking into places where it does no work.
This is why industrial lifting magnets have flat, carefully machined pole faces and are used against clean, flat surfaces whenever possible. It is also why horseshoe-shaped magnets are more effective than straight bar magnets for gripping: the horseshoe shape brings both poles close together and close to the target, shortening the magnetic path through air and reducing the opportunity for leakage.
Common Misconceptions
One widespread misunderstanding is that the wire in an electromagnet needs to be a special magnetic material. It does not. The wire is usually copper, chosen purely for its low electrical resistance and ease of winding. Any conductive material will work because the magnetic field is a consequence of the current, not a property of the wire material.1The Physics Teacher. A Microcontroller-Based Experiment to Determine the Magnetic Field Near a Straight Current-Carrying Wire Aluminum coils are used in some large magnets where weight matters more than resistance.
Another common assumption is that electromagnets always need to be “on” to be useful, and that they are inherently temporary devices. Superconducting magnets challenge this. Once a superconducting loop is energized and sealed into persistent mode, it maintains its current and field indefinitely without an external power source, behaving almost like a permanent magnet that happens to be adjustable.4Superconductor Science and Technology. Review of the temporal stability of the magnetic field for ultra-high field superconducting magnets with a particular focus on superconducting joints between HTS conductors Clinical MRI magnets routinely stay energized for years between maintenance cycles.
People also tend to overestimate how much stronger an electromagnet gets by adding more batteries or turning up the voltage. Because of core saturation, there is a point of diminishing returns where more current produces barely any extra field. And because of heat, there is a harder limit where the magnet simply cannot sustain the current without damage. The relationship between input power and output field strength is not a straight line. The first few amps of current through a fresh core buy you enormous gains; the last few amps before saturation buy almost nothing.
Electromagnets in Places You Might Not Expect
Beyond the obvious examples of cranes, motors, and MRI scanners, electromagnets show up in everyday technology in less visible roles. The lock on many apartment building doors is an electromagnetic lock: a flat electromagnet mounted on the door frame that grips a steel plate on the door with hundreds of kilograms of force, but releases instantly when the current is cut by a buzzer or keycard system. This is a safety feature as much as a convenience one, because electromagnetic locks fail in the “unlocked” position during a power outage, allowing people to exit in an emergency.
Electric doorbells and buzzers have used electromagnets for well over a century. The coil pulls a metal striker toward the bell, and in doing so, breaks the circuit that powers it. The striker springs back, the circuit closes again, and the cycle repeats rapidly, producing the familiar buzzing sound. It is one of the simplest oscillating circuits ever invented, and it relies entirely on the ability to switch a magnetic field on and off by controlling current.
Speakers and headphones work on the same fundamental principle. A coil of wire attached to a flexible cone sits in the field of a permanent magnet. When an audio signal, which is just a rapidly varying electric current, flows through the coil, the coil becomes an electromagnet whose field pushes and pulls against the permanent magnet. The cone vibrates in step with the audio signal, and you hear music. The fidelity of the sound depends in part on how precisely the coil’s magnetic field tracks the input current, which is why speaker design involves careful attention to coil geometry, core materials, and the air gap between the coil and the permanent magnet.
Maglev trains represent the extreme end of the spectrum. These systems use powerful electromagnets to levitate the entire train above its guideway, eliminating wheel-rail friction entirely. Some designs use conventional electromagnets that actively adjust their current hundreds of times per second to maintain a stable gap between the train and the track. Others use superconducting electromagnets on the train that induce currents in the guideway as the train passes, generating a repulsive force strong enough to support its weight. Either way, the train floats on a magnetic field, and the engineering challenge is keeping that field precisely controlled at speeds that can exceed 600 kilometers per hour.