Consider a wave made up of two components with independent spatial and temporal frequencies (\( k_1, k_2 \) and \( \omega_1,\omega_2 \)). For simplicity we can assume they both have equal amplitudes, so the wave \( f(z,t) \) can be represented as $$ \begin{align} f(z,t) &= \cos(k_1 z - \omega_1 t) + \cos(k_2z - \omega_2 t), \\ 2f(z,t) &= e^{i(k_1 z-\omega_1 t)} + e^{-i(k_1 z-\omega_1 t)} + e^{i(k_2 z-\omega_2t)} + e^{-i(k_2 z-\omega_2 t)}. \end{align} $$ We can define the average and difference wave properties $$ \begin{align} \bar{k} &\equiv (k_1+k_2)/2 \quad \bar{\omega} \equiv (\omega_1+\omega_2)/2, \\ \Delta{k} &\equiv (k_1-k_2)/2 \quad \Delta{\omega} \equiv (\omega_1+\omega_2)/2, \end{align} $$ so that the above equation becomes $$ \begin{align} 2f(z,t) &= (e^{i(\bar{k} z-\bar{\omega}t)} + e^{-i(\bar{k} z-\bar{\omega} t)})(e^{i(\Delta k z-\Delta \omega t)} + e^{-i(\Delta k z-\Delta \omega t)}), \\ f(z,t) &= 2 \cos(\Delta k z - \Delta \omega t) \cos(\bar{k} z-\bar{\omega} t). \end{align} $$ The sum of the two waves is equivalent to the product of two different waves. The second wave, the average, will have a higher spatial and temporal frequency than the first, prefactor wave. The low-frequency wave is known as the envelope and the high-frequency wave is known as the carrier. This simulation demonstrates such a combined waveform. The frequency of the envelope is frequency of the "beat" pattern between the two waves. We can see that the velocity of the envelope, the group velocity, is $$ v_g = \frac{ \partial \omega }{ \partial k }. $$