The Doppler effect or Doppler shift is the change in frequency of a Wave due to its motion with respect to an observer. The frequency is increased if the wave is moving towards the observer or reduced otherwise. Being a relative effect, its description depends on whether we are using Galilean relativity or Einstein relativity. It is a consequences of the invariance of a phase across frames of reference.
Consider two frames of reference, S and S′, and a wave of angular frequencyω and ω′ depending on which frame you are measuring it in. The frame S is attached to the observer, whereas S′ is the source frame, so ω will be the observed frequency and ω′ will be the "emission" frequency.
...
The modified angular frequency is
ω′=ω(1−μn^⋅v^)
Say the source is standing still and the source is moving. If the source is moving away, then n^⋅v^<0 and ω<ω′. This means that the observed frequency is lower: in case of light, it will be redder, and in case of sound, it will be lower pitched. Similarly, if the source is moving towards the observer, then n^⋅v^>0 and ω>ω′. Light becomes bluer and sound becomes higher pitched.
Say now the source is standing still and the observer is the one moving. If the observer is moving away, then n^⋅v^>0 and ω>ω′. Light becomes bluer and sounds go higher. As you may guess, if the observer is moving towards the source, then n^⋅v^<0 and ω<ω′. Light becomes redder and sounds go deeper.
In general, if the distance between source and observer is getting smaller, the perceived frequency increases, otherwise it decreases.
The relativistic version of the effect is essentially the same as the classical one, with the key difference that we employ Lorentz transformations instead of Galilean ones. It is still a consequence of phase invariance.
Consider a wave of phase cωt−ck⋅x=cω′t′−ck′⋅x^′. The Lorentz transformation from (x0,x1,x2,x3) to (x0′,x1′,x2′,x3′) says
where θ is the angle between the velocity of the wave and the line between the wave and the observer. Using k=ω/c and extracting ω′ gives use the relativistic Doppler effect:
ω′=γω(1−βcosθ)
The equation reads a little different, but the gist of it is the same. ω′ is ω rescaled by some factor, in this case γ(1−βcosθ). This factor is still determined by relative velocity and whether the motion is towards or away the observer.
Let's see what happens if θ=0. In this case, k is perpendicular to v. Let's call νs the "proper frequency" of the wave, the frequency as measured in the source's frame of reference. The observed frequency νobs will be given by
The sign depends on whether the source and observer are getting closer (+) or farther (−). If they are getting closer, νobs>νs, whereas if they are getting farther, νobs<νs, as we expect. In relativity and most often in astrophysics, these are called Redshift and blueshift respectively.