Electricity and magnetism are alike because they are two manifestations of the same fundamental electromagnetic force, where moving electric charges generate magnetic fields and changing magnetic fields induce electric currents. In a real circuit or installation, this duality changes everything: it introduces inductance (reactance), allows transformers to step voltages up or down without direct electrical contact, and dictates the physical behavior of every motor, generator, and relay you will ever wire. A common point of confusion among hobbyists is assuming that magnetic fields require a macroscopic wire to exist, or conflating static electric fields (which start and end on discrete charges) with magnetic fields (which always form continuous, closed loops with no start or end point).
The Symmetry of Fields: Ampere's and Faraday's Laws
To understand how these two phenomena mirror each other on the workbench, we look at two foundational rules. Ampere's Law states that an electric current flowing through a conductor creates a proportional magnetic field wrapping around it. This is the operating principle behind every electromagnet and inductor you solder into a PCB. Conversely, Faraday's Law of Induction states that a changing magnetic field passing through a loop of wire will induce a voltage (electromotive force) across that wire.
This symmetry is so profound that it extends to the propagation of light itself. The speed of light in a vacuum is directly derived from the electric permittivity and magnetic permeability of free space, expressed as c = 1 / √(μ₀ε₀) ≈ 299,792,458 m/s according to the NIST fundamental physical constants. When you route high-speed traces on a motherboard or deal with radio frequency interference (RFI) in an ESP32 Wi-Fi antenna circuit, you are actively managing this exact electromagnetic wave propagation.
Worked Numeric Example: Calculating Inductive Kickback
Let's look at how the electricity-magnetism relationship manifests as a very real, component-destroying hazard on the bench: inductive kickback. When you build up a magnetic field in an inductor, you are storing energy. If you interrupt the electric current, the collapsing magnetic field will induce a massive voltage spike to keep the current flowing, desperately trying to maintain the magnetic equilibrium.
Imagine you are switching a 24V DC solenoid valve using a standard N-channel MOSFET (like an IRF520). The solenoid coil has an inductance (L) of 10 millihenries (10 mH) and draws a steady-state current (I) of 2 Amps. Modern microcontrollers can switch a MOSFET off incredibly fast—let's say the current drops from 2A to 0A in just 1 microsecond (1 µs).
We calculate the induced voltage (V) using the inductor formula derived from Faraday's Law:
V = L × (ΔI / Δt)
- L = 0.01 H (10 mH)
- ΔI = 2 A (change in current)
- Δt = 0.000001 s (1 µs switching time)
V = 0.01 × (2 / 0.000001) = 20,000 Volts
Even though your power supply is only 24V, the collapsing magnetic field induces a 20,000V spike. This will instantly avalanche and destroy your MOSFET, and likely send a high-voltage transient back through your ground plane, resetting or bricking your microcontroller. This is exactly why we place a flyback diode (like a 1N4007) in reverse-bias across the coil: it provides a safe, low-resistance path for the induced current to circulate and dissipate the magnetic energy safely as heat. For a deeper mathematical breakdown of this phenomenon, All About Circuits provides an excellent primer on inductors and calculus.
Where You Meet This in Practice
You cannot build practical electrical systems without leveraging the fact that electricity and magnetism are alike and mutually convertible. Here is where this duality does the heavy lifting in real installations:
- Transformers and Power Supplies: In a switch-mode power supply (SMPS) or a standard 120V-to-12V doorbell transformer, AC current in the primary winding creates a continuously expanding and collapsing magnetic field in the iron or ferrite core. That changing magnetic field cuts across the secondary winding, inducing a new voltage. The ratio of the wire turns dictates the voltage step-up or step-down.
- Electric Motors and Generators: A Brushless DC (BLDC) motor uses sequentially pulsed electromagnetic stators to pull on permanent magnets attached to the rotor. Run the motor backward (as in a wind turbine or regenerative braking system), and the moving permanent magnets induce an AC current in the stator coils, turning it into a generator.
- Inductive Proximity Sensors: Used heavily in industrial automation, these sensors generate a high-frequency oscillating magnetic field. When a metallic object enters the field, it induces eddy currents in the metal, which in turn create their own opposing magnetic field, altering the oscillator's amplitude and triggering the sensor output.
When working near high-voltage AC feeders (e.g., 240V/480V service panels), the alternating current creates a massive, continuously changing magnetic field. If you run a long, unshielded signal cable or a de-energized wire parallel to a heavily loaded AC feeder, the changing magnetic field will induce a dangerous voltage on the dead wire. Always verify circuits are dead with a tested CAT III/IV multimeter before touching conductors, and route low-voltage control wires at 90-degree angles to mains voltage to minimize magnetic coupling.
Electric vs. Magnetic Fields in Circuits
While electricity and magnetism are fundamentally linked, they behave differently when stored in passive components. Understanding this matrix helps when debugging filter circuits or sizing components for power electronics.
| Characteristic | Electric Field (Capacitance) | Magnetic Field (Inductance) |
|---|---|---|
| Primary Component | Capacitor | Inductor / Choke |
| Energy Storage Medium | Dielectric material (ceramic, film, electrolytic) | Magnetic core (ferrite, powdered iron, air) |
| Opposes Changes In... | Voltage | Current |
| Field Line Geometry | Starts on positive charge, ends on negative charge | Forms continuous, closed loops (no monopoles) |
| Unit of Measurement | Farads (F) | Henries (H) |
| DC Steady-State Behavior | Acts as an open circuit (blocks DC) | Acts as a short circuit (passes DC, limited by wire resistance) |
Frequently Asked Questions
How are electricity and magnetism alike when it comes to field lines?
Both electric and magnetic fields exert invisible forces that can be mapped using field lines, and the density of those lines represents the strength of the field. However, their geometry is fundamentally different. Electric field lines originate on positive charges and terminate on negative charges; they have a distinct start and end. Magnetic field lines, as dictated by Gauss's Law for Magnetism, always form continuous, closed loops. There are no magnetic 'monopoles'—if you cut a permanent magnet in half, you do not get an isolated north and south pole; you get two smaller magnets, each with its own complete north-south loop.
Are electricity and magnetism the same thing in a DC circuit?
In a pure, steady-state DC circuit, they behave independently. A constant DC current flowing through a straight wire creates a static, unchanging magnetic field around it. Because the magnetic field is not changing over time, it does not induce any secondary electric fields or voltages in nearby wires. The duality only becomes active and observable in the circuit when the current changes (like in AC, PWM signals, or during switch-on/switch-off transients), causing the magnetic field to expand or collapse.
How do permanent magnets fit into the electricity and magnetism relationship?
It is a common misconception that permanent magnets have a hidden macroscopic electric current flowing through them. In reality, the magnetism in a neodymium or ferrite magnet comes from the quantum mechanical spin of electrons and their orbital motion around the atomic nucleus. In ferromagnetic materials, these microscopic atomic 'current loops' align in the same direction within magnetic domains. So, while there is no measurable current flowing through the block of metal with a multimeter, the magnetism is still generated by moving electric charges at the subatomic level, proving the fundamental link between the two forces.
Why does alternating current (AC) radiate electromagnetic waves but direct current (DC) does not?
Radiation requires acceleration. When charges move at a constant velocity (steady DC), they create static fields that remain bound to the conductor. However, in an AC circuit, the electrons are constantly accelerating, decelerating, stopping, and reversing direction (typically 50 or 60 times a second for mains power, and millions of times a second for RF/Wi-Fi). According to Maxwell's equations, an accelerating electric charge creates a changing electric field, which creates a changing magnetic field, which creates a changing electric field further out. This self-sustaining chain reaction detaches from the wire and propagates through space as an electromagnetic wave. For a rigorous academic breakdown of this propagation, refer to the HyperPhysics database on electromagnetic induction hosted by Georgia State University.






