How is the frequency of a wave defined if it propagates on three different directions? Let's consider a wave which propagates on 2 or three directions, like for instance an electromagnetic wave inside a rectangular waveguide totally closed on two ideal conductor surfaces:

The walls of the guide force the wave to assume an integer number of half-wavelenghts along x,y,z:
$$l_{x,y,z} = m_{x,y,z} \cdot \frac{\lambda}{2}$$, with m integer.
When we indicate a certain mode, such as $TM{2,1,1}$ we mean that there are 2 half-wavelength along x, 1 along y and 1 along z. Suppose now $$l_{x,y,z} = l$$ (i.e. all dimensions are equal: the waveguide is a cube).
Obviously lambda will be different for x,y,z:
$$\lambda_x = \frac{2l}{m_x}=l$$
$$\lambda_y = \frac{2l}{m_y}=2$$
$$\lambda_z = \frac{2l}{m_z}=l$$
So, three different wavelenghts. What does it mean? In physics I have always studied that frequency corresponds to wavelength, if the propagation medium is fixed. What is the definition of frequency in this case?
 A: The frequency is, as always, the number of cycles per second of the oscillations.  It is related to the spatial wavelength by $f = \frac{c}{2 \pi} |\vec{k}|$, where $c$ is the speed of propagation of free waves in the medium and
$$
\vec{k} = (k_x, k_y, k_z) = \left( \frac{2 \pi}{\lambda_x}, \frac{2 \pi}{\lambda_y}, \frac{2 \pi}{\lambda_z} \right). 
$$
and so
$$
|\vec{k}| = 2 \pi \sqrt{ \lambda_x^{-2} + \lambda_y^{-2} + \lambda_z^{-2}}.
$$
There are an infinite number of possible $\lambda_i$ for each direction, depending on the dimension of the box in that direction and the number of nodes & anti-nodes.  Each one can, in principle, give rise to a different frequency.
Note that this relationship between frequency and wavelength is exactly the same as it would be for a free wave with the same wave vector $\vec{k}$.  This is because a standing wave solution, such as a wave in a waveguide, can always be expressed as a sum of traveling waves that just happen to interfere at the boundaries of the waveguide.  In the 3D case you need to have a sum of waves whose $\vec{k}$ vectors are of the form $\left( \pm \frac{2 \pi}{\lambda_x}, \pm \frac{2 \pi}{\lambda_y}, \pm \frac{2 \pi}{\lambda_z} \right)$;  but all eight possibilities have the same magnitude $|\vec{k}|$ and so have the same frequency.
A: 
So, three different wavelenghts. What does it mean? In physics I have
always studied that frequency corresponds to wavelength, if the
propagation medium is fixed. What is the definition of frequency in
this case?

The $\text{2D}$ or $\text{3D}$ solution to the wave equation doesn't have a single frequency, it has a spectrum of frequencies. For the $\text{2D}$ case:
$$u_{tt}=c^2(u_{xx}+u_{yy})$$
Assume (Ansatz):
$$u(x,y,t)=X(x)Y(y)T(t)$$
$$\frac{1}{c^2}XYT''=TYX''+TXY''$$
Divide by $XYT$:
$$\frac{1}{c^2}\frac{T''}{T}=\frac{X''}{X}+\frac{Y''}{Y}=-n^2$$
where $n$ is a Real number.
$$\frac{1}{c^2}\frac{T''}{T}=-n^2$$
$$\frac{X''}{X}+\frac{Y''}{Y}=-n^2$$
$$\frac{X''}{X}=-n^2-\frac{Y''}{Y}=-m^2$$
$$X''+m^2X=0$$
$$X=A\sin mx+B\cos mx$$
Assume a square domain with length $L$ and homogeneous BCs:
$$u(0,y,t)=u(L,y,t)=0$$
And:
$$u(x,0,t)=u(x,L,t)=0$$
$$\Rightarrow B=0$$
$$mL=2\pi p \Rightarrow m=\frac{2\pi p}{L}$$
For $p=1,2,3,4,...$
$$X_p(x)=A_p\sin\Big(\frac{2\pi px}{L}\Big)$$
Similarly for $Y$:
$$Y_q(y)=D_q\sin\Big(\frac{2\pi qy}{L}\Big)$$
For $q=1,2,3,4,...$

**Note that** there is equivalence between @Michael Seifert's $k$ values and what we use here, e.g.:
$$X_p(x)=A_n\sin k_xx$$
with:
$$k_x=\frac{2\pi p}{L}$$
For $p=1,2,3,4,...$

We can also show:
$$n^2=\frac{4\pi^2}{L^2}(p^2+q^2)$$
Going back to:
$$\frac{1}{c^2}\frac{T''}{T}=-n^2$$
$$T''(t)=-c^2n^2T(t)$$
$$T''(t)+c^2n^2T(t)=0$$
$$T(t)=c_1\cos\Big(\frac{n\pi ct}{L}\Big)+c_2\sin\Big(\frac{n\pi ct}{L}\Big)$$
Use a boundary condition:
$$\partial_t u(x,y,0)=0 \Rightarrow \frac{\text{d}T(0)}{\text{d}t}=0\Rightarrow c_2=0$$
So:
$$T_n(t)=c_{1,n}\cos\Big(\frac{n\pi ct}{L}\Big)$$
Putting it all together:
$$u_{n,p,q}(x,y,t)=c_{1,n}\cos\Big(\frac{n\pi ct}{L}\Big)A_p\sin\Big(\frac{2\pi px}{L}\Big)D_q\sin\Big(\frac{2\pi qy}{L}\Big)$$
Using the Superposition Principle:
$$\boxed{u(x,y,t)=\displaystyle\sum_{p=1}^{\infty}\displaystyle\sum_{q=1}^{\infty}c_{1,n}\cos\Big(\frac{n\pi ct}{L}\Big)A_p\sin\Big(\frac{2\pi px}{L}\Big)D_q\sin\Big(\frac{2\pi qy}{L}\Big)}$$
The coefficient $c_{1,n}A_p D_q$ can be determined with the initial condition:
$$u(x,y,0)=f(x,y)$$
with a Fourier series (not shown). This would give you the amplitude spectrum.
We have:
$$\cos\Big(\frac{n\pi ct}{L}\Big)=\cos\omega_nt$$
So:
$$\boxed{\omega_n=\frac{n\pi c}{L}}$$
with:
$$n=\frac{2\pi}{L}\sqrt{(p^2+q^2)}$$
For $p=1,2,3,...$ and $q=1,2,3,...$
So the solution shows an infinity of $\omega_n$ (frequencies).
The solution can be extended to the $\text{3D}$ case by adding:
$$Z(z)=G_r\sin\Big(\frac{2\pi rz}{L}\Big)$$
and:
$$n=\frac{2\pi}{L}\sqrt{(p^2+q^2+r^2)}$$
For $p=1,2,3,...$ and $q=1,2,3,...$ and $r=1,2,3,...$
A: Aside from the doppler effect or relativistic dialation, the frequency of a wave is generally determined by its source.  If an electromagnetic wave enters a wave-guide at an angle, it reflects from the walls of the tube. The reflections interact with each other to produce an interference pattern. Depending on the angle of reflection, the pattern can have various wavelengths or velocities but the wave which leaves the other end of the tube will have the same frequency as the one which entered.
