Vectors and Maxwell’s Equations


Vectors and Maxwell’s Equations

Anna
Today we’re building a toolkit for understanding the four Maxwell equations. They connect electric and magnetic fields to charge, current, and changes in time. We’ll use the vacuum form, with the free-space constants epsilon zero and mu zero, and build up the ideas behind each equation.

Simon
Before we start with fields, let’s get clear on vectors. A push isn’t fully described by saying how strong it is; we also need to know which way it acts. A vector carries both magnitude and direction, often drawn as an arrow.

Anna
A longer arrow can represent a stronger vector. Or we can keep its length fixed and change its direction; that still gives us a different vector. We can describe the arrow by components along perpendicular axes: how much points along x, how much along y, and, in three dimensions, how much points along z.

Simon
And a vector at one location is different from a vector field. A vector field assigns a vector to every location in space. Imagine fixed sample points on a grid: at each point, the arrow tells us the field’s value right there.

Anna
The points stay fixed; they aren’t particles traveling along with the arrows. The field can vary from place to place, and it can also change with time. In a changing-field picture, we’re looking at the field at each instant—not simulating electromagnetic radiation or its propagation delay.

Simon
Two important ways to describe how a field behaves locally are divergence and curl. Divergence asks about net outward flow from a tiny volume, while curl asks about local circulation and the axis of that circulation. The flow language is an analogy for visualizing vectors, not a claim that an electric field is a literal fluid.

Anna
Let’s make divergence concrete. For a small box, each face has an outward-pointing normal. Only the field component that crosses a face contributes to flux through it. Flow leaving the box counts positively, and flow entering counts negatively.

Simon
So divergence compares what leaves with what enters, then divides the net outward flux by the volume. Positive divergence means more leaves than enters; negative means more enters; and zero means they balance. The Cartesian formula adds three contributions, one for each coordinate direction.

Anna
For the x contribution, compare the x-component on the two faces perpendicular to x. If that component increases as we move right, more crosses outward through the right face than enters through the left. In derivative notation, that contribution is partial F x with respect to x.

Simon
Then do the same in the y direction: compare the y-component at nearby positions along y, giving partial F y with respect to y. The z direction contributes partial F z with respect to z. Add all three terms only after considering each direction.

Anna
For example, if the x contribution is one, the y contribution is one, and the z-component is zero everywhere, the divergence is one plus one plus zero, or two. This is net outward flux per unit volume—not just a description of whether arrows look large.

Simon
Three simple patterns help. Arrows pointing outward and growing with distance from the center have positive divergence. Reverse them, and the net flow is inward, so divergence is negative. In a uniform field, what enters one side balances what leaves the other, so divergence is zero.

Anna
Keep an important distinction in mind: zero divergence does not mean the field is zero, and it doesn’t mean nothing crosses the box. It means the signed inward and outward contributions balance. The same is true in three dimensions even when a drawing shows a planar field with a zero z-component.

Simon
Curl is a different local property: circulation, including the direction of its axis. In a plane, we can focus on the z-component of curl. Picture a tiny paddlewheel in a flow analogy, with its center held fixed. Unequal effects on opposite arms can make it rotate.

Anna
We’ll use x pointing right, y pointing up, and positive z toward us. With that orientation, counterclockwise circulation is positive z, and clockwise circulation is negative z. The z-component of curl is partial F y with respect to x minus partial F x with respect to y.

Simon
The derivative notation tells a useful story. In partial F y with respect to x, the numerator says which component to watch—F y—and the denominator says which direction to move—along x. Moving along x doesn’t require the arrows themselves to point along x.

Anna
Take a field with vertical arrows whose vertical component increases as we move right. If F y is one at x equals one and two at x equals two, its change per unit horizontal distance is one. In the limit of smaller separations, that becomes partial F y with respect to x.

Simon
If instead F y equals five everywhere, moving along x changes no vertical component, so that cross derivative is zero. The component’s direction and the direction we move to compare it are separate ideas.

Anna
For a counterclockwise pattern, the vertical flow on the right points upward and on the left points downward. That change along x contributes positively through partial F y with respect to x. Above the center, the horizontal flow points left; below, it points right, so partial F x with respect to y is negative.

