1. Home
  2. Explore
  3. Physics
  4. Electricity and Magnetism

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Electricity and Magnetism

Electromagnetism: The Unity of Electricity and Magnetism

Historical Background

For thousands of years, humans knew about electricity and magnetism as completely separate phenomena. The ancient Greeks discovered that amber, when rubbed, could attract light objects (static electricity), and they also found strange rocks called lodestones that attracted iron (natural magnets). No one suspected a connection between these two forces.

The breakthrough came on a cold winter day in 1820 when Danish scientist Hans Christian Oersted was giving a lecture demonstrating electric current flowing through a wire. By pure chance, he noticed that a compass needle moved whenever he turned the current on or off. This accidental discovery revealed something revolutionary: electric currents create magnetic fields. The magnetic field surrounding an electric current could interact with a nearby compass. Two phenomena thought to be separate were actually connected.

Eleven years later, in 1831, Michael Faraday wondered about the reverse relationship: if electricity can create magnetism, can magnetism create electricity? Through many experiments, Faraday discovered electromagnetic induction — moving a magnet through a coil of wire produces an electric current, but only when the magnet is moving relative to the wire. This principle changed the world forever.

Key insight: A moving magnet near a wire generates electricity (moving charges). Conversely, electricity (moving charges) in a wire generates a magnetic field. In both directions, relative motion is present.

Later, Einstein's theory of relativity proved that, depending on one's frame of reference, electricity and magnetism are actually the same phenomena — two manifestations of a single electromagnetic force. This connection powers nearly all modern technology:

  • Electric generators in power plants (nuclear, coal, hydroelectric) use magnets and coils rotating relative to each other to generate electricity.

  • Electric motors use electricity flowing through a wire near a magnet to create rotation.

  • Transformers outside houses use induction to step down high-voltage power.

  • Wireless charging pads use inductive coupling.

  • Speakers use a magnet and coil to convert electrical signals into sound.


Maxwell's Equations

In the 1860s, James Clerk Maxwell accomplished something remarkable: he took all experimental observations about electricity and magnetism and wrote them down as four elegant mathematical equations. Maxwell's equations show that electricity and magnetism are not just related — they are fundamentally the same force. These equations predict that changes in electric and magnetic fields propagate through space as waves at the speed of light.

The Four Equations

Maxwell's equations use vector calculus notation. The upside-down triangle (∇\nabla∇) represents the derivative in multiple directions. The dot product (∇⋅\nabla \cdot∇⋅) measures outward flow (divergence), and the cross product (∇×\nabla \times∇×) measures circulation (curl). The electric field is denoted by E and the magnetic field by H (or sometimes B). Both are vector fields — at every point in space, they have both magnitude and direction.

1. Gauss's Law for Electricity

∇⋅E=ρε0\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0}∇⋅E=ε0​ρ​

This equation says that the outward flow of the electric field through a closed surface is equal to the charge density (ρ\rhoρ) inside that surface divided by a constant (ε0\varepsilon_0ε0​, the permittivity of free space). In words: electric fields are produced by electric charges. If there are no charges in a region, there is no net outward electric field.

2. Gauss's Law for Magnetism

∇⋅H=0\nabla \cdot \mathbf{H} = 0∇⋅H=0

This equation says the outward flow of the magnetic field through any closed surface is always zero. Why? Because there are no magnetic charges (magnetic monopoles). Magnetic field lines always form closed loops — they never start or end at a point. While electric fields can diverge from positive charges and converge on negative charges, magnetic fields only loop. No isolated magnetic north or south pole has ever been found.

3. Faraday's Law of Induction

∇×E=−μ0∂H∂t\nabla \times \mathbf{E} = -\mu_0 \frac{\partial \mathbf{H}}{\partial t}∇×E=−μ0​∂t∂H​

The curl of the electric field (how much it tends to circulate) is proportional to the negative rate of change of the magnetic field with respect to time. This equation captures Faraday's discovery: a changing magnetic field generates an electric field. When a magnet moves near a wire, the changing magnetic field induces an electric field, which pushes charges and creates a current.

4. Ampère-Maxwell Law

∇×H=J+ε0∂E∂t\nabla \times \mathbf{H} = \mathbf{J} + \varepsilon_0 \frac{\partial \mathbf{E}}{\partial t}∇×H=J+ε0​∂t∂E​

The curl of the magnetic field has two sources:

  • J: the current density — a steady electric current in a wire generates a magnetic field that curls around the wire.

  • ε0∂E∂t\varepsilon_0 \frac{\partial \mathbf{E}}{\partial t}ε0​∂t∂E​: a changing electric field also generates a magnetic field.

