Discrete Fourier transform mirrored?

1. Dec 29, 2012

lordchaos

Why does a discrete Fourier transform seems to produce two peaks for a single sine wave? It seems to be the case that the spectrum ends halfway through the transform and then reappears as a mirror image; why is that? And what is the use of this mirror image? If I want to recover the frequency, phase and magnitude of an oscillation, do I need to use any data from this mirror image?

2. Dec 29, 2012

rbj

because

$$\cos(\omega t + \phi) = \frac{1}{2} \left( e^{+i \omega t} + e^{-i \omega t} \right)$$

so there is a frequency component at $+\omega$ and at $-\omega$.

because of aliasing due to sampling, negative frequencies are displayed in the upper half of the output of the DFT.

3. Dec 29, 2012

lordchaos

Thanks for that. Does this affect how I should extract the magnitude & phase from the transform? Or is it OK to throw the second half away for that purpose?

4. Dec 29, 2012

rbj

if your input to the DFT is real (i.e. they are complex numbers, but the imaginary part is zero), then yes, the second half is a mirror image of the first half. the real part (or the magnitude) of the DFT output has even symmetry and the imaginary part (or the phase) has odd symmetry.

5. Dec 31, 2012