Simon
Because the curl formula subtracts that second derivative, the two turning contributions reinforce: one minus negative one equals two. The curl vector points toward us, along positive z. Reverse the field, and the turning reverses too, giving a negative z-component.

Anna
Curl can also be zero even when both cross derivatives are nonzero: if they’re equal, the contributions cancel. A positive curl makes the little indicator turn counterclockwise, a negative one makes it turn clockwise, and zero curl leaves it still.

Simon
An outward field can stretch a group of flow tracers without making them spin locally. That’s the contrast: divergence and curl describe different properties of the same field. And curl means local circulation per area in the limit of a shrinking loop—not simply that some field lines appear curved.

Anna
Now we have the language to return to the first Maxwell equation. Start with a fixed positive source charge in otherwise empty space. A small positive test charge nearby feels an outward electric force, and the force’s direction and strength depend on where we place it.

Simon
At a particular position, double the small test charge and its force doubles. Divide the force by the test charge, though, and you get the same electric field value. That defines the electric field: E equals force divided by test charge.

Anna
We imagine making the test charge sufficiently small that it doesn’t appreciably disturb the source. Electric field is force per unit positive test charge; its units are newtons per coulomb, equivalently volts per metre. In our description, the field has a value at a location even when no test charge is sitting there.

Simon
To connect a field to flux, imagine a small flat patch with an area vector: its length represents the patch’s area, and its direction is the patch’s normal. If the electric field points along that normal, the perpendicular component crossing the patch is largest.

Anna
Tilt the patch, keeping its area and the field fixed, and less of the field crosses it. If the field lies in the plane of the patch, its flux contribution is zero. Reverse the normal, and the flux changes sign even though the field itself hasn’t changed.

Simon
For a small patch, electric flux is the dot product of the electric field and the area vector. For a larger surface, we add the contributions from all its small patches—that’s what the surface integral represents. Flux measures the field through a surface; it isn’t a count of material particles flowing through.

Anna
Now close the surface into an imaginary box. Every area normal points outward. Field entering the box contributes negatively, while field leaving contributes positively. A uniform field gives equal entering and leaving contributions, so its net flux is zero even though the field is present.

Simon
Enclose a positive source charge, and there’s net outward flux. Enclose a negative source charge, and the net flux is inward. We add signed contributions over the whole closed surface, not only the faces where arrows happen to point outward.

Anna
For a spherical surface centered on a positive point charge, symmetry makes the electric field radial and equally strong everywhere on the sphere. Coulomb’s law gives its strength as q divided by four pi epsilon zero r squared.

Simon
Double the sphere’s radius without changing the charge: the field strength at the surface drops to one quarter, while the sphere’s area grows by a factor of four. Those changes cancel in the total flux. The flux remains q divided by epsilon zero, whichever radius we choose.

Anna
That gives us the integral form of Gauss’s law: the closed-surface integral of E dot d A equals the enclosed charge divided by epsilon zero. The surface can have any shape; the sphere helped us see the result, but the law is not limited to spherical surfaces. And the enclosing surface is imaginary—we don’t need to build a shell.

Simon
Charges add their effects as vectors, so their flux contributions add too. Two equal positive charges inside give twice the net outward flux. Equal positive and negative charges inside give zero net flux, although their electric field is not zero everywhere.

Anna
A charge outside the closed surface can produce field through parts of it, but its total inward and outward contributions cancel. So for any closed surface, net electric flux depends on the signed charge enclosed, not on the charge outside.

Simon
To get the local version of Gauss’s law, we need charge density. Rather than concentrating charge at an ideal point, imagine positive charge spread through a small region. Enclose part of it in a small box and divide the signed charge inside by the box’s volume.

Anna
That gives average charge per volume. Shrink the box around a location, and the ratio approaches the local charge density, rho. Its units are coulombs per cubic metre; rho can be positive, negative, or zero. It describes charge in space, not the strength of the electric field.

Simon
Apply the integral law to that little box: its net outward electric flux equals its enclosed charge divided by epsilon zero. Now divide both sides by the same box volume. The left side is net outward flux per volume; the right side is charge per volume divided by epsilon zero.

Anna
Shrink the box while keeping its center fixed. The left becomes divergence of E, and the right becomes rho divided by epsilon zero. That’s why the local equation is divergence of E equals rho over epsilon zero: both sides are local limits of the same flux-and-charge relationship.

