The Doppler effect is the change in the observed frequency of a source due to the
motion of either the source or receiver or both. Only the component of motion along the
line connecting the source and receiver contributes to the Doppler effect. Any arbitrary
motion can be replaced by motion along the source-receiver axis with velocities
consisting of the projections of the velocities along that axis. Therefore, without loss
of generality, assume that the source and receiver move along the x-axis and that the
receiver is positioned further out along the x-axis. The source emits a continuous tone
of frequency, *f _{0}*, equally in all directions.
First examine two important cases. The first case is where the source is stationary and
the receiver is moving toward or away from the source. A receiver moving away from the
source will have positive velocity. A receiver moving toward the source will have
negative velocity. If the receiver moves towards the source, it will encounter wave
crests more frequently and the received frequency will increase according to

$${f}^{\prime}={f}_{0}\left(\frac{c-{v}_{r}}{c}\right)$$

Frequency will increase because
*v _{r}* is negative. If the receiver is moving
away from the source, the

$${f}^{\prime}={f}_{0}\left(\frac{c}{c-{v}_{s}}\right)$$

The frequency increases when
*v _{s}* is positive as the source moves toward
the receiver. When

$${f}^{\prime}={f}_{0}\left(\frac{c-{v}_{r}}{c}\right)\left(\frac{c}{c-{v}_{s}}\right)={f}_{0}\left(\frac{c-{v}_{r}}{c-{v}_{s}}\right)={f}_{0}\left(\frac{1-\raisebox{1ex}{${v}_{r}$}\!\left/ \!\raisebox{-1ex}{$c$}\right.}{1-\raisebox{1ex}{${v}_{s}$}\!\left/ \!\raisebox{-1ex}{$c$}\right.}\right).$$

There is a difference in the Doppler formulas for sound versus electromagnetic waves. For sound, the Doppler shift depends on both the source and receiver velocities. For electromagnetic waves, the Doppler shift depends on the difference between the source and receiver velocities.

[1] Halliday, David, R. Resnick, and J. Walker, *Fundamentals of
Physics*, 10th ed. Wiley, New York, 2013.