Together, the two bottom equations reveal the deep connection: a changing magnetic field produces an electric field, and a changing electric field produces a magnetic field. This mutual generation is what allows electromagnetic waves to travel through empty space.

Maxwell's equations, when manipulated mathematically, predict that the speed of these propagating disturbances equals the experimentally measured speed of light. This proved that light itself is an electromagnetic wave. All forms of "radiation" — radio waves, microwaves, infrared, visible light, ultraviolet, X-rays, gamma rays — are simply electromagnetic waves of different frequencies or wavelengths.


Demonstrations of Electromagnetic Connections

Magnetic Field Around a Current-Carrying Wire

A straight wire carrying electric current generates a magnetic field that forms concentric circles around the wire. The direction of the field is given by the right-hand rule: point the thumb of the right hand in the direction of positive current flow; the fingers curl in the direction of the magnetic field.

The strength of the magnetic field B at a perpendicular distance r from a long straight wire is given by:

B=μ0I2πrB = \frac{\mu_0 I}{2 \pi r}B=2πrμ0​I​

where:

  • μ0\mu_0μ0​ = permeability of free space (a constant)

  • III = current (in amperes)

  • rrr = distance from the wire

This equation shows that:

  • Increasing the current increases the magnetic field strength proportionally.

  • Moving farther from the wire decreases the field strength (inverse relationship).

In a demonstration, 9 amps of current flowing through a copper wire caused a compass needle to deflect when brought near. The deflection reversed direction when the compass moved to the opposite side of the wire. Iron filings sprinkled on a paper around the wire revealed the characteristic concentric circular pattern, confirming the field lines loop around the wire.

Caution: Never attempt such demonstrations at home — 9 amps is a dangerous current level.

The Electromagnet (Coil of Wire)

An electromagnet consists of a wire wound into a coil (a solenoid), often around a ferromagnetic core (e.g., steel). Winding the wire concentrates the magnetic field. Using the right-hand rule, each loop of the coil contributes to the field inside.

In an ideal, infinitely long solenoid, the magnetic field inside is uniform and given by:

B=μ0nIB = \mu_0 n IB=μ0​nI

where nnn is the number of turns per unit length (how tightly the wire is wound). The field outside an ideal solenoid is zero (in reality, it is very weak because field lines close in large loops far away).

Key takeaways from the electromagnet demonstration:

  • The magnetic field is concentrated inside the coil; the core material becomes magnetized.

  • More current produces a stronger magnetic field, allowing the electromagnet to lift heavier objects.

  • When current is turned off, some residual magnetism remains in the core (the steel retains some alignment of magnetic domains).

  • Using a function generator to drive the electromagnet with different waveforms (square, sine, triangle) and varying frequencies (down to 0.03 seconds per cycle) shows how the magnetic field pulses on and off, attracting and releasing iron filings.


Visualizing Magnetic Fields

Magnetic fields are invisible but can be visualized using iron filings. When sprinkled on a paper placed over a magnet, the filings align along the field lines, revealing the field's shape.

Key Properties of Magnetic Field Lines

  • They form closed loops — they never start or end (no magnetic monopoles).

  • They exit from the north pole and enter the south pole.

  • The direction at any point is the direction a compass needle would point (north-seeking pole points in the direction of the field).

  • Flux density (also called magnetic flux density) describes how closely the field lines are packed. Higher flux density means a stronger magnetic field. The field is strongest at the poles, where lines are most concentrated, and weaker farther away where lines spread out.

Patterns from Different Magnet Shapes

  • Bar magnet: Field lines emerge from the north pole, curve around, and re-enter at the south pole. The pattern is symmetrical.

  • Disc (ring) magnet: One face is north, the other south. Field lines come out of one face, go around through space (and also through the central hole), and enter the opposite face.

  • Horseshoe magnet: Essentially a bar magnet bent into a U shape. The field is strongest between the closely spaced north and south poles.

  • Neodymium magnet (rare earth): Extremely strong. Iron filings snap into place so quickly that it is hard to see the full pattern — the flux density is very high.

A compass nearby a magnet will align with the local magnetic field. Without other magnets, a compass points to Earth's magnetic north pole. When a stronger magnet is brought close, the compass locks onto the magnet's field.


Magnetism in Matter

Ferromagnetism

Ferromagnetism (from Latin ferrum = iron) is the phenomenon that makes materials like iron, nickel, cobalt, and steel strongly magnetic. In a ferromagnetic material, the magnetic moments of electrons (their tiny magnetic fields) can be aligned in the same direction, producing a net macroscopic magnetic field.