Simon
Positive charge density means positive divergence of the electric field; negative charge density means negative divergence. If charge density is zero, local net flux per volume is zero, even if the field itself is present.

Anna
For a point charge, the three-dimensional field has zero divergence everywhere away from the source: the field weakens with distance in just the way that balances the growth of surface area. Right at the ideal point charge, the field is singular, so an ordinary smooth derivative doesn’t apply there; the enclosing flux accounts for the charge.

Simon
We used stationary charges to make the picture simple, but Gauss’s law also holds when fields and charges change with time. The first law connects electric divergence to charge density: it identifies charge as the local source of electric field.

Anna
Next, the magnetic field. Like the electric field, B assigns a vector to every location: it has a direction and a strength. Its strength is measured in tesla. A compass can show its direction, and forces on moving charges provide another way to measure it.

Simon
Imagine B pointing toward us, perpendicular to the screen. A positive charge at rest feels no magnetic force from that field. Move it to the right, across the field, and the force points downward—perpendicular to the charge’s velocity.

Anna
As that ideal particle moves, the force keeps turning its direction into a circular path. Its speed stays constant because a magnetic force alone bends the motion without doing work on the particle. Reverse the sign of the charge, and the force reverses for the same velocity and field.

Simon
Those observations are summarized by magnetic force equals q times v cross B. The cross product gives the perpendicular direction, and the sign of q selects which way the force points. That differs from electric force, q E, which can act even on a stationary charge.

Anna
The second Maxwell equation asks about magnetic flux through a closed surface. Magnetic field enters part of an imaginary box and leaves another part; inward flux is negative and outward flux is positive. The signed contributions balance, so the net magnetic flux is zero.

Simon
In integral form, the closed-surface integral of B dot d A equals zero. Locally, divergence of B equals zero. That says magnetic field has no local sources or sinks of the kind electric charge supplies for the electric field.

Anna
Zero net flux doesn’t mean zero magnetic field. A bar magnet makes the picture familiar: outside it, the field goes from north toward south; inside it, the field continues from south toward north. Follow the whole field, not only the part outside the magnet.

Simon
Even a closed boundary around one end is crossed both outward and inward; the field doesn’t begin at that pole. Cut the magnet in two, and each piece becomes a smaller magnet with both a north and a south end. We haven’t isolated a magnetic source charge.

Anna
So magnetic field lines have no isolated starting or ending poles, and inward and outward flux balance across every closed surface. The second law is divergence of B equals zero, even in places where B is strong.

Simon
The third equation brings in time: can a changing magnetic field produce circulating electric field? Picture a stationary conducting loop, with its normal upward along positive z. Viewed from this side, counterclockwise is the positive direction around the loop.

Anna
A bar magnet, north end upward, moves completely through the loop’s hole. While it’s held still, the magnetic field is present but the linked flux is steady, so there’s no induced circulation from this static field.

Simon
Move the magnet upward toward the loop, and the upward magnetic flux through it increases. A clockwise electric field appears, driving a clockwise conventional current in the conducting loop even though the loop itself hasn’t moved. The current produces a downward magnetic response.

Anna
That response opposes the increase in upward flux, which is the direction required by Lenz’s law. As the north end passes through, the magnet keeps moving upward and the linked flux continues increasing toward its maximum.

Simon
At the centered position in this symmetric example, the flux reaches a maximum, so its rate of change is momentarily zero. The electric circulation around the loop passes through zero there. It’s the symmetry point—not a general rule that induction vanishes just because the magnet is inside the loop.

Anna
Continue moving the magnet upward through the loop, and the linked upward flux decreases. The electric circulation reverses to counterclockwise, producing an upward response field that supports the weakening upward flux. Lenz’s law opposes the change, not always the original field.

Simon
After the south end clears the hole, the magnet has passed through, and during departure the circulation keeps the direction set by the decreasing flux. Hold the magnet still above the loop, and the flux stops changing, so the induced circulation goes to zero even though the magnetic field remains.

Anna
In this weak resistive-loop illustration, we neglect inductive transients so the current follows the electric circulation. The signed circulation of E around the fixed loop equals minus the rate of change of magnetic flux through its area. That minus sign records the Lenz-law direction.

