# Flux of magnetic field not zero

Consider the magnetic part of a single electromagnetic wave in empty space, propagating along the $x$-axis of some reference frame. If we take as surface a cylinder with the axis along $x$ and height $L < \lambda /2$ (where $\lambda$ is the wavelenght) placed in a way that it is only crossed by upward (or downward) pointing $\textbf{B}$ vectors, and then we calculate the flux of B through this surface, how do we possibly get zero? The magnetic field is outgoing from the surface, so the flux should be positive.

My solution

I thought of a way to solve this apparent paradox but I am not sure about it, so I ask. My solution is that, since B is contained in a plane, and the intersection between this plane and the surface of the cylinder is a line, the surface integral to calculate the flux is zero because B is different from zero only in a region of negligible measure, namely a line with respect to a surface (I am thinking of Lebesgue integration).

Is my view correct?

The picture you posted in the comments is misleading.From the picture it looks like the magnetic field originates from the X-axis while increasing towards the Y-axis. That is not true ,the magnetic field is everywhere in the X-Y plane ,so if the magnetic field penetrates the Gaussian surface at lets say $y=a$ ,it will also penetrate at $y=-a$,making incoming flux equal to outgoing flux.

• Yes, this is good and true in the ideal case of a field everywhere on the x-y plane. But in a real case , a laser for example (which is finite in the transverse dimensions), if I take a gaussian surface crossing the boundary of the laser light, would the flux not be zero in this case? – tomph Jan 24 '17 at 12:05

I think I understand what is confusing you.

The diagram you see is not a diagram related to the three axes of space $(x,y,z)$.

That diagram gives you the direction and magnitude of the electric and magnetic field at each point along the x-axis with say $y=0$ and $z =0$.
So the three axes are $(x,E,B)$

You cannot draw a Gaussian surface using the diagram below.
To draw a Gaussian surface you would need to have the three spacial axes and have the Gaussian surface enclose a volume.

• So you are saying that the electromagnetic wave is spread all across the space and this diagram shows it only on the x axis? Ok, then please take a look at my comment to The Asgardian's answer – tomph Jan 24 '17 at 12:06

The magnetic field is a solenoidal vector field which means that the total flux of any closed surface is zero, so it can't always be outgoing from the surface. If the flux is outgoing for almost the whole cylinder, the flux also has to be ingoing for some other part such that the total is zero. If you have any vector field and take the curl of that, the result will be a vector field that is solenoidal. A silly example would be to take $\vec F=(z,x,y)$ and take the curl of that to be your B - field. The curl woulf then be $\mathbf B=\nabla\times F=(1,1,1)$. Integrating this field over any closed surface will yield zero total flux.

• This does not answer my question; your post is just a generic statement about the magnetic field, I asked about a particular example: I know it has to be zero but I can't figure out how it is zero in this case. – tomph Jan 24 '17 at 10:55
• @tomph is not your question also valid for electric field? In empty space charge density is zero ,divergverce of electric field must be zero? – Lapmid Jan 24 '17 at 11:03
• @Theasgardian yes, it is indeed valid for E too. – tomph Jan 24 '17 at 11:06
• So this ans clearly does not answer the question . – Lapmid Jan 24 '17 at 11:09
• If you take your $B$ - field to be $(cos \frac{2\pi y}{\lambda}, 0, 0)$ it will be the same as the image you posted in another comment: srh.noaa.gov/jetstream/remote/images/emwave.gif – AccidentalTaylorExpansion Jan 24 '17 at 11:14

Assuming you're talking about an electromagnetic plane wave, the magnetic field is not only outgoing from the surface. It may be outgoing on the upper half ($z > 0$), for example, but then it will be incoming on the lower half ($z < 0$), and these two contributions cancel out.

If you're not talking about a plane wave, you just Fourier transform the wave and then the same argument applies to each individual frequency component.

• I just can't see how it can be: take for example this image srh.noaa.gov/jetstream/remote/images/emwave.gif, and take a gaussian surface entirely contained in the first half-period of the blue wave (magnetic part). – tomph Jan 24 '17 at 10:58
• @tomph In the first half-period of the blue wave, it is pointing toward you. So imagine a cylinder oriented along the wave's direction of travel. On one half of that cylinder, the half that's closer to you, the magnetic field points out of the cylinder, and on the other half, the magnetic field points toward the inside of the cylinder. – David Z Jan 26 '17 at 1:41
• My bad, when I said entirely contained I implied under the hypotheses of the original question, i.e. a cylinder with the axis along the x axis – tomph Jan 26 '17 at 8:51
• Is the x axis the one that corresponds to the direction in which the wave is traveling? The black axis in the picture? If so, then yes, we're on the same page. – David Z Jan 26 '17 at 9:02
• I understand what you mean. Could you take a look at my comment to the asgardian's answer below? My concernment comes mainly from that aspect of the EM wave – tomph Jan 26 '17 at 9:16