Electron Spin and Magnetic Moment

Every electron possesses a property called spin — a quantum mechanical form of angular momentum. Even though electrons are not literally spinning balls, they behave as if they have a spin axis and an associated magnetic moment (a tiny bar magnet). The magnetic moment of an electron points opposite to its spin direction because electrons are negatively charged (the right-hand rule applies to positive current, so the direction flips).

In ferromagnetic materials, the spins of many electrons can be aligned so their magnetic moments add together. This alignment can happen on a large scale, creating a permanent magnet. The alignment is due to quantum mechanical interactions (exchange interaction) and is strongest below a certain temperature (the Curie temperature).

Permanent Magnets vs. Induced Magnetism

  • Permanent magnets already have their electron spins aligned (e.g., from being exposed to a strong magnetic field during manufacturing, or from Earth's magnetic field over geological time).

  • Induced magnetism occurs when a ferromagnetic material is placed in an external magnetic field. The field causes the material's electron spins to temporarily align, turning it into a magnet. This is why iron filings, paper clips, and steel objects are attracted to a magnet. When removed from the field, the alignment gradually fades due to thermal agitation (random collisions of atoms), though some residual magnetization often persists.

Key point: In ferromagnetic materials, the magnetic domains (regions of aligned spins) can be reoriented by an external field. The material "remembers" some of this alignment after the field is removed.

Paramagnetism

Paramagnetism is a weaker form of magnetism. In paramagnetic materials (e.g., aluminum, tungsten, lithium), individual atoms have magnetic moments that can be partially aligned by an external magnetic field, but the alignment is very weak. When the external field is removed, the moments immediately randomize due to thermal motion — no residual magnetism remains. This is why an aluminum can is not attracted to a refrigerator magnet under ordinary circumstances.

Quantum Mechanical Origin

All magnetism is ultimately a quantum mechanical effect, arising from:

  1. Electron spin (the dominant contribution) — the intrinsic magnetic moment of electrons.

  2. Orbital angular momentum — the motion of electrons around the nucleus contributes a smaller magnetic effect.

In most materials, electron spins are paired in opposite directions, cancelling out any net magnetic moment. Ferromagnetic materials have unpaired electrons that can align cooperatively. The exact behavior depends on the electronic configuration, which is studied in quantum mechanics and chemistry.


Why Magnets Attract and Repel

The attraction and repulsion between magnets can be understood in terms of magnetic energy density and the tendency of systems to move toward lower energy states.

Magnetic Energy Density

A magnetic field stores energy. The magnetic energy density (energy per unit volume) is given by:

u=B22μ0u = \frac{B^2}{2 \mu_0}u=2μ0​B2​

where BBB is the magnetic field strength and μ0\mu_0μ0​ is the permeability of free space. The energy stored is proportional to the square of the field strength. Higher field → more energy stored.

The universe tends to evolve toward configurations of lower energy. (This is a fundamental principle: objects fall to lower gravitational potential energy, hot objects cool down to lower thermal energy, stretched rubber bands relax to lower elastic energy.)

Repulsion (Same Poles Facing)

When two north poles (or two south poles) are brought together, their magnetic fields point in similar directions in the region between them. The fields add constructively, producing a stronger combined field. This means the magnetic energy density increases. To push the magnets closer, work must be done (energy input from muscles), raising the stored energy. The system "wants" to lower its energy, so it pushes the magnets apart — we feel repulsion.

Attraction (Opposite Poles Facing)

When a north pole faces a south pole, their fields point in opposite directions in the region between them. The fields cancel partially, producing a weaker combined field. This decreases the magnetic energy density. The system moves spontaneously to lower energy — the magnets accelerate toward each other, converting magnetic energy into kinetic energy. We feel attraction.

Induced Magnetization and Attraction

When a permanent magnet approaches a ferromagnetic object (like a paper clip), the magnet's field aligns the electron spins in the object, turning it into a temporary magnet. Now two magnets exist: the permanent one and the induced one. Their opposite poles face each other, so they attract. This is why a magnet can pick up paper clips even though the clips were not magnetic initially.

Final thought: This energy-based explanation is one way to understand magnetic attraction and repulsion. Deeper explanations involve quantum mechanics (exchange interactions) and relativity (the magnetic force as a relativistic effect of moving charges). Even Richard Feynman, when asked "Why do magnets work?", eventually concluded that we can only build models — at the deepest level, we don't have an ultimate answer. Science provides models that accurately predict behavior, even if the underlying "why" remains mysterious.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent