What is a mode? Regarding electromagnetic waves in a closed cavity

This concept is very unclear to me, and the more different sources I find, the more contradicting definitions and explanations I stumble upon.

Let's use this source as a basis for my question: http://hyperphysics.phy-astr.gsu.edu/hbase/quantum/rayj.html

The second paragraph 'How many modes in the cavity' is what troubles me.

First of all: here is my understanding of what a mode is, though I am almost certain that it is still incorrect.

Given a length $L$ where a string (or a wave) has nodes at both ends, you can have a standing wave at certain wavelengths. The 'standing wave' refers to the entire thing that is between $x=0$ and $x=L$, not just a single wavelength (Is this right?). With each standing wave corresponds a wavveector $\vec k$ that has two properties: a length and a direction. The length defines the wavelength of the standing wave, the direction defines the direction of propagation. Now what defines a mode? A mode is like a category, so that every standing wave must belong to one and only one category. Two waves with a different amplitude still have the same mode. Two waves with a different wavelength (so their vectors $\vec k$ have different length) have a different mode. Two waves with a different direction (so their vectors $\vec k$ have a different orientation) have a different mode. Does the direction of the amplitude matter? After all, if a wave propagates in the $+x$ direction, the amplitude $\vec E_0$ may be in the $+e_y$ direction, in the $+e_z$ direction, in the $e_y+e_z$ direction or anything else. If a change in amplitude direction or length means that the standing wave gets a different mode, that means there are infinitely many modes even when the wavelength is given.

Now there are some troubles I have with the 'How many modes in the cavity' besides the above:

"..whereas the wave equation solution uses only positive definite values."

Why exactly can the wave equation not have a solution $(-1,-1,-1)$ for example?

And the following:

"..Another technical problem is that you can have waves polarized in two perpendicular planes, so we must multiply by two to account for that."

How does polarizing give an extra mode? And given a propagation direction, I can choose infinitely many pairs of perpendicular planes that are also perpendicular to the wave direction.

If anyone could help me out on these troubles I would be very grateful.

• Practical illustration: Get a big bowl or tub full of water, and make waves on the surface. You'll find that there are a limited number of different ways in which you can get the waves to resonate. Those different patterns are the "modes," and they are determined by the mathematics of wave motion and, by the geometry of the container. www2.me.rochester.edu/courses/ME201/webexamp/coffee.pdf – Solomon Slow Feb 8 '18 at 18:24

The different modes of electromagnetic waves in a cavity correspond to different eigenfunctions of the solutions of the electromagnetic wave equation given the boundary conditions of the walls of the cavity. The eigenvalues correspond to the frequencies of the modes. For example, the wave equation for the electric field given as a phasor with a given frequency $\omega$ becomes the Helmholtz equation $$\nabla^2 \vec E =-k^2 \vec E$$ where $k=\omega/c$ and $c$ is the wave phase velocity in the cavity. Together with the boundary conditions, this determines the different eigenvalues in $k$ (and thus frequencies $\omega$) and the pertinent eigenfunctions $\vec E(\vec r)$ which are the "modes". There is also a magnetic field $\vec B$ associated with the electric field of these eigenfunctions. Whenever you have a distinct electric and magnetic field pattern of these eigenfunctions, even sometimes at the same frequency, you can speak of a mode of the cavity. Different amplitudes of the same oscillation pattern are not different modes.