Line Integrals
A line integral is the one-dimensional member of the family of integrals over curves, surfaces, and volumes that underpin all of vector calculus and electromagnetism. Given a vector field and an oriented path running from point to point , the line integral accumulates the projection of onto the infinitesimal displacement tangent to the curve. Where the field points along the direction of motion the contribution is positive; where it opposes the motion it is negative; where it is perpendicular it contributes nothing. The construction is the natural continuum limit of a Riemann sum: divide the path into small directed segments, dot the field into each, sum, and refine. The result is a scalar — one number capturing the cumulative interaction of field and path — and reversing the orientation of flips its sign. In electromagnetism line integrals are ubiquitous: the work done by a force is ; the electrostatic potential difference is the line integral of ; the electromotive force around a circuit is a closed line integral; and Ampère's law expresses in terms of the enclosed current. The single most important distinction is whether the integral is path-dependent or path-independent. For a conservative field — one expressible as the gradient of a scalar, equivalently one with zero curl in a simply connected region — the integral depends only on the endpoints, and integrals around closed loops vanish. This property, formalized by the fundamental theorem for gradients and by Stokes' theorem, is exactly what permits the introduction of scalar potentials in electrostatics: the entire concept of voltage is a statement about line integrals.
- A line integral sums the tangential component of a vector field along a curve , weighting each step by how much the field points along the direction of travel.
- Physically it represents work done by a force, the EMF around a loop, or the potential difference between two points.
- One parametrizes the path as , replaces , and reduces the integral to an ordinary single-variable integral in .
- For a conservative (curl-free) field the integral depends only on the endpoints, not the path, and a closed-loop integral vanishes — the basis of scalar potentials.
- Stokes' theorem ties the closed line integral to the flux of the curl, and the fundamental theorem for gradients reduces to an endpoint difference.
- Key idea: A line integral projects a vector field onto a path and sums the result; whether that sum depends on the path or only on its endpoints is decided entirely by the curl of the field.
Where this lives today
The electric-power industry runs on instruments that are line integrals in hardware. A Rogowski coil — the flexible loop electricians clamp around a busbar — measures the closed line integral of the magnetic field along its own axis; by Ampère's law that reading is the enclosed current, no matter how the conductors inside are arranged. The same principle at accelerator scale: beam-current monitors at CERN are toroidal Ampère loops around the beam pipe. Voltage metrology, meanwhile, leans on path independence and knows exactly when it fails. Ground-loop artifacts in sensitive electronics and the "two voltmeters, two readings" puzzles of transformer circuits are all cases where changing magnetic flux makes , so the line integral between two points depends on which side of the flux the leads pass. And at the quantum frontier, the Aharonov–Bohm effect shows electron interference shifts proportional to a line integral of the vector potential around a flux — nature computing where no classical field touches the path at all.
The physical picture
Imagine walking along a trail while a wind field blows. The line integral measures how much the wind helps or hinders your progress: where the wind is at your back the contribution is positive, where it blows in your face it is negative, and a crosswind contributes nothing. The total is your net 'tailwind benefit' for the whole walk.
For a force field, this benefit is literally the work done — energy transferred. If the field is conservative, the energy you gain walking from to depends only on the heights of the endpoints (the potential), so any round trip returns you to zero net work. This is why a hiker on a frictionless hill cares only about elevation change, not the route. The dot product is the heart of the operation. It is large and positive when field and path align, zero when they are perpendicular, and negative when they oppose. Building the integral from rather than is precisely what gives line integrals their directional, signed character. Path-independence is a special, fragile property. Most fields are not conservative — stir a fluid in a vortex and a loop integral of the velocity (the circulation) is nonzero. Stokes' theorem reveals the cause: nonzero loop integrals signal nonzero curl piercing the enclosed surface. The E&M payoff cuts both ways: the electrostatic field will pass the conservative test (making voltage well-defined), while Ampère's law and Faraday's law are precisely about loop integrals that refuse to vanish — around currents and around changing magnetic flux.
Building the integral
The definition formalizes the chopped walk. Split the oriented path into directed segments , sample the field on each, and refine:
where: — vector field being integrated; — oriented path from to ; — the -th directed segment; — a representative point on segment . The output is a scalar with units of (field)×(length) — for a force in newtons, joules. The infinitesimal step is a genuine vector, written in Cartesian components as:
where: — infinitesimal directed displacement along the path. On a leg where only varies, and the integrand collapses to — the trick that makes axis-aligned paths the easiest to integrate along, as the worked examples exploit. For a general curved path, the universal method is parametrization:
where: — a parametrization of the path with , ; — the tangent (velocity) vector. Equation (3) turns every line integral into an ordinary single-variable integral — the whole subject of "evaluating line integrals" is the art of choosing a parametrization that makes the integrand simple.
We are establishing the workhorse computational fact (3): any line integral collapses to an ordinary integral over the path parameter, and the answer does not depend on which parametrization you choose. The strategy is the chain rule applied to the displacement, followed by a substitution argument for reparametrization invariance, finished with a concrete closed-loop evaluation that we will reuse when checking Stokes' theorem. The point to internalize: the parameter is scaffolding — speed through the path cancels out, because covering a segment faster makes longer and shorter in exact compensation.
Step 1. Express the step through the parametrization. Along , an increment displaces you by
Why: this is the definition of the tangent vector — displacement per unit parameter, times the parameter increment.
Step 2. Substitute into the integral, making the integrand a scalar function of alone:
Why: both the field (evaluated on the path) and the tangent are now known functions of ; the dot product is an ordinary scalar integrand.
Step 3. Check reparametrization invariance: if with , the chain rule gives , and the substitution rule for ordinary integrals absorbs the factor exactly. Only the orientation matters: running the parameter backwards flips the sign. Why: physical answers cannot depend on bookkeeping speed — work done by a force is the same whether you traverse the path in a second or an hour.
Step 4. Concrete evaluation for later use — the circulation of the vortex field around the unit circle, , :
The loop integral is , matching Stokes' theorem: this field's curl is (the rigid-rotation calibration of the curl article), and . Verified: Griffiths §1.3.1 method; the circle evaluation cross-checks against the curl article's with .
The electromagnetic cast
Four physical quantities in this track are line integrals. Work, first — energy transferred by a force along a path:
where: — work done on the particle; — the force. The mechanics track develops this thread in its own article on work as a line integral of force; here it becomes the bridge to potential energy for charges. Second, the potential difference, defined by integrating the electrostatic field:
where: — scalar electric potential; — electrostatic field; the minus sign and the limits together say: walking against the field raises the potential. This definition only makes sense because the electrostatic line integral is path-independent — the derivation below. Every voltage you have ever measured is this integral. Third, the electromotive force, the closed-loop line integral of whatever force-per-charge drives current around a circuit:
where: — EMF; — force per unit charge (battery chemistry, induced electric fields...). In electrostatics ; a nonzero EMF requires something beyond static charges — Faraday's law will supply it. Fourth, Ampère's law, the magnetostatic loop integral:
where: — magnetic field; — permeability of free space; — current threading the loop. The magnetic field is the great non-conservative example: its loop integrals measure enclosed current, not zero. Standing behind the conservative cases is the fundamental theorem for gradients — stated here, dissected in the next article:
where: — any scalar field; the line integral of a gradient telescopes to an endpoint difference.
Go deeper · Derivation B · 1 minPath independence for gradient fields
We are proving the central structural fact of the article: if for some scalar potential , then depends only on the endpoints of , and every closed-loop integral vanishes. This is what licenses the definition of voltage in equation (5) and potential energy in mechanics. The strategy is beautifully short: recognize the integrand as an exact differential using the gradient's master relation, and integration becomes bookkeeping. The step to watch is the recognition step — it is the same identity that defined the gradient in the first place, now read in reverse.
Step 1. Substitute the gradient form into the line integral:
Why: we are testing what the gradient structure buys; no property of the path has been used yet.
Step 2. Recognize the integrand as the total differential of :
Why: this is the multivariable chain rule — the defining property of the gradient from its article, , applied along the path.
Step 3. Integrate the exact differential — the sum of all the little changes in along the walk telescopes:
Why: each step's adds the change of ; intermediate values cancel in pairs, exactly like . No feature of the route survives — only where it starts and ends.
Step 4. Close the loop: for ,
Applied to electrostatics with : the work done by the field per unit charge around any closed path is zero, potential differences are route-independent, and a voltmeter reading means something. The converse — that curl-free fields are gradients in simply connected regions — comes from Stokes' theorem two articles ahead. Verified: equivalent to the fundamental theorem for gradients, Griffiths §1.3.2; consistent with , since Stokes then forces every loop integral to vanish.
Go deeper · Derivation C · 1 minThe potential difference as a line integral of the field
We are deriving the voltage relation (5) — including its treacherous sign and limit conventions — from the fundamental theorem applied to . Getting this wrong by a sign is the single most common error in early electrostatics, so the derivation's job is mostly to nail down who is subtracted from whom. The strategy: apply equation (8) to , then flip signs and limits carefully.
Step 1. Apply the fundamental theorem (8) to the potential itself along any path from to :
Why: the theorem holds for any scalar field; the right side is always "value at the upper limit minus value at the lower limit".
Step 2. Substitute :
This is the standard form (Griffiths eq. 2.22) — and it is where signs go to die. Cleanest anchor: moving against the field raises the potential. Why: the minus sign of transfers to the integral; many texts (Griffiths eq. 2.22) write , others swap the limits to absorb it. Pick one convention and check it on a known case, as we do next.
Step 3. Sanity-check on a point charge. Field outward; move from inward to along a radius, with :
Why: closer to a positive charge sits at higher potential — the answer is positive, as it must be, and reproduces when . Any sign convention that fails this test is wrong.
Step 4. Note what made all of this possible: path independence. The integral defining takes the same value along every route from to , so is a function of position alone. In a region where (Faraday induction), "the voltage between two points" stops being unique — a fact with real consequences for measurement. Verified: reproduces Griffiths §2.3.1 (eq. 2.21–2.22) and the standard Coulomb potential; the worked example below runs the same integral with numbers.
Limiting cases
The character of a line integral depends on the field and the topology of the path:
| Case | Result | Meaning |
|---|---|---|
| Conservative field | In a simply connected region a curl-free field is a gradient; the integral depends only on endpoints and closed loops give zero. | |
| Closed loop, general field | Stokes' theorem: the circulation equals the flux of the curl through any surface bounded by the loop. | |
| Non-simply-connected region | A curl-free field encircling a hole (e.g. around a line current) can have nonzero loop integral — the surface cannot avoid the singularity. | |
| Orientation reversal | Traversing the path backwards reverses every and flips the sign of the integral. | |
| Field ⊥ path everywhere | A magnetic force on a moving charge, always perpendicular to the velocity, does zero work — whatever the trajectory. |
Worked examples
Example 1 — potential difference near a point charge (confidence builder). A charge sits at the origin. How much work is needed to move a test charge from to , by any route?
Step 1. Because the electrostatic field is conservative, choose the easiest path: a straight radial line. With and ,
Step 2. The external work (moving slowly, against the field) is
It costs 0.27 mJ to bring the test charge in — along a spiral, a zigzag, or the straight line, identically. That freedom to pick the easiest path is the entire practical content of path independence.
Example 2 — path dependence made explicit, then explained by Stokes (exam level). Take and integrate from to along three routes (Griffiths Example 1.6, all numbers recomputed).
Step 1. Route 1, horizontal then vertical: . On the horizontal leg , : . On the vertical leg , : . Total:
Step 2. Route 2, vertical then horizontal: . Vertical leg : . Horizontal leg : . Total:
Step 3. Route 3, the straight line , , :
Three routes, three answers: 11, 9, 10 — this field is decisively not conservative.
Step 4. Explain the discrepancy with the curl. Out along and back along traces the unit square counterclockwise, so the circulation is . Stokes' theorem predicts with , constant. Over the unit square: . Exact agreement — the path dependence is precisely the curl flux caught between the routes.
Applications
Work and kinetic energy. The work done by a net force on a particle moving along a path is the line integral . By Newton's second law this equals the change in kinetic energy (the work-energy theorem); the mechanics track's article on work as a line integral of force develops this side in full. When the force is conservative — gravity or the electrostatic force — the work equals minus the change in potential energy, and round trips do no net work.
Electrostatic potential. Because the electrostatic field is curl-free, its line integral between two points is path-independent and defines the potential difference . This is the operational basis of voltage: a voltmeter reads the line integral of between its leads, and the closed-loop integral in electrostatics.
Ampère's law and magnetic fields. For a steady current, the line integral of around a closed loop equals times the enclosed current: . For a long straight wire this immediately gives at radius . Crucially here is curl-free away from the wire yet the loop integral is nonzero — the region is not simply connected.
Faraday's law and induced EMF. The electromotive force around a circuit is the line integral of the force per unit charge. In Faraday's law the induced EMF equals , the rate of change of magnetic flux, linking a line integral (the EMF) to a surface integral (the flux) — the dynamical cousin of Stokes' theorem.
Origins · 1 minAndré-Marie Ampère and how this was discovered
Ampère taught himself mathematics from his father's library in Lyon — until the Revolution guillotined his father and grief froze his studies for a year. He recovered into one of the strangest and fastest minds of French science. In September 1820, news reached Paris that Ørsted's current-carrying wire deflected a compass needle; within one week Ampère had demonstrated that two parallel currents attract and antiparallel ones repel, and within months he had built the mathematical theory of forces between circuits, earning electromagnetism's founding quantitative law. The circuital form taught today — the line integral of around a loop equalling times the threaded current — distils his obsession: that closed curves encircling currents, not action between poles, are the natural geometry of magnetism. Maxwell, who completed the law with the displacement current, called him "the Newton of electricity". The SI unit of current keeps his name on every datasheet.
Going further
References. Griffiths, Introduction to Electrodynamics, 4th ed., §1.3.1 · Jackson, Classical Electrodynamics, 3rd ed., §1.5 · Purcell & Morin, Electricity and Magnetism, 3rd ed., §2.1 · Zangwill, Modern Electrodynamics, §1.5
Provenance. Definitions and the parametric reduction follow Griffiths §1.3.1 and Purcell §2.1. The two-path worked example reproduces Griffiths Example 1.6 (results 10 and 11) — a verifier should recompute both line integrals. The constant is the SI definition value used pre-2019. Ampère's law, Faraday EMF, and the fundamental theorem for gradients are standard (Jackson §1.5, Zangwill §1.5). [Lane note: the broken-path values recompute as 11 (horizontal-then-vertical) and 9 (vertical-then-horizontal), with the straight line giving 10 and loop circulation ; all three verified against the curl by Stokes' theorem.]
Builds on: Scalar and Vector Fields · The Gradient Operator · The Curl of a Vector Field Leads to: The Fundamental Theorem for Gradients · The Curl (Stokes) Theorem · Surface Integrals and Flux
Does my choice of parametrization change the value of a line integral?
No — only the orientation matters. Re-timing the traversal rescales the tangent vector and the increment in exact compensation (the substitution rule of ordinary calculus). Walk the path at constant speed, or sprint the first half and crawl the second: same answer. This is a genuine consistency requirement — work done by a force through a displacement cannot depend on your bookkeeping. What does flip the answer is running the parameter from to : orientation reversal negates every .
When do I use dℓ as a vector versus ds as a scalar arc length?
Use the vector whenever direction physically matters: work, EMF, potential difference, circulation — all dot a field into the travel direction and can be negative. Use the scalar for direction-blind accumulations: the mass of a curved wire from its linear density, , or the total charge on a bent rod. The tell: scalar-arc-length integrals are always orientation-independent and never negative for positive integrands; if your "work" came out unchanged when you reversed the path, you integrated the wrong kind.
How do I actually choose paths to make evaluation easy?
For conservative fields, the theorem chooses for you: any path, so pick the simplest (usually radial or axis-aligned) or skip integration entirely and difference the potential. For non-conservative fields the path is part of the problem statement, but you can still parametrize cleverly: break the route into legs along coordinate axes so that on each leg two of the three differentials vanish (the technique of the worked example), or exploit symmetry — on a circle centred on a vortex, the field is parallel to the path and the integral collapses to field-strength times circumference, the move that makes Ampère's law usable.
Why does the sign convention for potential difference confuse everyone, and how do I stay safe?
Because three separate minus signs interact: , the order of the limits, and the direction of travel. Memorizing a formula string is fragile; memorize a physical anchor instead: moving against the field, the potential rises. Then check any formula against the point charge: near a positive charge, must be large — so for must come out positive. Two seconds of sanity check beats any amount of convention recall, and it is exactly the verification step built into this article's derivation.
If the electrostatic loop integral is always zero, where does a battery's EMF come from?
From forces that are not electrostatic. Around a circuit with a battery, the total driving force per charge is ; the electrostatic part integrates to zero around the loop, and the entire EMF is the chemistry's contribution inside the battery, . Later, Faraday's law adds a second source: induced electric fields with genuine nonzero curl, for which . Both are precisely departures from the conservative structure this article establishes for static fields.
Does zero work by the magnetic force mean magnetic fields cannot move anything?
It means the magnetic force on a free charge never changes the particle's speed — is perpendicular to , so step by step; the force only bends trajectories. Magnets visibly lift iron and motors visibly do work because the energy is routed differently: constraints, induced electric fields, and the sources maintaining the currents do the accounting. Untangling "who does the work" in magnetic systems is a famous subtlety handled properly in the magnetostatics chapter — the line-integral fact here is the rigorous starting point, not the paradox.
Is the circulation around a loop a property of the loop or of the surface I imagine spanning it?
Of the loop alone — that is what makes Stokes' theorem powerful rather than circular. The line integral is computed entirely on the curve; no surface enters. Stokes then guarantees that the curl flux is the same through every surface sharing that boundary — soap film, dome, or wild balloon shape — because the difference between two such surfaces is a closed surface, and curls have zero divergence. Flip side: when the field has a singularity (a wire), some surfaces are illegal, and that loophole is exactly how curl-free fields sustain nonzero circulation.