Simon
The local version is curl of E equals minus the time rate of change of B. Curl describes the local circulating part of the electric field; partial B with respect to time describes how the magnetic field changes at a fixed location. Local change and total flux through a loop are related, but they are different measurements.

Anna
For an increasing magnetic field along positive z, the minus sign makes curl of E point along negative z. In this simple uniform-field example, that means clockwise electric circulation viewed from positive z. And the circulating electric field exists in space; it isn’t a property that exists only inside a wire.

Simon
If the magnetic field stops changing, this induction term vanishes. Electric fields due to charge can still be present, but their electrostatic part has zero curl. Faraday’s law is the third connection in our four-law map: changing magnetic field is linked to electric circulation.

Anna
The fourth equation connects magnetic circulation to current and to changing electric field. First, consider a steady conventional current toward us through a wire. The magnetic field circles counterclockwise around it, as the right-hand rule shows: point your thumb along the current and your fingers curl with the magnetic field.

Simon
Reverse the current, and the magnetic circulation reverses. For a steady current in the vacuum-field case, the circulation of B around a closed path is mu zero times the enclosed current. Locally, the current source is current density J—current per area, with a direction and units of amperes per square metre.

Anna
For steady current, the local equation is curl of B equals mu zero J. Outside the wire, the magnetic field can still circle even where its local curl is zero. Circulation around an enclosing path and curl at a point are related, but they are not the same measurement.

Simon
That steady-current rule is incomplete when electric fields change. A charging capacitor makes the problem clear: current reaches one conducting plate and leaves the other, building opposite surface charges, while the ideal vacuum gap between the plates doesn’t conduct charge.

Anna
As the capacitor charges, the electric field between the plates grows from the positive plate toward the negative plate. Once charging ends, the plate charges and field are steady, and the charging current becomes zero. During charging, though, a surface through the wire finds conduction current, while a surface through the gap finds none.

Simon
Keep one magnetic-circulation contour fixed around the lead entering the capacitor. One surface spanning that contour cuts through the wire, so conduction current crosses it. Another surface with exactly the same boundary bends around a plate and passes through the vacuum gap.

Anna
No conduction charge crosses that gap surface, but electric flux through it changes as the plates charge. Both surfaces must give the same magnetic circulation around the unchanged boundary. The changing electric field supplies the missing contribution and restores that agreement.

Simon
For the ideal parallel-plate example, epsilon zero times the rate of change of electric flux through the gap equals the wire current. That contribution is called displacement current. It has the units and role of a current, but it doesn’t mean charge carriers travel across the vacuum gap.

Anna
When the electric flux stops changing, displacement current becomes zero too. It is tied to change in the electric field, not merely to having a field between the plates. The capacitor doesn’t create or destroy charge in the gap; charge accumulates on its plates.

Simon
The complete local equation is curl of B equals mu zero J plus mu zero epsilon zero times the time rate of change of E. The first term is actual current density; the second is the contribution from changing electric field. Together, they determine magnetic curl.

Anna
And our constants and sources are consistently those of free space: total charge and total current. A treatment of materials can reorganize sources using D and H, but that’s a different convention from the one we’ve used. When E is constant in time, the displacement term is zero and we recover the steady-current form.

Simon
Let’s bring all four laws together. Gauss’s law for electricity says net electric flux through a closed surface equals signed enclosed charge divided by epsilon zero. Locally, divergence of E equals rho divided by epsilon zero.

Anna
Gauss’s law for magnetism says magnetic flux entering and leaving a closed surface balances: net magnetic flux is zero, and divergence of B is zero. That does not say B itself is zero.

Simon
Faraday’s law says a changing magnetic field is linked to electric-field circulation: curl of E equals minus the time rate of change of B. Reversing the change reverses the induced circulation in our fixed-loop example.

Anna
And Ampere-Maxwell law says magnetic-field circulation is linked to both electric current and changing electric field: curl of B equals mu zero J plus mu zero epsilon zero times the time rate of change of E. In a charging capacitor, the changing field across the gap supplies the displacement-current contribution.

Simon
So the four equations aren’t just compact symbols. They describe how charge and current source fields, how fields circulate, and how changing electric and magnetic fields are coupled. Divergence and curl give us the local language to see what each equation means.

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