Why are EM waves transverse?

I was reading Griffiths' Introduction to Electrodynamics, specifically the section on plane waves. I can see that if we want a transverse wave traveling in the $z$ direction that we are only going to want our waves to have $x$ and $y$ components, but the reasoning in Griffiths' left me confused.

We start with electric and magnetic field waves of the form

$E(z,t) = E_{0}e^{i(kz-\omega t)}$

$B(z,t) = B_{0}e^{i(kz-\omega t)}$

Since we are in free space, we have that $\nabla \cdot E = \nabla \cdot B = 0$.

Now comes the crucial step: Griffiths claims that these two facts immediately imply that

$(E_{0})_{z} = (B_{0})_{z} = 0$

I wasn't sure how this followed. I know that if I want my waves to be planar, that I need the x and y derivates of the fields to be 0, so that I have a constant magnitude over a front of constant phase, but I wasn't sure how to see that z derivative had to be zero as well. It seems that if you had an electric field plane wave whose real part was varying in space as a sine function, that if you were to look at its z derivative that you would get a cosine function.

• EM waves can have longitudinal components if we avoid the plane wave approximation. See MJ Cliffe, S Jamison for more. – Mark K Cowan Oct 5 '14 at 7:08
• Related: physics.stackexchange.com/q/103171/2451 and links therein. – Qmechanic Oct 5 '14 at 8:38
• Alfred Centauri's answer to the question linked by Qmechanic is particularly succinct – WetSavannaAnimal Oct 5 '14 at 10:46

Let's take a slightly more general case: Consider a wave with wave vector $\vec k=(k_x,k_y,k_z)$, with the electric field given by $$\vec E=\vec E_0\ e^{i(\vec k \cdot \vec r-\omega t)}$$ where $\vec r=(x,y,z)$. Now, we wan't to satisfy Maxwell's equations in the vacuum, including Gauss' law: $$\vec \nabla \cdot \vec E=0$$ The derivative is quite easily evaluated explicitly $$\vec \nabla\cdot \vec E=\vec \nabla \cdot \bigl(\vec E_0\ e^{i(\vec k \cdot \vec r-\omega t)}\bigr)=i\vec k \cdot \vec E_0 e^{i(\vec k \cdot \vec r -\omega t)}$$

In order to satisfy Gauss' law, we must impose: $$\vec k \cdot \vec E_0=\ \text{?}$$

Physically, this means that the direction of propagation is always $\dots$ to the electric field. The exact same argument applies for the $\vec B$-field.

I leave it as an exercise to the reader to convince him(/her/it)self that the question as originally posed is equivalent, i.e. that we can assume without loss of generality that $\vec k = (0,0,k_z)$, resulting in the conclusion reached by Griffiths.

In this answer, I'll start with a real expression for $E$, because I think the exposition is clearer. There is no loss of generality in doing that, because the real expression will always be equivalent to the real part of the complex version of $E$, for some appropriate choice of the origin. Thus, my starting point is

$$E(z,t)=E_0\ sin(k z-\omega t)\ .$$

Since $E$ doesn't depend on $x$ or $y$, clearly $\partial E/\partial x=0$ and $\partial E/\partial y=0$, so the only way that the condition $\nabla \cdot E=0$ can always hold is if $\partial E_z/\partial z=0$ always holds, i.e.,

$$0=\frac{\partial E_z}{\partial z}=(E_0)_z\ k \cos(k z-\omega t)\ .$$

The only way for that equation to hold for all $z$ and all $t$ is if either $(E_0)_z=0$, or $k=0$. If $(E_0)_z=0$, that was the thing to be proved, so we'd be done. The alternative of $k=0$ means that $E$ can be expressed as

$$E=E_0 \sin(-\omega t)\ .$$

Given that there's no current involved, the Ampere-Maxwell equation reduces to just

$$\nabla \times B=\mu_0 \epsilon_0 \frac{\partial E}{\partial t}\ .$$

But

$$(\nabla \times B)_z=\frac{\partial B_y}{\partial x}-\frac{\partial B_x}{\partial y}=0,$$

so the $z$ component of the Ampere-Maxwell equation implies that

$$0=\frac{\partial E_z}{\partial t}=-(E_0)_z\ \omega \cos(-\omega t)\ .$$

The only way that that condition will hold for all $t$ is if either $(E_0)_z=0$, in which case we're done, or $\omega=0$. But if $\omega=0$, that means that simply

$$E_z=(E_0)_z$$

for some constant $(E_0)_z$, i.e., a non-zero $(E_0)_z$ would at most superimpose a constant additional field on top of the wave. Furthermore, the boundary conditions would be a problem with a non-zero $(E_0)_z$, because integrating $E$ along the $z$ axis would result in an arbitrarily large electric potential difference. So the only physically reasonable possibility is $(E_0)_z=0$.

The derivation of $(B_0)_z=0$ is very nearly the same, but with $E$ and $B$ transposed, and with a different sign or constant in a couple places.