In short
The electric flux through a surface measures how much electric field threads through that surface. For a flat surface of area A sitting in a uniform field \vec{E}, the flux is
where \vec{A} = A\hat{n} is the area vector — a vector whose magnitude equals the surface area and whose direction is the chosen normal \hat{n} to the surface. The angle \theta is the angle between \vec{E} and \hat{n}.
For a non-uniform field or a curved surface, divide the surface into tiny patches \mathrm{d}\vec{A} = \hat{n}\,\mathrm{d}A and integrate:
For a closed surface (one that encloses a volume, like a balloon), the convention is to take \hat{n} as the outward normal; the flux integral is written with a circle through the integral sign:
Positive flux means net field lines exit the surface; negative means they enter. Flux has SI units of \text{V}\cdot\text{m} or equivalently \text{N}\cdot\text{m}^2/\text{C}.
Physically, flux is a count of field lines piercing the surface. It is the bookkeeping that makes Gauss's law possible — the next article turns flux into a sharp statement about enclosed charge.
Stand under the overhang of a Mumbai building during a July downpour. Hold a rectangular cardboard frame — say, a piece cut from a cereal box — flat against the sky, parallel to the ground. Rain pours straight down through it. Now tilt the frame so it is vertical, edge-on to the falling rain. Barely a drop passes through; the rain slides by, missing the opening. Tilt it to 45^\circ, and the rate is somewhere in between — you can almost feel it is the "cosine" of the tilt angle.
The quantity that captures how much rain is passing through the frame per second has a name in electromagnetism: flux. Replace the rain with the electric field and the frame with a mathematical surface — any surface, flat or curved, open or closed, real or imagined — and the electric analogue of that "rate of piercing" is electric flux. The field does not really "flow" in the way water does, but the geometry of how much field is threading through the surface is identical, and the arithmetic is the same.
This article does four jobs. First, it builds the intuition from uniform fields and flat surfaces, where \Phi = EA\cos\theta suffices. Second, it introduces the area vector — the gadget that encodes orientation and magnitude in one compact object, so that the cosine is no longer tacked on separately but falls out of a dot product. Third, it extends to non-uniform fields and curved surfaces by an integration argument that parallels the one in the superposition article. Fourth, it handles closed surfaces, fixes the outward-normal convention, and shows how to compute the flux of a point-charge field through a cube and through a sphere — two examples whose answer (q/\varepsilon_0) will be promoted, in the next article, from a calculated fact to a universal law: Gauss's law.
You cannot study Gauss's law without flux. Gauss's law is a statement about flux. This article is the grammar for the sentence.
1. Uniform field, flat surface: the rain analogy in physics
The simplest case
Start with a uniform electric field \vec{E} — think of the field between two parallel charged plates, or of the near-field of a very large charged sheet — and a small flat surface of area A. Tilt the surface until its normal \hat{n} makes angle \theta with \vec{E}.
Three cases are clear before any algebra:
- \theta = 0 (surface perpendicular to \vec{E}, normal parallel to \vec{E}). All the field lines that hit the projected area A pass straight through. The flux is maximum, equal to EA.
- \theta = 90^\circ (surface parallel to \vec{E}, edge-on to the field). No field lines penetrate; they slide past parallel to the surface. The flux is zero.
- \theta in between. The surface still "catches" field lines, but fewer of them — specifically, the projected area is A\cos\theta, so the flux is EA\cos\theta.
This is exactly the rain analogy. The rate of rain through a tilted window depends on the projected area of the window perpendicular to the rain's motion, which is A\cos\theta when the window normal is at angle \theta to vertical.
The area vector
The cosine is just a dot product in disguise. Define the area vector of a flat surface to be
where A is the area and \hat{n} is a unit vector normal to the surface. (If the surface is flat, there are two choices of \hat{n} differing by a minus sign; you pick one and stick with it for the rest of the calculation.) Then the flux is simply
Why: the dot product \vec{E}\cdot\vec{A} automatically produces |\vec{E}|\,|\vec{A}|\cos\theta = EA\cos\theta. Using the area vector bundles the magnitude and the orientation together, so you never have to think about the \cos\theta separately — the formula has the same form whether the surface is aligned with the field or tilted to 83^\circ.
Worked numerical sanity check. A field of \vec{E} = 500\,\hat{i} N/C passes through a square plate of side 0.20 m whose normal is tilted so that \hat{n} = \cos 60^\circ\,\hat{i} + \sin 60^\circ\,\hat{j}. Area A = 0.04 m². Flux:
The units \text{N}\cdot\text{m}^2/\text{C} are the canonical SI units for electric flux. They are equivalent to \text{V}\cdot\text{m}, since 1\text{ V} = 1\text{ N}\cdot\text{m}/\text{C}; that equivalence will be useful once you meet electric potential.
Why "field lines piercing the surface" is a literal interpretation
Field lines are a visualisation tool whose density is set by convention: you agree that in regions where E is large, you will draw many lines per unit area, and where E is small, few. Specifically, the standard convention is to draw lines so that the number per unit area perpendicular to \vec{E} equals E (or a scaled version of it, as long as you are consistent).
With that convention, the number of lines that pierce a tilted surface of area A is number of lines through the projection perpendicular to \vec{E} = E times the projected area = E \cdot A\cos\theta = EA\cos\theta = \Phi.
So flux literally equals the number of field lines piercing the surface in this counting convention. The formula is not metaphorical; it is an exact equality once you set the line-drawing convention. This is why physicists talk about "the flux of field lines" and why the picture of Gauss's law will be "the total number of lines coming out of a closed surface equals the amount of charge enclosed (up to a universal constant)."
2. Non-uniform fields and curved surfaces
If the field is not uniform over the surface, or the surface is not flat, equation (1) no longer applies as written. The fix is exactly what you would guess — and exactly parallel to the continuous-distribution integrals you built in the superposition article.
The integral definition
Divide the surface S into many tiny patches, each small enough that over its extent (i) the field \vec{E} is effectively uniform, and (ii) the patch is effectively flat. Each patch has an infinitesimal area \mathrm{d}A and a local normal \hat{n}. Assign the patch an infinitesimal area vector
The flux through this patch is \mathrm{d}\Phi = \vec{E}\cdot\mathrm{d}\vec{A}, using the local field at the patch and the patch's local normal. Summing (integrating) over the whole surface:
Why: the construction is identical to every other integral in physics — chop the thing into pieces small enough that the physics is simple on each piece, solve each piece with a local formula, and sum. Here the "local formula" is \mathrm{d}\Phi = \vec{E}\cdot\mathrm{d}\vec{A} and the sum becomes an integral over the surface.
The choice of \hat{n} must be consistent across the surface — every patch's normal must be on the same "side" as its neighbours. For a flat open surface, you simply pick a side and commit. For a curved open surface, you pick a side (e.g., the "upper" side of a dome), and \hat{n} varies from patch to patch but always points into the "upper" half-space. The choice of side flips the sign of \Phi; the magnitude is unchanged.
Example: flux of a uniform field through a hemisphere
A uniform field \vec{E} = E_0\hat{k} passes through a hemispherical shell of radius R placed with its circular edge on the xy-plane (so the dome opens upward along +\hat{k}). Find the flux through the curved (dome) surface, taking \hat{n} as the outward normal of the dome.
Setup. A point on the dome at polar angle \vartheta (measured from the +z-axis) and azimuth \phi has position R(\sin\vartheta\cos\phi,\ \sin\vartheta\sin\phi,\ \cos\vartheta) and outward normal \hat{n} = (\sin\vartheta\cos\phi,\ \sin\vartheta\sin\phi,\ \cos\vartheta). The area element is \mathrm{d}A = R^2\sin\vartheta\,\mathrm{d}\vartheta\,\mathrm{d}\phi, so \mathrm{d}\vec{A} = \hat{n}\,R^2\sin\vartheta\,\mathrm{d}\vartheta\,\mathrm{d}\phi.
Dot product. \vec{E}\cdot\hat{n} = E_0\cos\vartheta.
Integral. Over the hemisphere, \vartheta runs from 0 to \pi/2 (the dome covers only the upper half) and \phi from 0 to 2\pi:
Using \cos\vartheta\sin\vartheta = \tfrac{1}{2}\sin 2\vartheta and \int_0^{\pi/2}\sin 2\vartheta\,\mathrm{d}\vartheta = 1 (check: antiderivative -\tfrac{1}{2}\cos 2\vartheta, evaluated at \pi/2 gives \tfrac{1}{2}, at 0 gives -\tfrac{1}{2}, difference 1), we get \int_0^{\pi/2}\cos\vartheta\sin\vartheta\,\mathrm{d}\vartheta = 1/2.
Why: the flux through the dome equals the flux through the flat circular base of the same radius — which is E_0\cdot(\pi R^2) = \pi R^2 E_0, by the "aligned field through flat surface" formula (1). This match is not coincidence. Any field line that enters the hemisphere through the flat bottom must exit through the curved top (a uniform field has no sources or sinks inside). The flux through the dome equals the flux through any other surface with the same edge in the same field.
That observation — that flux through a surface depends only on the surface's boundary, not on its shape, as long as the field has no sources inside — is one formulation of the idea that will become Gauss's law. You will see it again in a moment, cleaner, for closed surfaces.
3. Closed surfaces and the outward-normal convention
A closed surface is one that completely encloses a finite volume — think of a balloon, a cube, a sphere. It has no edges. By convention, for a closed surface, \hat{n} is always taken to be the outward normal. With this convention, positive flux means field lines leave the enclosed volume, negative flux means they enter it.
The flux over a closed surface is written with a circle through the integral sign:
Why: the oint symbol is a visual reminder that the integration domain is closed. It plays no role in how you calculate — it is a typographic convention signalling which kind of surface you are dealing with.
The net flux through a closed surface in a uniform field is zero
Place a closed surface — any shape — inside a region where the field is uniform, \vec{E} = \vec{E}_0. The net flux is
The vector integral \oint \mathrm{d}\vec{A} over any closed surface is identically zero, because the contributions from opposite sides of any slab cancel in pairs — the outward normal on one face is the inward normal on the opposite face, and the areas match. (A formal proof uses the divergence theorem: \oint\mathrm{d}\vec{A} = \int\nabla\cdot\hat{k}\,\mathrm{d}V = 0 for any constant vector \hat{k}, but the intuition is just pairs-cancelling.) So:
Physically: every field line that enters the closed volume through one side must exit through another, so the net flux is zero. The "in" and "out" contributions cancel exactly.
Flux of a point charge through a spherical surface around it
Place a point charge Q at the origin. Surround it with a sphere of radius r, concentric with the charge. At every point on the sphere, the field is
where \hat{r} points radially outward from the charge. The outward normal to the sphere is also \hat{r}. So
This is constant over the sphere, so the integral simplifies:
Why: two factors of r cancel — the 1/r^2 from the inverse-square field and the r^2 from the sphere's area. The flux ends up independent of the sphere's radius. That is a deeply physical statement: if you draw a bigger sphere around the same charge, the field is weaker (as 1/r^2), but the surface area is proportionally larger (as r^2), so the same number of field lines pierce each sphere. The number of lines depends only on the enclosed charge, not on where you draw your boundary.
Flux of a point charge through any closed surface enclosing it
Now take a point charge Q at the origin and surround it with any closed surface S — not necessarily a sphere, not necessarily concentric. As long as Q is inside S, the flux is still Q/\varepsilon_0.
The argument: imagine drawing a small sphere S_0 of radius \epsilon tightly around the charge, and the arbitrary surface S outside it. The region between S_0 and S contains no charge, so field lines neither begin nor end there. Every field line that enters the region through S_0 must leave through S (and vice versa). Since S_0 is a sphere around the point charge, the flux out of S_0 is Q/\varepsilon_0. The same field lines that leave S_0 must cross S, so the flux out of S is also Q/\varepsilon_0.
This is the heart of Gauss's law. The flux through a closed surface depends only on the charge enclosed, not on the surface's shape or size. The next article, Gauss's law, promotes this observation to a fundamental law and shows how it constrains the field.
4. Worked examples
Example 1: Flux through a rectangle in a uniform field
A uniform electric field \vec{E} = (200\,\hat{i} + 300\,\hat{j}) N/C passes through a rectangular surface of area A = 0.50 m² that lies in the xy-plane (so its normal is along \hat{k}). What is the electric flux through the rectangle?
Step 1. Write the area vector.
The rectangle lies in the xy-plane, so its normal is along the z-axis: \hat{n} = \hat{k}. Choose it to be +\hat{k}. Then
Why: the area vector encodes both the size and orientation of the surface. By choosing \hat{n} = +\hat{k} (rather than -\hat{k}), you are implicitly saying "I will call flux going in the +z-direction positive."
Step 2. Compute \vec{E}\cdot\vec{A}.
Why: \hat{i}\cdot\hat{k} = 0 and \hat{j}\cdot\hat{k} = 0, because the unit vectors are mutually perpendicular. The field has no component in the \hat{k} direction.
Step 3. Interpret.
The field lies entirely in the xy-plane — parallel to the rectangle. No field lines pierce the rectangle; they all slide across its surface.
Result: \Phi = 0.
What this shows: You do not need to compute \theta and \cos\theta when both vectors are given in component form; just dot-product them. A field parallel to a flat surface contributes zero to the flux, independent of the field's strength. This also illustrates why the area vector lives along the normal, not the surface itself: the area vector stores the "direction perpendicular" that the dot product extracts.
Example 2: Flux through a cubic box due to a uniform field
A uniform electric field \vec{E} = E_0\hat{i} passes through a cubical box of side L, oriented with its faces parallel to the coordinate planes. Compute the flux through each face, and show that the total flux out of the cube is zero.
Step 1. List the six faces and their outward normals.
Label the faces by the direction of their outward normal:
- Right face: \hat{n} = +\hat{i}, area L^2.
- Left face: \hat{n} = -\hat{i}, area L^2.
- Top, Bottom: \hat{n} = \pm\hat{k}, area L^2.
- Front, Back: \hat{n} = \pm\hat{j}, area L^2.
Step 2. Compute the flux through each face.
Right face: \Phi_R = \vec{E}\cdot\vec{A}_R = E_0\hat{i}\cdot L^2\hat{i} = +E_0 L^2.
Left face: \Phi_L = \vec{E}\cdot\vec{A}_L = E_0\hat{i}\cdot(L^2)(-\hat{i}) = -E_0 L^2.
Top, Bottom, Front, Back: \vec{E}\cdot\hat{n} = 0 (since \hat{i}\cdot\hat{j} = \hat{i}\cdot\hat{k} = 0), so flux through each is 0.
Why: the field has only an \hat{i} component, and only two of the six face-normals have an \hat{i} component. The other four faces are edge-on to the field.
Step 3. Add the six contributions.
Result: The net flux out of the cube is zero. Equal positive flux flows out of the right face as flows in through the left face.
What this shows: In a uniform field — a field with no sources or sinks in the region — every field line that enters a closed volume must leave. The net flux is zero. This is exactly what Gauss's law will say: a region with no enclosed charge has zero net flux. Here there is no charge inside the cube, and the accounting confirms it.
Example 3: Flux through a closed hemisphere from a central field source
A point charge Q = 5\,\mu\text{C} sits at the origin. Find the flux through (a) a hemispherical shell of radius R = 0.30 m whose flat base is the xy-plane, and (b) the disc that closes off this hemisphere at the xy-plane.
Step 1. Observe the symmetry.
The charge sits on the boundary between the upper hemisphere and the lower hemisphere. By rotational symmetry about the vertical axis — and by the up-down symmetry of a point-charge field — exactly half of the total outgoing flux goes upward (through the dome) and half goes downward.
Why: a point charge radiates isotropically. The plane z = 0 cuts the space into two equal halves. Every unit solid angle in the upper half has a matching unit solid angle in the lower half, so half the total flux is on each side.
Step 2. Use the point-charge-in-enclosing-surface result.
A full sphere of any radius around the charge has flux Q/\varepsilon_0, from equation (4). A hemisphere has half that:
Why: the symmetry argument from step 1, applied to the result that the full sphere captures total flux Q/\varepsilon_0. You could alternatively do the explicit integral \int E\cdot\mathrm{d}A over the dome, but symmetry shortcuts it.
Step 3. Compute the flux through the flat disc.
The flat disc S_2 lies in the xy-plane. The field at every point on the disc (which sits at z = 0, away from the origin) points radially outward in the xy-plane — parallel to the disc surface. The component of \vec{E} along the disc normal \hat{k} is zero everywhere on the disc.
So
Why: the point-charge field at any point in the xy-plane lies entirely in the xy-plane (it is a radial vector from the origin to the field point, and both origin and field point lie in the xy-plane). The disc's normal is \hat{k}; the field has no \hat{k}-component; the dot product is zero pointwise. A zero integrand gives a zero integral.
Step 4. Plug numbers.
Result: \Phi_{\text{dome}} \approx 2.82\times 10^{5}\,\text{N}\cdot\text{m}^2/\text{C}; \Phi_{\text{disc}} = 0.
What this shows: Two pieces of machinery at once. First, symmetry can do an integral for you — the hemisphere flux is \tfrac{1}{2}Q/\varepsilon_0 without any explicit integration. Second, a surface whose normal is perpendicular to the field everywhere has zero flux, even if the field is strong. These two tricks — exploiting symmetry and spotting zero-integrand surfaces — are exactly the tricks that make Gauss's law practical.
5. Common confusions
-
"Flux is a vector." No — flux is a scalar. The area vector is a vector, the field is a vector, but the dot product \vec{E}\cdot\vec{A} is a scalar. Asking "what direction does the flux point?" is a category mistake; the right question is "is the flux positive, negative, or zero?"
-
"Flux equals electric field times area." Only if the field is perpendicular to the surface. In general flux is \vec{E}\cdot\vec{A}, which picks up the cosine of the angle between the field and the normal. A field parallel to the surface gives zero flux even if the field is enormous.
-
"The normal is always 'up'." The normal is up only if the surface is horizontal and you have chosen the upward normal. For tilted surfaces, the normal is whichever direction is perpendicular to the surface — you pick one of the two possibilities and commit. For closed surfaces, the convention is outward — pointing away from the enclosed volume.
-
"The integral of \vec{E}\cdot\mathrm{d}\vec{A} only matters for point-charge fields." No — the definition of flux applies to any vector field through any surface. Flux is a geometric construct, not a physical law. What is special about the electric field is the upcoming law that relates its flux through a closed surface to the enclosed charge — but flux itself is general.
-
"A closed surface and an open surface use different formulas." They use the same formula, \Phi = \int_S \vec{E}\cdot\mathrm{d}\vec{A}. The difference is whether S has a boundary (a closed surface does not). The \oint notation is a visual reminder that the surface is closed; the math is the same \int \vec{E}\cdot\mathrm{d}\vec{A} you would write for an open surface.
-
"Flux depends on the choice of normal." Yes, and that is by design. Flipping the normal (\hat{n}\to -\hat{n}) flips the sign of \Phi. The magnitude is unchanged. For a closed surface, the outward convention fixes the sign globally so that positive flux always means "net lines exit."
If you came here to understand how flux is defined and computed, you have what you need. What follows is for readers who want the formal connection to vector calculus, the divergence theorem, and the bridge to Gauss's law.
Flux as a surface integral — the formal machinery
The expression \int_S \vec{E}\cdot\mathrm{d}\vec{A} is an instance of the general concept of a surface integral of a vector field. In coordinates, if the surface is described parametrically by \vec{r}(u, v) with u, v ranging over some region D in a parameter plane, the surface element is
and the flux becomes
This general parametrisation lets you compute the flux through any smooth surface, however wiggly. For the simple surfaces in this article — flat rectangles, spheres, cylinders — the intuitive formulas \mathrm{d}A = \mathrm{d}x\,\mathrm{d}y, R^2\sin\vartheta\,\mathrm{d}\vartheta\,\mathrm{d}\phi, etc. are just special cases.
The divergence theorem
A cornerstone of vector calculus states that for any vector field \vec{F} and any closed surface S bounding a volume V,
This is the divergence theorem (also known as Gauss's theorem — a different Gauss theorem from the electric one, though named for the same mathematician). It says that the flux of a vector field out of a closed surface equals the volume integral of the field's divergence inside.
Apply it to the electric field. For electrostatics, Maxwell's equation \nabla\cdot\vec{E} = \rho/\varepsilon_0 is the local form of Gauss's law. Integrating over a volume V:
By the divergence theorem, the left-hand side is \oint_S\vec{E}\cdot\mathrm{d}\vec{A}. So
This is Gauss's law in integral form. The divergence theorem is the mathematical backbone that lets you move between local (Maxwell's equation in differential form) and global (Gauss's law in flux form) statements. You will see the global form in action in the next article.
Flux of the magnetic field — where the story is different
A small aside that foreshadows a later topic. For the magnetic field \vec{B}, the analogous Maxwell's equation is \nabla\cdot\vec{B} = 0. So the magnetic flux out of any closed surface is identically zero:
Physically, this says there are no magnetic monopoles — no isolated "north" or "south" poles that act as sources of \vec{B}. Every magnetic field line that enters a closed surface must leave; you cannot trap a magnetic field line by enclosing a region. The electric story, by contrast, does have sources (positive charges) and sinks (negative charges), which is why electric flux through a closed surface can be nonzero.
A subtlety: flux through an open surface vs. through its closure
Two different open surfaces that share the same boundary can have different flux through them, if the field has sources in the region between them. But if the region between the two surfaces contains no charge (no sources, no sinks), the flux through them is equal — because closing the two surfaces together forms a closed surface with zero enclosed charge, hence zero net flux, which forces the two open-surface fluxes to agree (with appropriate signs).
This is why, in the hemisphere example above, the flux through the dome equalled the flux through the disc in a uniform field: the uniform field has no sources in the region, so the "open hemisphere + open disc minus their common orientation" closed surface encloses zero charge, and the fluxes through the two open surfaces must be opposite in sign (i.e., equal in the outward-consistent sense).
Flux and solid angle — a cleaner picture
For a point charge at the centre of a surface (any surface), there is a particularly elegant way to see that the flux depends only on the solid angle subtended by the surface from the charge. Around the charge at a distance r, a patch of surface area \mathrm{d}A with outward normal \hat{n} subtends a solid angle
The flux contribution of this patch is
Integrating over a closed surface, the total solid angle is 4\pi, so
This gives the result (equation 4) without any reference to the surface's shape — the two factors of r^2 (one from the field, one from the area element, in opposite directions) never survive the solid-angle parameterisation. It is the cleanest derivation that this result does not depend on which closed surface you choose around the charge, as long as it encloses the charge exactly once.
The "encloses exactly once" qualifier matters. A surface that wraps around the charge twice — think of a balloon with a handle that loops back through itself — would capture flux 2Q/\varepsilon_0. For the ordinary, simply-connected surfaces you draw in practice, every point outside the surface is reached by field lines that pass through the surface exactly once, and the result Q/\varepsilon_0 holds.
Where this leads next
- Gauss's Law — Promotes the flux-through-a-closed-surface result of section 3 to a universal law: for any closed surface, in any charge configuration, \oint\vec{E}\cdot\mathrm{d}\vec{A} = Q_{\text{enc}}/\varepsilon_0. The next article.
- Applications of Gauss's Law — Spheres and Planes — Uses flux to find the field of a charged sphere, a charged plane, and a capacitor plate configuration, in each case by choosing a Gaussian surface where the flux integral is simple.
- Applications of Gauss's Law — Cylinders and Cavities — Extends the same flux machinery to infinite line charges and charged cylinders, and handles conductors with cavities.
- Electric Field — The field \vec{E} whose flux this article computes, with its own derivation and field-line picture.
- Superposition of Electrostatic Forces — The linearity that makes flux additive: if a surface sees contributions from two separate charge distributions, the total flux is the sum of the fluxes from each.