Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Why complex discrete Fourier transform?

  1. Dec 12, 2012 #1
    I've been trying to figure out why it's standard to use complex discrete Fourier transforms instead of just the real version. It's discussed a bit here.


    As far as I can tell there's a hypothetical efficiency argument. Am I wrong? I notice that a lot of computer algorithms are using the real version. For instance ffmpeg tends to use the real version as far as I can tell.

    It seems to me that before computers, complex numbers were used to aid in hand computation. For instance it's easier to view sinusoidal functions as a power function of e than it is to calculate sines and cosines when you're doing it by hand.

    Am I completely wrong about this analysis? In the case of Fourier transforms do I get missing data or have reduced accuracy when I use the real version instead of the complex version?

  2. jcsd
  3. Feb 19, 2014 #2


    User Avatar
    Science Advisor
    Homework Helper

    THe stackexchange answer is pretty good. The bottom line is, there are some irritating sign-changes between ##A \cos\omega t + B\sin\omega t## and the real part of ##(A + iB)e^{i\omega t}##. The math works out tidier in the general case where both the data and its transform are complex.

    FWIW The stackexchange comment
    is not always true. If you consder the behaviour of a rotating machine, the simple way to represent its response in the time domain is using complex variables, in a similar way that electrical engineers use "phasors".

    I think the "computational efficiency argument" is entirely hypothetical. if you want efficiency (and numerical accuracy) it is not usually a good plan to make a naive translation of math formulas using complex numbers, into computer code using complex variables. But aside from that, you can use exactly the same algorithm for doing an FFT of 2n real variables or n complex variables, apart from a different interpretation of the order of the input and output data which has no effect on the computing time or cost.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook